Exemplo n.º 1
0
  public PlayerListModel(ObservableList<Player> playerList) {
    this.playerList = playerList;

    // TODO: Figure out how to clean this up when no longer in use
    // for now it doesn't matter, but, it's bad design
    playerList.addObserver(this);
  }
Exemplo n.º 2
0
 ////
 // OBSERVER
 public void update(Observable o, Object arg) {
   fireContentsChanged(this, 0, playerList.size());
 }
Exemplo n.º 3
0
 public int getSize() {
   return playerList.size();
 }
Exemplo n.º 4
0
 public Object getElementAt(int index) {
   return playerList.get(index);
 }