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); }
//// // OBSERVER public void update(Observable o, Object arg) { fireContentsChanged(this, 0, playerList.size()); }
public int getSize() { return playerList.size(); }
public Object getElementAt(int index) { return playerList.get(index); }