use of mage.client.table.TournamentPlayerPanel in project mage by magefree.
the class NewTournamentDialog method showDialog.
public void showDialog(UUID roomId) {
this.roomId = roomId;
if (!lastSessionId.equals(SessionHandler.getSessionId())) {
lastSessionId = SessionHandler.getSessionId();
this.player1Panel.setPlayerName(SessionHandler.getUserName());
// no computer
this.player1Panel.showLevel(false);
cbTournamentType.setModel(new DefaultComboBoxModel(SessionHandler.getTournamentTypes().toArray()));
cbGameType.setModel(new DefaultComboBoxModel(SessionHandler.getTournamentGameTypes().toArray()));
cbDeckType.setModel(new DefaultComboBoxModel(SessionHandler.getDeckTypes()));
cbTimeLimit.setModel(new DefaultComboBoxModel(MatchTimeLimit.values()));
cbSkillLevel.setModel(new DefaultComboBoxModel(SkillLevel.values()));
cbDraftCube.setModel(new DefaultComboBoxModel(SessionHandler.getDraftCubes()));
cbDraftTiming.setModel(new DefaultComboBoxModel(Arrays.stream(TimingOption.values()).filter(o -> !o.equals(TimingOption.NONE)).toArray()));
// update player types
int i = 2;
for (TournamentPlayerPanel tournamentPlayerPanel : players) {
tournamentPlayerPanel.init(i++);
}
cbAllowSpectators.setSelected(true);
cbPlaneChase.setSelected(false);
this.setModal(true);
this.setLocation(150, 100);
}
onLoadSettings(0);
this.setVisible(true);
}
Aggregations