* UI: improved deck editor buttons and dialogs, prepared for export;

This commit is contained in:
Oleg Agafonov 2019-03-21 05:14:24 +04:00
parent b848bbfb65
commit 8b5993805a
7 changed files with 835 additions and 373 deletions

View file

@ -5,16 +5,14 @@
* *
* Created on 15-Dec-2009, 9:34:25 PM * Created on 15-Dec-2009, 9:34:25 PM
*/ */
package mage.client; package mage.client;
import java.awt.AWTEvent; import java.awt.*;
import java.awt.KeyboardFocusManager;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public abstract class MagePane extends javax.swing.JLayeredPane { public abstract class MagePane extends javax.swing.JLayeredPane {
private String title = "no title set"; private String title = "no title set";
@ -58,6 +56,10 @@ public abstract class MagePane extends javax.swing.JLayeredPane {
public void handleEvent(AWTEvent event) { public void handleEvent(AWTEvent event) {
} }
public Container getContentPane() {
return this;
}
/** /**
* This method is called from within the constructor to initialize the form. * This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always * WARNING: Do NOT modify this code. The content of this method is always
@ -73,4 +75,4 @@ public abstract class MagePane extends javax.swing.JLayeredPane {
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View file

@ -1,8 +1,8 @@
<?xml version="1.1" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo"> <Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JInternalFrameFormInfo">
<SyntheticProperties> <SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/> <SyntheticProperty name="formSizePolicy" type="int" value="2"/>
</SyntheticProperties> </SyntheticProperties>
<AuxValues> <AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
@ -14,22 +14,35 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-97,0,0,5,14"/>
</AuxValues> </AuxValues>
<Layout> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deckEditorPanel1" alignment="0" pref="885" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deckEditorPanel1" alignment="0" pref="626" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents> <SubComponents>
<Component class="mage.client.deckeditor.DeckEditorPanel" name="deckEditorPanel1"> <Component class="mage.client.deckeditor.DeckEditorPanel" name="deckEditorPanel1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.Box$Filler" name="filler1">
<Properties>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 32767]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 10]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="North"/>
</Constraint>
</Constraints>
</Component> </Component>
</SubComponents> </SubComponents>
</Form> </Form>

View file

@ -1,22 +1,17 @@
/*
* DeckEditorPane.java
*
* Created on Dec 17, 2009, 9:21:42 AM
*/
package mage.client.deckeditor; package mage.client.deckeditor;
import java.awt.Component;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import javax.swing.JComponent;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
import mage.client.MagePane; import mage.client.MagePane;
import mage.client.constants.Constants.DeckEditorMode; import mage.client.constants.Constants.DeckEditorMode;
import mage.client.plugins.impl.Plugins; import mage.client.plugins.impl.Plugins;
import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public class DeckEditorPane extends MagePane { public class DeckEditorPane extends MagePane {
@ -77,17 +72,10 @@ public class DeckEditorPane extends MagePane {
private void initComponents() { private void initComponents() {
deckEditorPanel1 = new mage.client.deckeditor.DeckEditorPanel(); deckEditorPanel1 = new mage.client.deckeditor.DeckEditorPanel();
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 10), new java.awt.Dimension(0, 32767));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); getContentPane().add(deckEditorPanel1, java.awt.BorderLayout.CENTER);
this.setLayout(layout); getContentPane().add(filler1, java.awt.BorderLayout.NORTH);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deckEditorPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deckEditorPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void initComponents(Component container) { private void initComponents(Component container) {
@ -111,6 +99,7 @@ public class DeckEditorPane extends MagePane {
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private mage.client.deckeditor.DeckEditorPanel deckEditorPanel1; private mage.client.deckeditor.DeckEditorPanel deckEditorPanel1;
private javax.swing.Box.Filler filler1;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

View file

@ -17,21 +17,21 @@
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="jPanel1" min="-2" pref="261" max="-2" attributes="0"/> <Component id="panelLeft" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/> <EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jSplitPane1" pref="604" max="32767" attributes="0"/> <Component id="panelRight" pref="890" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/> <Component id="panelLeft" alignment="0" max="32767" attributes="0"/>
<Component id="jSplitPane1" alignment="1" pref="612" max="32767" attributes="0"/> <Component id="panelRight" alignment="1" pref="808" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Container class="javax.swing.JSplitPane" name="jSplitPane1"> <Container class="javax.swing.JSplitPane" name="panelRight">
<Properties> <Properties>
<Property name="orientation" type="int" value="0"/> <Property name="orientation" type="int" value="0"/>
<Property name="resizeWeight" type="double" value="0.5"/> <Property name="resizeWeight" type="double" value="0.5"/>
@ -55,42 +55,167 @@
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JPanel" name="jPanel1"> <Container class="javax.swing.JPanel" name="panelLeft">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelDeck" alignment="1" max="32767" attributes="0"/>
<Component id="bigCard" alignment="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="panelDeck" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="bigCard" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="org.mage.plugins.card.info.CardInfoPaneImpl" name="cardInfoPane">
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="Plugins.instance.getCardInfoPane()"/>
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="if (cardInfoPane != null &amp;&amp; System.getProperty(&quot;testCardInfo&quot;) != null) {&#xa; cardInfoPane.setPreferredSize(new Dimension(170, 150));&#xa; cardInfoPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 0, 0)));&#xa; isShowCardInfo = true;&#xa; } else {&#xa; cardInfoPane = new JLabel();&#xa; cardInfoPane.setVisible(false);&#xa; }"/>
<AuxValue name="JavaCodeGenerator_DeclarationPost" type="java.lang.String" value="*/"/>
<AuxValue name="JavaCodeGenerator_DeclarationPre" type="java.lang.String" value="private JComponent cardInfoPane;&#xa;/*"/>
</AuxValues>
</Component>
<Component class="mage.client.cards.BigCard" name="bigCard">
</Component>
<Container class="javax.swing.JPanel" name="panelDeck">
<Properties>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
<Property name="axis" type="int" value="1"/>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="panelDeckName">
<Properties>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="lblDeckName" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtDeckName" pref="175" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="txtDeckName" alignment="3" min="-2" pref="30" max="-2" attributes="0"/>
<Component id="lblDeckName" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="lblDeckName">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="ff" red="ff" type="rgb"/>
</Property>
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
<ComponentRef name="txtDeckName"/>
</Property>
<Property name="text" type="java.lang.String" value="Deck Name:"/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="txtDeckName">
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelDeckCreate">
<Properties>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnNew" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnGenDeck" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="40" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="btnGenDeck" pref="30" max="32767" attributes="0"/>
<Component id="btnNew" alignment="0" pref="30" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="btnNew">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_active.png"/>
</Property>
<Property name="text" type="java.lang.String" value="NEW"/>
<Property name="iconTextGap" type="int" value="2"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnGenDeck">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/card_panel.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Random"/>
<Property name="iconTextGap" type="int" value="1"/>
<Property name="name" type="java.lang.String" value="btnGenDeck" noResource="true"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnGenDeckActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelDeckLoad">
<Properties>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
<Component id="lblDeckName" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="txtDeckName" max="32767" attributes="0"/> <Component id="btnLoad" min="-2" pref="100" max="-2" attributes="0"/>
</Group>
<Component id="bigCard" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnSave" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnLoad" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnNew" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnExit" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnImport" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnGenDeck" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnAddLand" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnSubmit" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="btnImport" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="40" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -98,109 +223,140 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="txtDeckName" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="btnLoad" pref="0" max="32767" attributes="0"/>
<Component id="lblDeckName" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="btnImport" pref="30" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="btnSave" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnLoad" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnNew" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnExit" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="btnImport" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnGenDeck" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnAddLand" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnSubmit" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Component id="bigCard" min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Component class="mage.client.cards.BigCard" name="bigCard">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
<LineBorder/>
</Border>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="txtDeckName">
</Component>
<Component class="javax.swing.JLabel" name="lblDeckName">
<Properties>
<Property name="text" type="java.lang.String" value="Deck Name:"/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="btnSave">
<Properties>
<Property name="text" type="java.lang.String" value="Save"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSaveActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnLoad"> <Component class="javax.swing.JButton" name="btnLoad">
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="Load"/> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/search_24.png"/>
</Property>
<Property name="text" type="java.lang.String" value="LOAD"/>
<Property name="iconTextGap" type="int" value="2"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoadActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoadActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JButton" name="btnNew">
<Properties>
<Property name="text" type="java.lang.String" value="New"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnExit">
<Properties>
<Property name="text" type="java.lang.String" value="Exit"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnExitActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnImport"> <Component class="javax.swing.JButton" name="btnImport">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/deck_in.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Import"/> <Property name="text" type="java.lang.String" value="Import"/>
<Property name="iconTextGap" type="int" value="2"/>
<Property name="name" type="java.lang.String" value="btnImport" noResource="true"/> <Property name="name" type="java.lang.String" value="btnImport" noResource="true"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnImportActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnImportActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JButton" name="btnAddLand"> </SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelDeckSave">
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="Add Land"/> <Property name="opaque" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="btnAddLand" noResource="true"/> </Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnSave" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnExport" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="40" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="btnSave" pref="30" max="32767" attributes="0"/>
<Component id="btnExport" pref="30" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="btnSave">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/sideboard_out.png"/>
</Property>
<Property name="text" type="java.lang.String" value="SAVE"/>
<Property name="iconTextGap" type="int" value="2"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddLandActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSaveActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JButton" name="btnGenDeck"> <Component class="javax.swing.JButton" name="btnExport">
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="Generate"/> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Property name="name" type="java.lang.String" value="btnGenDeck" noResource="true"/> <Image iconType="3" name="/buttons/deck_out.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Export"/>
<Property name="iconTextGap" type="int" value="2"/>
<Property name="name" type="java.lang.String" value="btnImport" noResource="true"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnGenDeckActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnExportActionPerformed"/>
</Events> </Events>
</Component> </Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelDeckDraft">
<Properties>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnSubmit" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnSubmitTimer" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="40" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="btnSubmit" min="-2" pref="30" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Component id="btnSubmitTimer" alignment="0" pref="0" max="32767" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="btnSubmit"> <Component class="javax.swing.JButton" name="btnSubmit">
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="Submit"/> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_finished.png"/>
</Property>
<Property name="text" type="java.lang.String" value="SUBMIT"/>
<Property name="iconTextGap" type="int" value="2"/>
<Property name="name" type="java.lang.String" value="btnSubmit" noResource="true"/> <Property name="name" type="java.lang.String" value="btnSubmit" noResource="true"/>
</Properties> </Properties>
<Events> <Events>
@ -209,20 +365,101 @@
</Component> </Component>
<Component class="javax.swing.JButton" name="btnSubmitTimer"> <Component class="javax.swing.JButton" name="btnSubmitTimer">
<Properties> <Properties>
<Property name="text" type="java.lang.String" value="Submit in 1 minute"/> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Tahoma" size="9" style="0"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_finished.png"/>
</Property>
<Property name="text" type="java.lang.String" value="&lt;html&gt;Submit&lt;br&gt;in 1 min"/>
<Property name="iconTextGap" type="int" value="2"/>
<Property name="name" type="java.lang.String" value="btnSubmitTimer" noResource="true"/> <Property name="name" type="java.lang.String" value="btnSubmitTimer" noResource="true"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitTimerActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitTimerActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="org.mage.plugins.card.info.CardInfoPaneImpl" name="cardInfoPane"> </SubComponents>
<AuxValues> </Container>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="Plugins.instance.getCardInfoPane()"/> <Container class="javax.swing.JPanel" name="panelDeckLands">
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="if (cardInfoPane != null &amp;&amp; System.getProperty(&quot;testCardInfo&quot;) != null) {&#xa; cardInfoPane.setPreferredSize(new Dimension(170, 150));&#xa; cardInfoPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 0, 0)));&#xa; isShowCardInfo = true;&#xa; } else {&#xa; cardInfoPane = new JLabel();&#xa; cardInfoPane.setVisible(false);&#xa; }"/> <Properties>
<AuxValue name="JavaCodeGenerator_DeclarationPost" type="java.lang.String" value="*/"/> <Property name="opaque" type="boolean" value="false"/>
<AuxValue name="JavaCodeGenerator_DeclarationPre" type="java.lang.String" value="private JComponent cardInfoPane;&#xa;/*"/> </Properties>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnAddLand" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="146" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnAddLand" pref="30" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="btnAddLand">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/type_land.png"/>
</Property>
<Property name="text" type="java.lang.String" value="Lands"/>
<Property name="iconTextGap" type="int" value="2"/>
<Property name="name" type="java.lang.String" value="btnAddLand" noResource="true"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddLandActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelDeckExit">
<Properties>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnExit" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtTimeRemaining" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="40" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="11" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="btnExit" alignment="3" min="-2" pref="30" max="-2" attributes="0"/>
<Component id="txtTimeRemaining" alignment="3" min="-2" pref="30" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="btnExit">
<Properties>
<Property name="text" type="java.lang.String" value="Exit"/>
<Property name="iconTextGap" type="int" value="2"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnExitActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JTextField" name="txtTimeRemaining"> <Component class="javax.swing.JTextField" name="txtTimeRemaining">
<Events> <Events>
@ -232,4 +469,8 @@
</SubComponents> </SubComponents>
</Container> </Container>
</SubComponents> </SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Form> </Form>

View file

@ -42,7 +42,7 @@ import java.util.concurrent.*;
import static mage.cards.decks.DeckFormats.DCK; import static mage.cards.decks.DeckFormats.DCK;
/** /**
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com, JayDi85
*/ */
public class DeckEditorPanel extends javax.swing.JPanel { public class DeckEditorPanel extends javax.swing.JPanel {
@ -71,8 +71,8 @@ public class DeckEditorPanel extends javax.swing.JPanel {
fcImportDeck.addChoosableFileFilter(new ImportFilter()); fcImportDeck.addChoosableFileFilter(new ImportFilter());
deckArea.setOpaque(false); deckArea.setOpaque(false);
jPanel1.setOpaque(false); panelLeft.setOpaque(false);
jSplitPane1.setOpaque(false); panelRight.setOpaque(false);
restoreDividerLocationsAndDeckAreaSettings(); restoreDividerLocationsAndDeckAreaSettings();
countdown = new javax.swing.Timer(1000, countdown = new javax.swing.Timer(1000,
e -> { e -> {
@ -122,7 +122,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
} }
private void saveDividerLocationsAndDeckAreaSettings() { private void saveDividerLocationsAndDeckAreaSettings() {
PreferencesDialog.saveValue(PreferencesDialog.KEY_EDITOR_HORIZONTAL_DIVIDER_LOCATION, Integer.toString(jSplitPane1.getDividerLocation())); PreferencesDialog.saveValue(PreferencesDialog.KEY_EDITOR_HORIZONTAL_DIVIDER_LOCATION, Integer.toString(panelRight.getDividerLocation()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_EDITOR_DECKAREA_SETTINGS, this.deckArea.saveSettings().toString()); PreferencesDialog.saveValue(PreferencesDialog.KEY_EDITOR_DECKAREA_SETTINGS, this.deckArea.saveSettings().toString());
} }
@ -130,7 +130,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
// Load horizontal split position setting // Load horizontal split position setting
String dividerLocation = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_EDITOR_HORIZONTAL_DIVIDER_LOCATION, ""); String dividerLocation = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_EDITOR_HORIZONTAL_DIVIDER_LOCATION, "");
if (!dividerLocation.isEmpty()) { if (!dividerLocation.isEmpty()) {
jSplitPane1.setDividerLocation(Integer.parseInt(dividerLocation)); panelRight.setDividerLocation(Integer.parseInt(dividerLocation));
} }
// Load deck area settings // Load deck area settings
@ -243,7 +243,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
private void init() { private void init() {
//this.cardSelector.setVisible(true); //this.cardSelector.setVisible(true);
this.jPanel1.setVisible(true); this.panelLeft.setVisible(true);
for (ICardGrid component : this.cardSelector.getCardGridComponents()) { for (ICardGrid component : this.cardSelector.getCardGridComponents()) {
component.clearCardEventListeners(); component.clearCardEventListeners();
component.addCardEventListener((Listener<Event>) event -> { component.addCardEventListener((Listener<Event>) event -> {
@ -608,7 +608,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
private void importChoose(java.awt.event.ActionEvent evt) { private void importChoose(java.awt.event.ActionEvent evt) {
Object[] options = {"File", "Clipboard", "Append from Clipboard"}; Object[] options = {"From file", "From clipboard (new deck)", "From clipboard (append cards)"};
int n = JOptionPane.showOptionDialog(MageFrame.getDesktop(), int n = JOptionPane.showOptionDialog(MageFrame.getDesktop(),
"Where would you like to import from?", "Where would you like to import from?",
@ -620,8 +620,6 @@ public class DeckEditorPanel extends javax.swing.JPanel {
options[0] options[0]
); );
logger.info(n);
switch (n) { switch (n) {
case 0: case 0:
importFromFile(evt); importFromFile(evt);
@ -722,6 +720,40 @@ public class DeckEditorPanel extends javax.swing.JPanel {
}); });
} }
private void exportChoose(java.awt.event.ActionEvent evt) {
Object[] options = {"To file", "To clipboard"};
int n = JOptionPane.showOptionDialog(MageFrame.getDesktop(),
"Where would you like to export?",
"Deck export",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
options,
options[0]
);
switch (n) {
case 0:
exportToFile(evt);
break;
case 1:
exportToClipboard(evt);
break;
default:
break;
}
}
private void exportToFile(java.awt.event.ActionEvent evt) {
// TODO
}
private void exportToClipboard(java.awt.event.ActionEvent evt) {
// TODO
}
private void processAndShowImportErrors(StringBuilder errorMessages) { private void processAndShowImportErrors(StringBuilder errorMessages) {
// show up errors list // show up errors list
if (errorMessages.length() > 0) { if (errorMessages.length() > 0) {
@ -760,22 +792,10 @@ public class DeckEditorPanel extends javax.swing.JPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jSplitPane1 = new javax.swing.JSplitPane(); panelRight = new javax.swing.JSplitPane();
cardSelector = new mage.client.deckeditor.CardSelector(); cardSelector = new mage.client.deckeditor.CardSelector();
deckArea = new mage.client.deckeditor.DeckArea(); deckArea = new mage.client.deckeditor.DeckArea();
jPanel1 = new javax.swing.JPanel(); panelLeft = new javax.swing.JPanel();
bigCard = new mage.client.cards.BigCard();
txtDeckName = new javax.swing.JTextField();
lblDeckName = new javax.swing.JLabel();
btnSave = new javax.swing.JButton();
btnLoad = new javax.swing.JButton();
btnNew = new javax.swing.JButton();
btnExit = new javax.swing.JButton();
btnImport = new javax.swing.JButton();
btnAddLand = new javax.swing.JButton();
btnGenDeck = new javax.swing.JButton();
btnSubmit = new javax.swing.JButton();
btnSubmitTimer = new javax.swing.JButton();
cardInfoPane = Plugins.instance.getCardInfoPane(); cardInfoPane = Plugins.instance.getCardInfoPane();
if (cardInfoPane != null && System.getProperty("testCardInfo") != null) { if (cardInfoPane != null && System.getProperty("testCardInfo") != null) {
cardInfoPane.setPreferredSize(new Dimension(170, 150)); cardInfoPane.setPreferredSize(new Dimension(170, 150));
@ -785,62 +805,79 @@ public class DeckEditorPanel extends javax.swing.JPanel {
cardInfoPane = new JLabel(); cardInfoPane = new JLabel();
cardInfoPane.setVisible(false); cardInfoPane.setVisible(false);
} }
bigCard = new mage.client.cards.BigCard();
panelDeck = new javax.swing.JPanel();
panelDeckName = new javax.swing.JPanel();
lblDeckName = new javax.swing.JLabel();
txtDeckName = new javax.swing.JTextField();
panelDeckCreate = new javax.swing.JPanel();
btnNew = new javax.swing.JButton();
btnGenDeck = new javax.swing.JButton();
panelDeckLoad = new javax.swing.JPanel();
btnLoad = new javax.swing.JButton();
btnImport = new javax.swing.JButton();
panelDeckSave = new javax.swing.JPanel();
btnSave = new javax.swing.JButton();
btnExport = new javax.swing.JButton();
panelDeckDraft = new javax.swing.JPanel();
btnSubmit = new javax.swing.JButton();
btnSubmitTimer = new javax.swing.JButton();
panelDeckLands = new javax.swing.JPanel();
btnAddLand = new javax.swing.JButton();
panelDeckExit = new javax.swing.JPanel();
btnExit = new javax.swing.JButton();
txtTimeRemaining = new javax.swing.JTextField(); txtTimeRemaining = new javax.swing.JTextField();
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); panelRight.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setResizeWeight(0.5); panelRight.setResizeWeight(0.5);
jSplitPane1.setTopComponent(cardSelector); panelRight.setTopComponent(cardSelector);
jSplitPane1.setBottomComponent(deckArea); panelRight.setBottomComponent(deckArea);
bigCard.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); panelDeck.setOpaque(false);
panelDeck.setLayout(new javax.swing.BoxLayout(panelDeck, javax.swing.BoxLayout.Y_AXIS));
panelDeckName.setOpaque(false);
lblDeckName.setForeground(new java.awt.Color(255, 255, 255));
lblDeckName.setLabelFor(txtDeckName);
lblDeckName.setText("Deck Name:"); lblDeckName.setText("Deck Name:");
btnSave.setText("Save"); javax.swing.GroupLayout panelDeckNameLayout = new javax.swing.GroupLayout(panelDeckName);
btnSave.addActionListener(new java.awt.event.ActionListener() { panelDeckName.setLayout(panelDeckNameLayout);
public void actionPerformed(java.awt.event.ActionEvent evt) { panelDeckNameLayout.setHorizontalGroup(
btnSaveActionPerformed(evt); panelDeckNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
} .addGroup(panelDeckNameLayout.createSequentialGroup()
}); .addContainerGap()
.addComponent(lblDeckName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtDeckName, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
.addContainerGap())
);
panelDeckNameLayout.setVerticalGroup(
panelDeckNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckNameLayout.createSequentialGroup()
.addGroup(panelDeckNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtDeckName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblDeckName))
.addGap(0, 0, 0))
);
btnLoad.setText("Load"); panelDeck.add(panelDeckName);
btnLoad.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnLoadActionPerformed(evt);
}
});
btnNew.setText("New"); panelDeckCreate.setOpaque(false);
btnNew.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"))); // NOI18N
btnNew.setText("NEW");
btnNew.setIconTextGap(2);
btnNew.addActionListener(new java.awt.event.ActionListener() { btnNew.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNewActionPerformed(evt); btnNewActionPerformed(evt);
} }
}); });
btnExit.setText("Exit"); btnGenDeck.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/card_panel.png"))); // NOI18N
btnExit.addActionListener(new java.awt.event.ActionListener() { btnGenDeck.setText("Random");
public void actionPerformed(java.awt.event.ActionEvent evt) { btnGenDeck.setIconTextGap(1);
btnExitActionPerformed(evt);
}
});
btnImport.setText("Import");
btnImport.setName("btnImport"); // NOI18N
btnImport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnImportActionPerformed(evt);
}
});
btnAddLand.setText("Add Land");
btnAddLand.setName("btnAddLand"); // NOI18N
btnAddLand.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddLandActionPerformed(evt);
}
});
btnGenDeck.setText("Generate");
btnGenDeck.setName("btnGenDeck"); // NOI18N btnGenDeck.setName("btnGenDeck"); // NOI18N
btnGenDeck.addActionListener(new java.awt.event.ActionListener() { btnGenDeck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -848,7 +885,119 @@ public class DeckEditorPanel extends javax.swing.JPanel {
} }
}); });
btnSubmit.setText("Submit"); javax.swing.GroupLayout panelDeckCreateLayout = new javax.swing.GroupLayout(panelDeckCreate);
panelDeckCreate.setLayout(panelDeckCreateLayout);
panelDeckCreateLayout.setHorizontalGroup(
panelDeckCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckCreateLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnNew, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnGenDeck, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(40, Short.MAX_VALUE))
);
panelDeckCreateLayout.setVerticalGroup(
panelDeckCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckCreateLayout.createSequentialGroup()
.addGap(5, 5, 5)
.addGroup(panelDeckCreateLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnGenDeck, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
.addComponent(btnNew, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)))
);
panelDeck.add(panelDeckCreate);
panelDeckLoad.setOpaque(false);
btnLoad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/search_24.png"))); // NOI18N
btnLoad.setText("LOAD");
btnLoad.setIconTextGap(2);
btnLoad.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnLoadActionPerformed(evt);
}
});
btnImport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/deck_in.png"))); // NOI18N
btnImport.setText("Import");
btnImport.setIconTextGap(2);
btnImport.setName("btnImport"); // NOI18N
btnImport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnImportActionPerformed(evt);
}
});
javax.swing.GroupLayout panelDeckLoadLayout = new javax.swing.GroupLayout(panelDeckLoad);
panelDeckLoad.setLayout(panelDeckLoadLayout);
panelDeckLoadLayout.setHorizontalGroup(
panelDeckLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckLoadLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnLoad, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnImport, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(40, Short.MAX_VALUE))
);
panelDeckLoadLayout.setVerticalGroup(
panelDeckLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckLoadLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panelDeckLoadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnLoad, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(btnImport, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)))
);
panelDeck.add(panelDeckLoad);
panelDeckSave.setOpaque(false);
btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/sideboard_out.png"))); // NOI18N
btnSave.setText("SAVE");
btnSave.setIconTextGap(2);
btnSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSaveActionPerformed(evt);
}
});
btnExport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/deck_out.png"))); // NOI18N
btnExport.setText("Export");
btnExport.setIconTextGap(2);
btnExport.setName("btnImport"); // NOI18N
btnExport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnExportActionPerformed(evt);
}
});
javax.swing.GroupLayout panelDeckSaveLayout = new javax.swing.GroupLayout(panelDeckSave);
panelDeckSave.setLayout(panelDeckSaveLayout);
panelDeckSaveLayout.setHorizontalGroup(
panelDeckSaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckSaveLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnExport, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(40, Short.MAX_VALUE))
);
panelDeckSaveLayout.setVerticalGroup(
panelDeckSaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckSaveLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panelDeckSaveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnSave, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
.addComponent(btnExport, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)))
);
panelDeck.add(panelDeckSave);
panelDeckDraft.setOpaque(false);
btnSubmit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N
btnSubmit.setText("SUBMIT");
btnSubmit.setIconTextGap(2);
btnSubmit.setName("btnSubmit"); // NOI18N btnSubmit.setName("btnSubmit"); // NOI18N
btnSubmit.addActionListener(new java.awt.event.ActionListener() { btnSubmit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -856,7 +1005,10 @@ public class DeckEditorPanel extends javax.swing.JPanel {
} }
}); });
btnSubmitTimer.setText("Submit in 1 minute"); btnSubmitTimer.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
btnSubmitTimer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N
btnSubmitTimer.setText("<html>Submit<br>in 1 min");
btnSubmitTimer.setIconTextGap(2);
btnSubmitTimer.setName("btnSubmitTimer"); // NOI18N btnSubmitTimer.setName("btnSubmitTimer"); // NOI18N
btnSubmitTimer.addActionListener(new java.awt.event.ActionListener() { btnSubmitTimer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -864,65 +1016,117 @@ public class DeckEditorPanel extends javax.swing.JPanel {
} }
}); });
javax.swing.GroupLayout panelDeckDraftLayout = new javax.swing.GroupLayout(panelDeckDraft);
panelDeckDraft.setLayout(panelDeckDraftLayout);
panelDeckDraftLayout.setHorizontalGroup(
panelDeckDraftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckDraftLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnSubmit, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnSubmitTimer, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(40, Short.MAX_VALUE))
);
panelDeckDraftLayout.setVerticalGroup(
panelDeckDraftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckDraftLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panelDeckDraftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckDraftLayout.createSequentialGroup()
.addComponent(btnSubmit, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(btnSubmitTimer, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addGap(0, 0, 0))
);
panelDeck.add(panelDeckDraft);
panelDeckLands.setOpaque(false);
btnAddLand.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_land.png"))); // NOI18N
btnAddLand.setText("Lands");
btnAddLand.setIconTextGap(2);
btnAddLand.setName("btnAddLand"); // NOI18N
btnAddLand.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddLandActionPerformed(evt);
}
});
javax.swing.GroupLayout panelDeckLandsLayout = new javax.swing.GroupLayout(panelDeckLands);
panelDeckLands.setLayout(panelDeckLandsLayout);
panelDeckLandsLayout.setHorizontalGroup(
panelDeckLandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckLandsLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnAddLand, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(146, Short.MAX_VALUE))
);
panelDeckLandsLayout.setVerticalGroup(
panelDeckLandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelDeckLandsLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnAddLand, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
.addGap(0, 0, 0))
);
panelDeck.add(panelDeckLands);
panelDeckExit.setOpaque(false);
btnExit.setText("Exit");
btnExit.setIconTextGap(2);
btnExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnExitActionPerformed(evt);
}
});
txtTimeRemaining.addActionListener(new java.awt.event.ActionListener() { txtTimeRemaining.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
txtTimeRemainingActionPerformed(evt); txtTimeRemainingActionPerformed(evt);
} }
}); });
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); javax.swing.GroupLayout panelDeckExitLayout = new javax.swing.GroupLayout(panelDeckExit);
jPanel1.setLayout(jPanel1Layout); panelDeckExit.setLayout(panelDeckExitLayout);
jPanel1Layout.setHorizontalGroup( panelDeckExitLayout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) panelDeckExitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(panelDeckExitLayout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(6, 6, 6)
.addComponent(lblDeckName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtDeckName))
.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(btnSave) .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnLoad) .addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addContainerGap(40, Short.MAX_VALUE))
.addComponent(btnNew)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnExit))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnImport)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnGenDeck)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnAddLand)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnSubmit)))
.addContainerGap())
); );
jPanel1Layout.setVerticalGroup( panelDeckExitLayout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) panelDeckExitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDeckExitLayout.createSequentialGroup()
.addContainerGap() .addGap(0, 11, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(panelDeckExitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtDeckName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblDeckName)) .addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) );
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnSave) panelDeck.add(panelDeckExit);
.addComponent(btnLoad)
.addComponent(btnNew) javax.swing.GroupLayout panelLeftLayout = new javax.swing.GroupLayout(panelLeft);
.addComponent(btnExit)) panelLeft.setLayout(panelLeftLayout);
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) panelLeftLayout.setHorizontalGroup(
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnImport) .addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(btnGenDeck) .addGap(0, 0, 0)
.addComponent(btnAddLand) .addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(btnSubmit)) .addComponent(panelDeck, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(bigCard, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
);
panelLeftLayout.setVerticalGroup(
panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLeftLayout.createSequentialGroup()
.addComponent(panelDeck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
); );
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@ -930,14 +1134,14 @@ public class DeckEditorPanel extends javax.swing.JPanel {
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(panelLeft, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0) .addGap(0, 0, 0)
.addComponent(jSplitPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 604, Short.MAX_VALUE)) .addComponent(panelRight, javax.swing.GroupLayout.DEFAULT_SIZE, 890, Short.MAX_VALUE))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(panelLeft, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jSplitPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 612, Short.MAX_VALUE) .addComponent(panelRight, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 808, Short.MAX_VALUE)
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
@ -1118,11 +1322,16 @@ public class DeckEditorPanel extends javax.swing.JPanel {
importChoose(evt); importChoose(evt);
}//GEN-LAST:event_btnImportActionPerformed }//GEN-LAST:event_btnImportActionPerformed
private void btnExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportActionPerformed
exportChoose(evt);
}//GEN-LAST:event_btnExportActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private mage.client.cards.BigCard bigCard; private mage.client.cards.BigCard bigCard;
private javax.swing.JButton btnAddLand; private javax.swing.JButton btnAddLand;
private javax.swing.JButton btnExit; private javax.swing.JButton btnExit;
private javax.swing.JButton btnExport;
private javax.swing.JButton btnGenDeck; private javax.swing.JButton btnGenDeck;
private javax.swing.JButton btnImport; private javax.swing.JButton btnImport;
private javax.swing.JButton btnLoad; private javax.swing.JButton btnLoad;
@ -1136,9 +1345,17 @@ public class DeckEditorPanel extends javax.swing.JPanel {
*/ */
private mage.client.deckeditor.CardSelector cardSelector; private mage.client.deckeditor.CardSelector cardSelector;
private mage.client.deckeditor.DeckArea deckArea; private mage.client.deckeditor.DeckArea deckArea;
private javax.swing.JPanel jPanel1;
private javax.swing.JSplitPane jSplitPane1;
private javax.swing.JLabel lblDeckName; private javax.swing.JLabel lblDeckName;
private javax.swing.JPanel panelDeck;
private javax.swing.JPanel panelDeckCreate;
private javax.swing.JPanel panelDeckDraft;
private javax.swing.JPanel panelDeckExit;
private javax.swing.JPanel panelDeckLands;
private javax.swing.JPanel panelDeckLoad;
private javax.swing.JPanel panelDeckName;
private javax.swing.JPanel panelDeckSave;
private javax.swing.JPanel panelLeft;
private javax.swing.JSplitPane panelRight;
private javax.swing.JTextField txtDeckName; private javax.swing.JTextField txtDeckName;
private javax.swing.JTextField txtTimeRemaining; private javax.swing.JTextField txtTimeRemaining;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
@ -1164,7 +1381,7 @@ class DeckFilter extends FileFilter {
@Override @Override
public String getDescription() { public String getDescription() {
return "Deck Files"; return "XMage's deck files (*.dck)";
} }
} }

View file

@ -1279,6 +1279,6 @@ class DeckFilter extends FileFilter {
@Override @Override
public String getDescription() { public String getDescription() {
return "Deck Files"; return "XMage's deck files (*.dck)";
} }
} }

View file

@ -219,7 +219,7 @@ class DeckFilter extends FileFilter {
@Override @Override
public String getDescription() { public String getDescription() {
return "Deck Files"; return "XMage's deck files (*.dck)";
} }
} }