use of com.sun.javafx.collections.ObservableListWrapper in project PretendYoureXyzzyReborn by devgianlu.
the class MainUI method refreshGamesList.
@FXML
public void refreshGamesList() {
JsonObject resp;
try {
resp = client.sendMessageBlocking(client.createRequest(Operations.LIST_GAMES));
} catch (InterruptedException | PyxException ex) {
UIClient.notifyException(ex);
return;
}
JsonArray gamesArray = resp.getAsJsonArray(Fields.GAMES_LIST.toString());
ObservableList<CGame> games = new ObservableListWrapper<>(Utils.toList(gamesArray, CGame.class));
gamesList.setItems(games);
}
use of com.sun.javafx.collections.ObservableListWrapper in project PretendYoureXyzzyReborn by devgianlu.
the class MainUI method refreshUsersList.
@FXML
public void refreshUsersList() {
JsonObject resp;
try {
resp = client.sendMessageBlocking(client.createRequest(Operations.LIST_USERS));
} catch (InterruptedException | PyxException ex) {
UIClient.notifyException(ex);
return;
}
JsonArray usersArray = resp.getAsJsonArray(Fields.USERS_LIST.toString());
ObservableList<CUser> users = new ObservableListWrapper<>(Utils.toList(usersArray, CUser.class));
usersList.setItems(users);
}
Aggregations