mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* UI: improved deck editor buttons and dialogs, prepared for export;
This commit is contained in:
parent
b848bbfb65
commit
8b5993805a
7 changed files with 835 additions and 373 deletions
|
@ -7,11 +7,9 @@
|
|||
*/
|
||||
package mage.client;
|
||||
|
||||
import java.awt.AWTEvent;
|
||||
import java.awt.KeyboardFocusManager;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public abstract class MagePane extends javax.swing.JLayeredPane {
|
||||
|
@ -58,6 +56,10 @@ public abstract class MagePane extends javax.swing.JLayeredPane {
|
|||
public void handleEvent(AWTEvent event) {
|
||||
}
|
||||
|
||||
public Container getContentPane() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -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">
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="2"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<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_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<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>
|
||||
|
||||
<Layout>
|
||||
<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>
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<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>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
/*
|
||||
* DeckEditorPane.java
|
||||
*
|
||||
* Created on Dec 17, 2009, 9:21:42 AM
|
||||
*/
|
||||
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.client.MagePane;
|
||||
import mage.client.constants.Constants.DeckEditorMode;
|
||||
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
|
||||
*/
|
||||
public class DeckEditorPane extends MagePane {
|
||||
|
@ -77,17 +72,10 @@ public class DeckEditorPane extends MagePane {
|
|||
private void initComponents() {
|
||||
|
||||
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);
|
||||
this.setLayout(layout);
|
||||
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)
|
||||
);
|
||||
getContentPane().add(deckEditorPanel1, java.awt.BorderLayout.CENTER);
|
||||
getContentPane().add(filler1, java.awt.BorderLayout.NORTH);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void initComponents(Component container) {
|
||||
|
@ -111,6 +99,7 @@ public class DeckEditorPane extends MagePane {
|
|||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private mage.client.deckeditor.DeckEditorPanel deckEditorPanel1;
|
||||
private javax.swing.Box.Filler filler1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
|
|
|
@ -17,21 +17,21 @@
|
|||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jPanel1" min="-2" pref="261" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jSplitPane1" pref="604" max="32767" attributes="0"/>
|
||||
<Component id="panelLeft" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="panelRight" pref="890" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jSplitPane1" alignment="1" pref="612" max="32767" attributes="0"/>
|
||||
<Component id="panelLeft" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="panelRight" alignment="1" pref="808" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPane1">
|
||||
<Container class="javax.swing.JSplitPane" name="panelRight">
|
||||
<Properties>
|
||||
<Property name="orientation" type="int" value="0"/>
|
||||
<Property name="resizeWeight" type="double" value="0.5"/>
|
||||
|
@ -55,42 +55,167 @@
|
|||
</Component>
|
||||
</SubComponents>
|
||||
</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 && System.getProperty("testCardInfo") != null) {
 cardInfoPane.setPreferredSize(new Dimension(170, 150));
 cardInfoPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 0, 0)));
 isShowCardInfo = true;
 } else {
 cardInfoPane = new JLabel();
 cardInfoPane.setVisible(false);
 }"/>
