diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index 65eb2130f8..5f763a2463 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -75,6 +75,7 @@ import java.util.prefs.Preferences; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; import mage.client.draft.DraftPane; +import mage.client.tournament.TournamentPane; /** * @author BetaSteward_at_googlemail.com @@ -155,6 +156,14 @@ public class MageFrame extends javax.swing.JFrame { e1.printStackTrace(); } + tournamentPane = new TournamentPane(); + desktopPane.add(tournamentPane, javax.swing.JLayeredPane.DEFAULT_LAYER); + try { + tournamentPane.setMaximum(true); + } catch (java.beans.PropertyVetoException e1) { + e1.printStackTrace(); + } + addTooltipContainer(); setBackground(); addMageLabel(); @@ -407,6 +416,12 @@ public class MageFrame extends javax.swing.JFrame { this.draftPane.showDraft(draftId); } + public void showTournament(UUID tournamentId) { + this.tournamentPane.setVisible(true); + this.tournamentPane.toFront(); + this.tournamentPane.showTournament(tournamentId); + } + public static boolean connect(String userName, String serverName, int port) { return session.connect(userName, serverName, port); } @@ -746,6 +761,7 @@ public class MageFrame extends javax.swing.JFrame { private static final long serialVersionUID = -9104885239063142218L; private ImagePanel backgroundPane; private DraftPane draftPane; + private TournamentPane tournamentPane; public void setStatusText(String status) { this.lblStatus.setText(status); diff --git a/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java b/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java index 89d889cd21..c6273795dc 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java @@ -1,6 +1,29 @@ /* - * To change this template, choose Tools | Templates - * and open the template in the editor. + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. */ /* @@ -14,11 +37,9 @@ package mage.client.cards; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; -import java.util.UUID; import mage.cards.CardDimensions; import mage.cards.MageCard; -import mage.client.MageFrame; import mage.client.plugins.impl.Plugins; import mage.client.util.Config; import mage.view.CardView; @@ -97,13 +118,6 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener { @Override public void mouseClicked(MouseEvent e) { - /*if (e.getClickCount() == 2 && !e.isConsumed()) { - e.consume(); - Object obj = e.getSource(); - if (obj instanceof MageCard) { - this.cardEventSource.doubleClick(((MageCard)obj).getOriginal().getId(), "double-click"); - } - }*/ } @Override diff --git a/Mage.Client/src/main/java/mage/client/chat/ChatPanel.form b/Mage.Client/src/main/java/mage/client/chat/ChatPanel.form index 83bebbdb94..210d34b1e4 100644 --- a/Mage.Client/src/main/java/mage/client/chat/ChatPanel.form +++ b/Mage.Client/src/main/java/mage/client/chat/ChatPanel.form @@ -1,4 +1,4 @@ - +