use of mage.client.draft.DraftPane in project mage by magefree.
the class MagePaneMenuItem method hideGames.
public void hideGames() {
Component[] windows = desktopPane.getComponentsInLayer(JLayeredPane.DEFAULT_LAYER);
for (Component window : windows) {
if (window instanceof GamePane) {
GamePane gamePane = (GamePane) window;
gamePane.removeGame();
}
if (window instanceof DraftPane) {
DraftPane draftPane = (DraftPane) window;
draftPane.removeDraft();
}
if (window instanceof TournamentPane) {
TournamentPane tournamentPane = (TournamentPane) window;
tournamentPane.removeTournament();
}
// close & remove sideboarding or construction pane if open
if (window instanceof DeckEditorPane) {
DeckEditorPane deckEditorPane = (DeckEditorPane) window;
if (deckEditorPane.getDeckEditorMode() == DeckEditorMode.LIMITED_BUILDING || deckEditorPane.getDeckEditorMode() == DeckEditorMode.SIDEBOARDING || deckEditorPane.getDeckEditorMode() == DeckEditorMode.VIEW_LIMITED_DECK) {
deckEditorPane.removeFrame();
}
}
}
}
use of mage.client.draft.DraftPane in project mage by magefree.
the class MagePaneMenuItem method endDraft.
public void endDraft(UUID draftId) {
// inform all open draft panes about
for (Component window : desktopPane.getComponentsInLayer(JLayeredPane.DEFAULT_LAYER)) {
if (window instanceof DraftPane) {
DraftPane draftPane = (DraftPane) window;
draftPane.removeDraft();
}
}
}
use of mage.client.draft.DraftPane in project mage by magefree.
the class MagePaneMenuItem method showDraft.
public void showDraft(UUID draftId) {
DraftPane draftPane = new DraftPane();
desktopPane.add(draftPane, JLayeredPane.DEFAULT_LAYER);
draftPane.setVisible(true);
draftPane.showDraft(draftId);
setActive(draftPane);
}
Aggregations