|
||||
<AuxValue name="JavaCodeGenerator_DeclarationPost" type="java.lang.String" value="*/"/>
|
||||
<AuxValue name="JavaCodeGenerator_DeclarationPre" type="java.lang.String" value="private JComponent cardInfoPane;
/*"/>
|
||||
</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>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="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"/>
|
||||
<Component id="txtDeckName" max="32767" 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>
|
||||
<Component id="btnLoad" min="-2" pref="100" 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>
|
||||
</DimensionLayout>
|
||||
|
@ -98,109 +223,140 @@
|
|||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtDeckName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblDeckName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnLoad" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="btnImport" pref="30" max="32767" attributes="0"/>
|
||||
</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>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<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">
|
||||
<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>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnLoadActionPerformed"/>
|
||||
</Events>
|
||||
</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">
|
||||
<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="iconTextGap" type="int" value="2"/>
|
||||
<Property name="name" type="java.lang.String" value="btnImport" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnImportActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnAddLand">
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelDeckSave">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Add Land"/>
|
||||
<Property name="name" type="java.lang.String" value="btnAddLand" noResource="true"/>
|
||||
<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="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>
|
||||
<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>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnGenDeck">
|
||||
<Component class="javax.swing.JButton" name="btnExport">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Generate"/>
|
||||
<Property name="name" type="java.lang.String" value="btnGenDeck" noResource="true"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<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>
|
||||
<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>
|
||||
</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">
|
||||
<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"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
@ -209,20 +365,101 @@
|
|||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnSubmitTimer">
|
||||
<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="<html>Submit<br>in 1 min"/>
|
||||
<Property name="iconTextGap" type="int" value="2"/>
|
||||
<Property name="name" type="java.lang.String" value="btnSubmitTimer" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitTimerActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<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 && System.getProperty("testCardInfo") != null) {
 cardInfoPane.setPreferredSize(new Dimension(170, 150));
 cardInfoPane.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(200, 0, 0)));
 isShowCardInfo = true;
 } else {
 cardInfoPane = new JLabel();
 cardInfoPane.setVisible(false);
 }"/>
|
||||
<AuxValue name="JavaCodeGenerator_DeclarationPost" type="java.lang.String" value="*/"/>
|
||||
<AuxValue name="JavaCodeGenerator_DeclarationPre" type="java.lang.String" value="private JComponent cardInfoPane;
/*"/>
|
||||
</AuxValues>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelDeckLands">
|
||||
<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="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 class="javax.swing.JTextField" name="txtTimeRemaining">
|
||||
<Events>
|
||||
|
@ -232,4 +469,8 @@
|
|||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
|
|
@ -42,7 +42,7 @@ import java.util.concurrent.*;
|
|||
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 {
|
||||
|
||||
|
@ -71,8 +71,8 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
fcImportDeck.addChoosableFileFilter(new ImportFilter());
|
||||
|
||||
deckArea.setOpaque(false);
|
||||
jPanel1.setOpaque(false);
|
||||
jSplitPane1.setOpaque(false);
|
||||
panelLeft.setOpaque(false);
|
||||
panelRight.setOpaque(false);
|
||||
restoreDividerLocationsAndDeckAreaSettings();
|
||||
countdown = new javax.swing.Timer(1000,
|
||||
e -> {
|
||||
|
@ -122,7 +122,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
// Load horizontal split position setting
|
||||
String dividerLocation = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_EDITOR_HORIZONTAL_DIVIDER_LOCATION, "");
|
||||
if (!dividerLocation.isEmpty()) {
|
||||
jSplitPane1.setDividerLocation(Integer.parseInt(dividerLocation));
|
||||
panelRight.setDividerLocation(Integer.parseInt(dividerLocation));
|
||||
}
|
||||
|
||||
// Load deck area settings
|
||||
|
@ -243,7 +243,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
|
||||
private void init() {
|
||||
//this.cardSelector.setVisible(true);
|
||||
this.jPanel1.setVisible(true);
|
||||
this.panelLeft.setVisible(true);
|
||||
for (ICardGrid component : this.cardSelector.getCardGridComponents()) {
|
||||
component.clearCardEventListeners();
|
||||
component.addCardEventListener((Listener<Event>) event -> {
|
||||
|
@ -608,7 +608,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
|
||||
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(),
|
||||
"Where would you like to import from?",
|
||||
|
@ -620,8 +620,6 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
options[0]
|
||||
);
|
||||
|
||||
logger.info(n);
|
||||
|
||||
switch (n) {
|
||||
case 0:
|
||||
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) {
|
||||
// show up errors list
|
||||
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
|
||||
private void initComponents() {
|
||||
|
||||
jSplitPane1 = new javax.swing.JSplitPane();
|
||||
panelRight = new javax.swing.JSplitPane();
|
||||
cardSelector = new mage.client.deckeditor.CardSelector();
|
||||
deckArea = new mage.client.deckeditor.DeckArea();
|
||||
jPanel1 = 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();
|
||||
panelLeft = new javax.swing.JPanel();
|
||||
cardInfoPane = Plugins.instance.getCardInfoPane();
|
||||
if (cardInfoPane != null && System.getProperty("testCardInfo") != null) {
|
||||
cardInfoPane.setPreferredSize(new Dimension(170, 150));
|
||||
|
@ -785,62 +805,79 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
cardInfoPane = new JLabel();
|
||||
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();
|
||||
|
||||
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
||||
jSplitPane1.setResizeWeight(0.5);
|
||||
jSplitPane1.setTopComponent(cardSelector);
|
||||
jSplitPane1.setBottomComponent(deckArea);
|
||||
panelRight.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
||||
panelRight.setResizeWeight(0.5);
|
||||
panelRight.setTopComponent(cardSelector);
|
||||
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:");
|
||||
|
||||
btnSave.setText("Save");
|
||||
btnSave.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnSaveActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
javax.swing.GroupLayout panelDeckNameLayout = new javax.swing.GroupLayout(panelDeckName);
|
||||
panelDeckName.setLayout(panelDeckNameLayout);
|
||||
panelDeckNameLayout.setHorizontalGroup(
|
||||
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");
|
||||
btnLoad.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnLoadActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
panelDeck.add(panelDeckName);
|
||||
|
||||
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() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnNewActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btnExit.setText("Exit");
|
||||
btnExit.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/card_panel.png"))); // NOI18N
|
||||
btnGenDeck.setText("Random");
|
||||
btnGenDeck.setIconTextGap(1);
|
||||
btnGenDeck.setName("btnGenDeck"); // NOI18N
|
||||
btnGenDeck.addActionListener(new java.awt.event.ActionListener() {
|
||||
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.addActionListener(new java.awt.event.ActionListener() {
|
||||
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.addActionListener(new java.awt.event.ActionListener() {
|
||||
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() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
txtTimeRemainingActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.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()
|
||||
javax.swing.GroupLayout panelDeckExitLayout = new javax.swing.GroupLayout(panelDeckExit);
|
||||
panelDeckExit.setLayout(panelDeckExitLayout);
|
||||
panelDeckExitLayout.setHorizontalGroup(
|
||||
panelDeckExitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelDeckExitLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(btnSave)
|
||||
.addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(btnLoad)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.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())
|
||||
.addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(40, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtDeckName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lblDeckName))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnSave)
|
||||
.addComponent(btnLoad)
|
||||
.addComponent(btnNew)
|
||||
.addComponent(btnExit))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnImport)
|
||||
.addComponent(btnGenDeck)
|
||||
.addComponent(btnAddLand)
|
||||
.addComponent(btnSubmit))
|
||||
panelDeckExitLayout.setVerticalGroup(
|
||||
panelDeckExitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDeckExitLayout.createSequentialGroup()
|
||||
.addGap(0, 11, Short.MAX_VALUE)
|
||||
.addGroup(panelDeckExitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
);
|
||||
|
||||
panelDeck.add(panelDeckExit);
|
||||
|
||||
javax.swing.GroupLayout panelLeftLayout = new javax.swing.GroupLayout(panelLeft);
|
||||
panelLeft.setLayout(panelLeftLayout);
|
||||
panelLeftLayout.setHorizontalGroup(
|
||||
panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelLeftLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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)
|
||||
.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);
|
||||
|
@ -930,14 +1134,14 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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)
|
||||
.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.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel1, 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(panelLeft, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelRight, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 808, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
@ -1118,11 +1322,16 @@ public class DeckEditorPanel extends javax.swing.JPanel {
|
|||
importChoose(evt);
|
||||
}//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
|
||||
private mage.client.cards.BigCard bigCard;
|
||||
private javax.swing.JButton btnAddLand;
|
||||
private javax.swing.JButton btnExit;
|
||||
private javax.swing.JButton btnExport;
|
||||
private javax.swing.JButton btnGenDeck;
|
||||
private javax.swing.JButton btnImport;
|
||||
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.DeckArea deckArea;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JSplitPane jSplitPane1;
|
||||
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 txtTimeRemaining;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
@ -1164,7 +1381,7 @@ class DeckFilter extends FileFilter {
|
|||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Deck Files";
|
||||
return "XMage's deck files (*.dck)";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1279,6 +1279,6 @@ class DeckFilter extends FileFilter {
|
|||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Deck Files";
|
||||
return "XMage's deck files (*.dck)";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ class DeckFilter extends FileFilter {
|
|||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Deck Files";
|
||||
return "XMage's deck files (*.dck)";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue