Search in sources :

Example 1 with DraftPane

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();
            }
        }
    }
}
Also used : TournamentPane(mage.client.tournament.TournamentPane) DeckEditorPane(mage.client.deckeditor.DeckEditorPane) GamePane(mage.client.game.GamePane) DraftPane(mage.client.draft.DraftPane)

Example 2 with DraftPane

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();
        }
    }
}
Also used : DraftPane(mage.client.draft.DraftPane)

Example 3 with DraftPane

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);
}
Also used : DraftPane(mage.client.draft.DraftPane)

Aggregations

DraftPane (mage.client.draft.DraftPane)3 DeckEditorPane (mage.client.deckeditor.DeckEditorPane)1 GamePane (mage.client.game.GamePane)1 TournamentPane (mage.client.tournament.TournamentPane)1