mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
remove games from list when finished + added name and owner to tables
This commit is contained in:
parent
2f515e242b
commit
017b2b4339
12 changed files with 770 additions and 624 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.1" 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">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
|
@ -23,22 +23,15 @@
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<EmptySpace pref="395" max="32767" attributes="0"/>
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="btnOK" min="-2" max="-2" attributes="0"/>
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="btnCancel" min="-2" max="-2" attributes="0"/>
|
<Component id="btnOK" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
<Component id="btnCancel" min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="lbDeckType" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="463" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
|
||||||
<Component id="cbGameType" alignment="0" max="32767" attributes="1"/>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="lblNumPlayers" min="-2" max="-2" attributes="0"/>
|
<Component id="lblNumPlayers" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="spnNumPlayers" min="-2" pref="57" max="-2" attributes="0"/>
|
<Component id="spnNumPlayers" min="-2" pref="57" max="-2" attributes="0"/>
|
||||||
|
|
@ -51,7 +44,7 @@
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="lblAttack" min="-2" max="-2" attributes="0"/>
|
<Component id="lblAttack" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="cbAttackOption" pref="235" max="32767" attributes="0"/>
|
<Component id="cbAttackOption" pref="287" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
|
@ -59,41 +52,50 @@
|
||||||
<Component id="lblNumWins" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="lblNumWins" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Component id="lblGameType" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Component id="cbDeckType" alignment="0" max="32767" attributes="1"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jSeparator2" pref="555" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="player1Panel" pref="555" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="1" attributes="0">
|
||||||
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
|
<Component id="lbDeckType" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="lblGameType" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="lblName" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
|
<Component id="cbDeckType" alignment="0" pref="487" max="32767" attributes="1"/>
|
||||||
|
<Component id="cbGameType" alignment="1" pref="487" max="32767" attributes="1"/>
|
||||||
|
<Component id="txtName" alignment="1" pref="487" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Component id="pnlOtherPlayers" alignment="1" pref="555" max="32767" attributes="0"/>
|
||||||
|
<Component id="jSeparator1" alignment="0" pref="555" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="1" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jSeparator2" pref="503" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="433" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="player1Panel" pref="503" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace pref="436" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="jSeparator1" pref="503" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="pnlOtherPlayers" alignment="0" min="-2" pref="486" max="-2" attributes="0"/>
|
|
||||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
<Group type="103" rootIndex="1" 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"/>
|
||||||
<Component id="jSeparator3" pref="503" max="32767" attributes="0"/>
|
<Component id="jSeparator3" pref="555" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
@ -103,14 +105,21 @@
|
||||||
<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"/>
|
||||||
<Component id="lbDeckType" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
<Component id="lblName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="cbDeckType" min="-2" max="-2" attributes="0"/>
|
<Component id="txtName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
</Group>
|
||||||
<Component id="lblGameType" min="-2" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="cbGameType" min="-2" max="-2" attributes="0"/>
|
<Component id="lbDeckType" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<Component id="cbDeckType" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="cbGameType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="lblGameType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
|
|
@ -144,21 +153,21 @@
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="pnlOtherPlayers" pref="97" max="32767" attributes="0"/>
|
<Component id="pnlOtherPlayers" pref="136" max="32767" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jSeparator1" pref="19" max="32767" attributes="0"/>
|
<Component id="jSeparator1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="btnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="btnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="btnOK" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="btnOK" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="-2" pref="223" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="201" max="-2" attributes="0"/>
|
||||||
<Component id="jSeparator3" min="-2" max="-2" attributes="0"/>
|
<Component id="jSeparator3" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="159" max="32767" attributes="0"/>
|
<EmptySpace pref="207" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
@ -167,7 +176,7 @@
|
||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JLabel" name="lblGameType">
|
<Component class="javax.swing.JLabel" name="lblGameType">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" value="Game Type"/>
|
<Property name="text" type="java.lang.String" value="Game Type:"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JComboBox" name="cbGameType">
|
<Component class="javax.swing.JComboBox" name="cbGameType">
|
||||||
|
|
@ -177,7 +186,7 @@
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="lbDeckType">
|
<Component class="javax.swing.JLabel" name="lbDeckType">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" value="Deck Type"/>
|
<Property name="text" type="java.lang.String" value="Deck Type:"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JComboBox" name="cbDeckType">
|
<Component class="javax.swing.JComboBox" name="cbDeckType">
|
||||||
|
|
@ -285,5 +294,15 @@
|
||||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spnNumWinsnumPlayersChanged"/>
|
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spnNumWinsnumPlayersChanged"/>
|
||||||
</Events>
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JTextField" name="txtName">
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="lblName">
|
||||||
|
<Properties>
|
||||||
|
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||||
|
<ComponentRef name="txtName"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" value="Name:"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ import javax.swing.JOptionPane;
|
||||||
import javax.swing.SpinnerNumberModel;
|
import javax.swing.SpinnerNumberModel;
|
||||||
import mage.Constants.MultiplayerAttackOption;
|
import mage.Constants.MultiplayerAttackOption;
|
||||||
import mage.Constants.RangeOfInfluence;
|
import mage.Constants.RangeOfInfluence;
|
||||||
import mage.cards.decks.DeckCardLists;
|
|
||||||
import mage.client.components.MageComponents;
|
import mage.client.components.MageComponents;
|
||||||
import mage.client.remote.Session;
|
import mage.client.remote.Session;
|
||||||
import mage.client.table.TablePlayerPanel;
|
import mage.client.table.TablePlayerPanel;
|
||||||
|
|
@ -112,10 +111,12 @@ public class NewTableDialog extends MageDialog {
|
||||||
jLabel2 = new javax.swing.JLabel();
|
jLabel2 = new javax.swing.JLabel();
|
||||||
lblNumWins = new javax.swing.JLabel();
|
lblNumWins = new javax.swing.JLabel();
|
||||||
spnNumWins = new javax.swing.JSpinner();
|
spnNumWins = new javax.swing.JSpinner();
|
||||||
|
txtName = new javax.swing.JTextField();
|
||||||
|
lblName = new javax.swing.JLabel();
|
||||||
|
|
||||||
setTitle("New Table");
|
setTitle("New Table");
|
||||||
|
|
||||||
lblGameType.setText("Game Type");
|
lblGameType.setText("Game Type:");
|
||||||
|
|
||||||
cbGameType.addActionListener(new java.awt.event.ActionListener() {
|
cbGameType.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
|
@ -123,7 +124,7 @@ public class NewTableDialog extends MageDialog {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
lbDeckType.setText("Deck Type");
|
lbDeckType.setText("Deck Type:");
|
||||||
|
|
||||||
btnOK.setText("OK");
|
btnOK.setText("OK");
|
||||||
btnOK.addActionListener(new java.awt.event.ActionListener() {
|
btnOK.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
|
@ -171,25 +172,22 @@ public class NewTableDialog extends MageDialog {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
lblName.setLabelFor(txtName);
|
||||||
|
lblName.setText("Name:");
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addContainerGap(395, Short.MAX_VALUE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(btnOK)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(btnCancel)
|
|
||||||
.addContainerGap())
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(lbDeckType)
|
|
||||||
.addContainerGap(463, Short.MAX_VALUE))
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
||||||
.addComponent(cbGameType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(btnOK)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(btnCancel))
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(lblNumPlayers)
|
.addComponent(lblNumPlayers)
|
||||||
.addComponent(spnNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(spnNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
|
@ -200,52 +198,61 @@ public class NewTableDialog extends MageDialog {
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(lblAttack)
|
.addComponent(lblAttack)
|
||||||
.addComponent(cbAttackOption, 0, 235, Short.MAX_VALUE))
|
.addComponent(cbAttackOption, 0, 287, Short.MAX_VALUE))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(spnNumWins, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(spnNumWins, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addComponent(lblNumWins)))
|
.addComponent(lblNumWins)))
|
||||||
.addComponent(lblGameType)
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(cbDeckType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addContainerGap()
|
||||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
.addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE)
|
.addComponent(jLabel1))
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(player1Panel, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE))
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addComponent(jLabel2))
|
||||||
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addGap(16, 16, 16)
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
|
.addComponent(lbDeckType)
|
||||||
|
.addComponent(lblGameType)
|
||||||
|
.addComponent(lblName))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
|
.addComponent(cbDeckType, javax.swing.GroupLayout.Alignment.LEADING, 0, 487, Short.MAX_VALUE)
|
||||||
|
.addComponent(cbGameType, 0, 487, Short.MAX_VALUE)
|
||||||
|
.addComponent(txtName, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)))
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE)
|
||||||
|
.addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE))))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(jLabel1)
|
|
||||||
.addContainerGap(433, Short.MAX_VALUE))
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(player1Panel, javax.swing.GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE)
|
|
||||||
.addContainerGap())
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(jLabel2)
|
|
||||||
.addContainerGap(436, Short.MAX_VALUE))
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addContainerGap()
|
|
||||||
.addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE)
|
|
||||||
.addContainerGap())
|
|
||||||
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 503, Short.MAX_VALUE)
|
.addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE)
|
||||||
.addContainerGap()))
|
.addContainerGap()))
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(lbDeckType)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addGap(0, 0, 0)
|
.addComponent(lblName)
|
||||||
.addComponent(cbDeckType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(lblGameType)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addGap(0, 0, 0)
|
.addComponent(lbDeckType)
|
||||||
.addComponent(cbGameType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(cbDeckType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(cbGameType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(lblGameType))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
|
|
@ -274,19 +281,19 @@ public class NewTableDialog extends MageDialog {
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
|
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE)
|
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(btnCancel)
|
.addComponent(btnCancel)
|
||||||
.addComponent(btnOK))
|
.addComponent(btnOK))
|
||||||
.addGap(6, 6, 6))
|
.addContainerGap())
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGap(223, 223, 223)
|
.addGap(201, 201, 201)
|
||||||
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(159, Short.MAX_VALUE)))
|
.addContainerGap(207, Short.MAX_VALUE)))
|
||||||
);
|
);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
|
|
@ -300,7 +307,7 @@ public class NewTableDialog extends MageDialog {
|
||||||
|
|
||||||
private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
|
private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
|
||||||
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
|
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
|
||||||
MatchOptions options = new MatchOptions("Quick Start Game", gameType.getName());
|
MatchOptions options = new MatchOptions(this.txtName.getText(), gameType.getName());
|
||||||
options.getPlayerTypes().add("Human");
|
options.getPlayerTypes().add("Human");
|
||||||
for (TablePlayerPanel player: players) {
|
for (TablePlayerPanel player: players) {
|
||||||
options.getPlayerTypes().add(player.getPlayerType());
|
options.getPlayerTypes().add(player.getPlayerType());
|
||||||
|
|
@ -447,6 +454,7 @@ public class NewTableDialog extends MageDialog {
|
||||||
private javax.swing.JLabel lbDeckType;
|
private javax.swing.JLabel lbDeckType;
|
||||||
private javax.swing.JLabel lblAttack;
|
private javax.swing.JLabel lblAttack;
|
||||||
private javax.swing.JLabel lblGameType;
|
private javax.swing.JLabel lblGameType;
|
||||||
|
private javax.swing.JLabel lblName;
|
||||||
private javax.swing.JLabel lblNumPlayers;
|
private javax.swing.JLabel lblNumPlayers;
|
||||||
private javax.swing.JLabel lblNumWins;
|
private javax.swing.JLabel lblNumWins;
|
||||||
private javax.swing.JLabel lblRange;
|
private javax.swing.JLabel lblRange;
|
||||||
|
|
@ -454,6 +462,7 @@ public class NewTableDialog extends MageDialog {
|
||||||
private javax.swing.JPanel pnlOtherPlayers;
|
private javax.swing.JPanel pnlOtherPlayers;
|
||||||
private javax.swing.JSpinner spnNumPlayers;
|
private javax.swing.JSpinner spnNumPlayers;
|
||||||
private javax.swing.JSpinner spnNumWins;
|
private javax.swing.JSpinner spnNumWins;
|
||||||
|
private javax.swing.JTextField txtName;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,27 +22,35 @@
|
||||||
<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="1" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="pnlPacks" alignment="1" pref="525" max="32767" attributes="0"/>
|
|
||||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||||
|
<Component id="pnlPacks" alignment="1" pref="563" max="32767" attributes="0"/>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="spnNumPlayers" min="-2" pref="45" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="pnlDraftOptions" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
|
<Component id="lblName" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="jLabel1" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
|
<Component id="txtName" pref="470" max="32767" attributes="0"/>
|
||||||
|
<Component id="cbTournamentType" alignment="0" pref="470" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Component id="btnOk" min="-2" max="-2" attributes="0"/>
|
<Component id="btnOk" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="btnCancel" min="-2" max="-2" attributes="0"/>
|
<Component id="btnCancel" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="jLabel1" min="-2" pref="113" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="cbTournamentType" pref="408" max="32767" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Group type="102" alignment="0" attributes="0">
|
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
|
||||||
<Component id="spnNumPlayers" min="-2" pref="45" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
|
||||||
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
@ -51,28 +59,35 @@
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="txtName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="lblName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="cbTournamentType" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="cbTournamentType" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
|
||||||
<Component id="pnlPacks" pref="49" max="32767" attributes="0"/>
|
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Component id="pnlPacks" pref="57" max="32767" attributes="0"/>
|
||||||
<Component id="spnNumPlayers" alignment="3" min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="spnNumPlayers" alignment="0" max="32767" attributes="1"/>
|
||||||
|
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Component id="pnlDraftOptions" max="32767" attributes="1"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jPanel1" max="32767" attributes="0"/>
|
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="3" attributes="0">
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<Component id="btnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="btnOk" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="btnOk" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="btnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
|
|
@ -139,15 +154,15 @@
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<Group type="103" groupAlignment="1" attributes="0">
|
<Group type="103" groupAlignment="1" attributes="0">
|
||||||
<Component id="pnlOtherPlayers" alignment="0" pref="525" max="32767" attributes="0"/>
|
<Component id="pnlOtherPlayers" alignment="0" pref="563" max="32767" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="445" max="-2" attributes="0"/>
|
<EmptySpace pref="483" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="txtPlayer1Name" pref="490" max="32767" attributes="0"/>
|
<Component id="txtPlayer1Name" pref="528" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||||
|
|
@ -164,7 +179,7 @@
|
||||||
<Component id="txtPlayer1Name" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="txtPlayer1Name" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
<Component id="pnlOtherPlayers" pref="60" max="32767" attributes="0"/>
|
<Component id="pnlOtherPlayers" pref="91" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
|
|
@ -206,5 +221,55 @@
|
||||||
<Property name="text" type="java.lang.String" value="Packs"/>
|
<Property name="text" type="java.lang.String" value="Packs"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JTextField" name="txtName">
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="lblName">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Name:"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Container class="javax.swing.JPanel" name="pnlDraftOptions">
|
||||||
|
|
||||||
|
<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="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
<Component id="cbDraftTiming" min="-2" pref="107" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
<DimensionLayout dim="1">
|
||||||
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
|
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="cbDraftTiming" alignment="3" max="32767" attributes="1"/>
|
||||||
|
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
</DimensionLayout>
|
||||||
|
</Layout>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Timing:"/>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JComboBox" name="cbDraftTiming">
|
||||||
|
<Properties>
|
||||||
|
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||||
|
<StringArray count="4">
|
||||||
|
<StringItem index="0" value="Item 1"/>
|
||||||
|
<StringItem index="1" value="Item 2"/>
|
||||||
|
<StringItem index="2" value="Item 3"/>
|
||||||
|
<StringItem index="3" value="Item 4"/>
|
||||||
|
</StringArray>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,11 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
txtPlayer1Name = new javax.swing.JTextField();
|
txtPlayer1Name = new javax.swing.JTextField();
|
||||||
pnlOtherPlayers = new javax.swing.JPanel();
|
pnlOtherPlayers = new javax.swing.JPanel();
|
||||||
jLabel5 = new javax.swing.JLabel();
|
jLabel5 = new javax.swing.JLabel();
|
||||||
|
txtName = new javax.swing.JTextField();
|
||||||
|
lblName = new javax.swing.JLabel();
|
||||||
pnlDraftOptions = new javax.swing.JPanel();
|
pnlDraftOptions = new javax.swing.JPanel();
|
||||||
cbDraftTiming = new javax.swing.JComboBox();
|
|
||||||
jLabel6 = new javax.swing.JLabel();
|
jLabel6 = new javax.swing.JLabel();
|
||||||
|
cbDraftTiming = new javax.swing.JComboBox();
|
||||||
|
|
||||||
setTitle("New Tournament");
|
setTitle("New Tournament");
|
||||||
|
|
||||||
|
|
@ -165,14 +167,14 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 525, Short.MAX_VALUE)
|
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
||||||
.addComponent(jLabel3)
|
.addComponent(jLabel3)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 445, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 483, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
|
||||||
.addComponent(jLabel4)
|
.addComponent(jLabel4)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(txtPlayer1Name, javax.swing.GroupLayout.DEFAULT_SIZE, 490, Short.MAX_VALUE)))
|
.addComponent(txtPlayer1Name, javax.swing.GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
jPanel1Layout.setVerticalGroup(
|
jPanel1Layout.setVerticalGroup(
|
||||||
|
|
@ -184,30 +186,33 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
.addComponent(jLabel4)
|
.addComponent(jLabel4)
|
||||||
.addComponent(txtPlayer1Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(txtPlayer1Name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
|
.addComponent(pnlOtherPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
|
|
||||||
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11));
|
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11));
|
||||||
jLabel5.setText("Packs");
|
jLabel5.setText("Packs");
|
||||||
|
|
||||||
cbDraftTiming.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
lblName.setText("Name:");
|
||||||
|
|
||||||
jLabel6.setText("Timing:");
|
jLabel6.setText("Timing:");
|
||||||
|
|
||||||
|
cbDraftTiming.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||||
|
|
||||||
javax.swing.GroupLayout pnlDraftOptionsLayout = new javax.swing.GroupLayout(pnlDraftOptions);
|
javax.swing.GroupLayout pnlDraftOptionsLayout = new javax.swing.GroupLayout(pnlDraftOptions);
|
||||||
pnlDraftOptions.setLayout(pnlDraftOptionsLayout);
|
pnlDraftOptions.setLayout(pnlDraftOptionsLayout);
|
||||||
pnlDraftOptionsLayout.setHorizontalGroup(
|
pnlDraftOptionsLayout.setHorizontalGroup(
|
||||||
pnlDraftOptionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
pnlDraftOptionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(pnlDraftOptionsLayout.createSequentialGroup()
|
.addGroup(pnlDraftOptionsLayout.createSequentialGroup()
|
||||||
|
.addContainerGap()
|
||||||
.addComponent(jLabel6)
|
.addComponent(jLabel6)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(cbDraftTiming, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(cbDraftTiming, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addContainerGap(232, Short.MAX_VALUE))
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
);
|
);
|
||||||
pnlDraftOptionsLayout.setVerticalGroup(
|
pnlDraftOptionsLayout.setVerticalGroup(
|
||||||
pnlDraftOptionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
pnlDraftOptionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(pnlDraftOptionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(pnlDraftOptionsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(cbDraftTiming, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(cbDraftTiming)
|
||||||
.addComponent(jLabel6))
|
.addComponent(jLabel6))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -215,52 +220,59 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(pnlPacks, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 525, Short.MAX_VALUE)
|
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
|
||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
.addComponent(btnOk)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(btnCancel))
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
||||||
.addComponent(cbTournamentType, 0, 408, Short.MAX_VALUE))
|
|
||||||
.addComponent(jLabel5)
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(spnNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(spnNumPlayers, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(pnlDraftOptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
.addComponent(pnlDraftOptions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
|
.addComponent(lblName)
|
||||||
|
.addComponent(jLabel1))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||||
|
.addComponent(txtName, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE)
|
||||||
|
.addComponent(cbTournamentType, javax.swing.GroupLayout.Alignment.LEADING, 0, 470, Short.MAX_VALUE)))
|
||||||
|
.addGroup(layout.createSequentialGroup()
|
||||||
|
.addComponent(btnOk)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(btnCancel)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
|
.addComponent(lblName))
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addComponent(cbTournamentType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
.addComponent(cbTournamentType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||||
.addGap(3, 3, 3)
|
|
||||||
.addComponent(jLabel5)
|
|
||||||
.addGap(1, 1, 1)
|
|
||||||
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE)
|
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(jLabel5)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
|
.addComponent(pnlPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
|
||||||
|
.addGap(11, 11, 11)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(pnlDraftOptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(spnNumPlayers)
|
.addComponent(spnNumPlayers)
|
||||||
.addComponent(jLabel2)))
|
.addComponent(jLabel2))
|
||||||
|
.addComponent(pnlDraftOptions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addComponent(btnCancel)
|
.addComponent(btnOk)
|
||||||
.addComponent(btnOk))
|
.addComponent(btnCancel)))
|
||||||
.addContainerGap())
|
|
||||||
);
|
);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
|
|
@ -272,7 +284,7 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
|
|
||||||
private void btnOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOkActionPerformed
|
private void btnOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOkActionPerformed
|
||||||
TournamentTypeView tournamentType = (TournamentTypeView) cbTournamentType.getSelectedItem();
|
TournamentTypeView tournamentType = (TournamentTypeView) cbTournamentType.getSelectedItem();
|
||||||
TournamentOptions tOptions = new TournamentOptions(tournamentType.getName());
|
TournamentOptions tOptions = new TournamentOptions(this.txtName.getText());
|
||||||
tOptions.setTournamentType(tournamentType.getName());
|
tOptions.setTournamentType(tournamentType.getName());
|
||||||
tOptions.getPlayerTypes().add("Human");
|
tOptions.getPlayerTypes().add("Human");
|
||||||
for (TournamentPlayerPanel player: players) {
|
for (TournamentPlayerPanel player: players) {
|
||||||
|
|
@ -342,6 +354,10 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createPacks(int numPacks) {
|
private void createPacks(int numPacks) {
|
||||||
|
while (packs.size() > numPacks) {
|
||||||
|
pnlPacks.remove(packs.get(packs.size() - 1));
|
||||||
|
packs.remove(packs.size() - 1);
|
||||||
|
}
|
||||||
while (packs.size() < numPacks) {
|
while (packs.size() < numPacks) {
|
||||||
JComboBox pack = new JComboBox();
|
JComboBox pack = new JComboBox();
|
||||||
pack.setModel(new DefaultComboBoxModel(Sets.getInstance().values().toArray()));
|
pack.setModel(new DefaultComboBoxModel(Sets.getInstance().values().toArray()));
|
||||||
|
|
@ -438,10 +454,12 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
private javax.swing.JLabel jLabel5;
|
private javax.swing.JLabel jLabel5;
|
||||||
private javax.swing.JLabel jLabel6;
|
private javax.swing.JLabel jLabel6;
|
||||||
private javax.swing.JPanel jPanel1;
|
private javax.swing.JPanel jPanel1;
|
||||||
|
private javax.swing.JLabel lblName;
|
||||||
private javax.swing.JPanel pnlDraftOptions;
|
private javax.swing.JPanel pnlDraftOptions;
|
||||||
private javax.swing.JPanel pnlOtherPlayers;
|
private javax.swing.JPanel pnlOtherPlayers;
|
||||||
private javax.swing.JPanel pnlPacks;
|
private javax.swing.JPanel pnlPacks;
|
||||||
private javax.swing.JSpinner spnNumPlayers;
|
private javax.swing.JSpinner spnNumPlayers;
|
||||||
|
private javax.swing.JTextField txtName;
|
||||||
private javax.swing.JTextField txtPlayer1Name;
|
private javax.swing.JTextField txtPlayer1Name;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,10 +93,10 @@ public class TablesPanel extends javax.swing.JPanel implements Observer {
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
int modelRow = Integer.valueOf( e.getActionCommand() );
|
int modelRow = Integer.valueOf( e.getActionCommand() );
|
||||||
UUID tableId = UUID.fromString((String)tableModel.getValueAt(modelRow, 0));
|
UUID tableId = (UUID)tableModel.getValueAt(modelRow, 8);
|
||||||
UUID gameId = (UUID)tableModel.getValueAt(modelRow, 6);
|
UUID gameId = (UUID)tableModel.getValueAt(modelRow, 7);
|
||||||
String state = (String)tableModel.getValueAt(modelRow, 4);
|
String state = (String)tableModel.getValueAt(modelRow, 5);
|
||||||
boolean isTournament = (Boolean)tableModel.getValueAt(modelRow, 5);
|
boolean isTournament = (Boolean)tableModel.getValueAt(modelRow, 6);
|
||||||
|
|
||||||
if (state.equals("Join")) {
|
if (state.equals("Join")) {
|
||||||
if (isTournament) {
|
if (isTournament) {
|
||||||
|
|
@ -120,7 +120,7 @@ public class TablesPanel extends javax.swing.JPanel implements Observer {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtonColumn buttonColumn = new ButtonColumn(tableTables, join, 4);
|
ButtonColumn buttonColumn = new ButtonColumn(tableTables, join, 5);
|
||||||
|
|
||||||
jSplitPane1.setOpaque(false);
|
jSplitPane1.setOpaque(false);
|
||||||
jScrollPane1.setOpaque(false);
|
jScrollPane1.setOpaque(false);
|
||||||
|
|
@ -344,7 +344,7 @@ public class TablesPanel extends javax.swing.JPanel implements Observer {
|
||||||
}
|
}
|
||||||
|
|
||||||
class TableTableModel extends AbstractTableModel {
|
class TableTableModel extends AbstractTableModel {
|
||||||
private String[] columnNames = new String[]{"Table Id", "Game Type", "Deck Type", "Status", "Action"};
|
private String[] columnNames = new String[]{"Table Name", "Owner", "Game Type", "Deck Type", "Status", "Action"};
|
||||||
private TableView[] tables = new TableView[0];
|
private TableView[] tables = new TableView[0];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -367,14 +367,16 @@ class TableTableModel extends AbstractTableModel {
|
||||||
public Object getValueAt(int arg0, int arg1) {
|
public Object getValueAt(int arg0, int arg1) {
|
||||||
switch (arg1) {
|
switch (arg1) {
|
||||||
case 0:
|
case 0:
|
||||||
return tables[arg0].getTableId().toString();
|
return tables[arg0].getTableName();
|
||||||
case 1:
|
case 1:
|
||||||
return tables[arg0].getGameType().toString();
|
return tables[arg0].getControllerName();
|
||||||
case 2:
|
case 2:
|
||||||
return tables[arg0].getDeckType().toString();
|
return tables[arg0].getGameType().toString();
|
||||||
case 3:
|
case 3:
|
||||||
return tables[arg0].getTableState().toString();
|
return tables[arg0].getDeckType().toString();
|
||||||
case 4:
|
case 4:
|
||||||
|
return tables[arg0].getTableState().toString();
|
||||||
|
case 5:
|
||||||
switch (tables[arg0].getTableState()) {
|
switch (tables[arg0].getTableState()) {
|
||||||
case WAITING:
|
case WAITING:
|
||||||
return "Join";
|
return "Join";
|
||||||
|
|
@ -385,12 +387,14 @@ class TableTableModel extends AbstractTableModel {
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
case 5:
|
|
||||||
return tables[arg0].isTournament();
|
|
||||||
case 6:
|
case 6:
|
||||||
|
return tables[arg0].isTournament();
|
||||||
|
case 7:
|
||||||
if (!tables[arg0].getGames().isEmpty())
|
if (!tables[arg0].getGames().isEmpty())
|
||||||
return tables[arg0].getGames().get(0);
|
return tables[arg0].getGames().get(0);
|
||||||
return null;
|
return null;
|
||||||
|
case 8:
|
||||||
|
return tables[arg0].getTableId();
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
@ -412,7 +416,7 @@ class TableTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||||
if (columnIndex != 4)
|
if (columnIndex != 5)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@ public class TableView implements Serializable {
|
||||||
private UUID tableId;
|
private UUID tableId;
|
||||||
private String gameType;
|
private String gameType;
|
||||||
private String deckType;
|
private String deckType;
|
||||||
|
private String tableName;
|
||||||
|
private String controllerName;
|
||||||
private TableState tableState;
|
private TableState tableState;
|
||||||
private boolean isTournament;
|
private boolean isTournament;
|
||||||
private List<SeatView> seats = new ArrayList<SeatView>();
|
private List<SeatView> seats = new ArrayList<SeatView>();
|
||||||
|
|
@ -55,6 +57,8 @@ public class TableView implements Serializable {
|
||||||
public TableView(Table table) {
|
public TableView(Table table) {
|
||||||
this.tableId = table.getId();
|
this.tableId = table.getId();
|
||||||
this.gameType = table.getGameType();
|
this.gameType = table.getGameType();
|
||||||
|
this.tableName = table.getName();
|
||||||
|
this.controllerName = table.getControllerName();
|
||||||
this.deckType = table.getDeckType();
|
this.deckType = table.getDeckType();
|
||||||
this.tableState = table.getState();
|
this.tableState = table.getState();
|
||||||
this.isTournament = table.isTournament();
|
this.isTournament = table.isTournament();
|
||||||
|
|
@ -72,6 +76,14 @@ public class TableView implements Serializable {
|
||||||
return tableId;
|
return tableId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTableName() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getControllerName() {
|
||||||
|
return controllerName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGameType() {
|
public String getGameType() {
|
||||||
return gameType;
|
return gameType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#default levels
|
#default levels
|
||||||
log4j.rootLogger=debug, logfile
|
log4j.rootLogger=debug, console
|
||||||
|
|
||||||
#console log
|
#console log
|
||||||
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
log4j.appender.console=org.apache.log4j.ConsoleAppender
|
||||||
|
|
|
||||||
|
|
@ -66,26 +66,29 @@ public class TableController {
|
||||||
|
|
||||||
private UUID sessionId;
|
private UUID sessionId;
|
||||||
private UUID chatId;
|
private UUID chatId;
|
||||||
|
private String controllerName;
|
||||||
private Table table;
|
private Table table;
|
||||||
private Match match;
|
private Match match;
|
||||||
private MatchOptions options;
|
private MatchOptions options;
|
||||||
private Tournament tournament;
|
private Tournament tournament;
|
||||||
private ConcurrentHashMap<UUID, UUID> sessionPlayerMap = new ConcurrentHashMap<UUID, UUID>();
|
private ConcurrentHashMap<UUID, UUID> sessionPlayerMap = new ConcurrentHashMap<UUID, UUID>();
|
||||||
|
|
||||||
public TableController(UUID sessionId, MatchOptions options) {
|
public TableController(UUID roomId, UUID sessionId, MatchOptions options) {
|
||||||
this.sessionId = sessionId;
|
this.sessionId = sessionId;
|
||||||
chatId = ChatManager.getInstance().createChatSession();
|
chatId = ChatManager.getInstance().createChatSession();
|
||||||
this.options = options;
|
this.options = options;
|
||||||
match = GameFactory.getInstance().createMatch(options.getGameType(), options);
|
match = GameFactory.getInstance().createMatch(options.getGameType(), options);
|
||||||
table = new Table(options.getGameType(), options.getName(), DeckValidatorFactory.getInstance().createDeckValidator(options.getDeckType()), options.getPlayerTypes(), match);
|
controllerName = SessionManager.getInstance().getSession(sessionId).getUsername();
|
||||||
|
table = new Table(roomId, options.getGameType(), options.getName(), controllerName, DeckValidatorFactory.getInstance().createDeckValidator(options.getDeckType()), options.getPlayerTypes(), match);
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TableController(UUID sessionId, TournamentOptions options) {
|
public TableController(UUID roomId, UUID sessionId, TournamentOptions options) {
|
||||||
this.sessionId = sessionId;
|
this.sessionId = sessionId;
|
||||||
chatId = ChatManager.getInstance().createChatSession();
|
chatId = ChatManager.getInstance().createChatSession();
|
||||||
tournament = TournamentFactory.getInstance().createTournament(options.getTournamentType(), options);
|
tournament = TournamentFactory.getInstance().createTournament(options.getTournamentType(), options);
|
||||||
table = new Table(options.getTournamentType(), options.getName(), DeckValidatorFactory.getInstance().createDeckValidator(options.getMatchOptions().getDeckType()), options.getPlayerTypes(), tournament);
|
controllerName = SessionManager.getInstance().getSession(sessionId).getUsername();
|
||||||
|
table = new Table(roomId, options.getTournamentType(), options.getName(), controllerName, DeckValidatorFactory.getInstance().createDeckValidator(options.getMatchOptions().getDeckType()), options.getPlayerTypes(), tournament);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
|
|
@ -320,7 +323,7 @@ public class TableController {
|
||||||
UUID choosingPlayerId = match.getChooser();
|
UUID choosingPlayerId = match.getChooser();
|
||||||
match.endGame();
|
match.endGame();
|
||||||
table.endGame();
|
table.endGame();
|
||||||
GameManager.getInstance().saveGame(match.getGame().getId());
|
// GameManager.getInstance().saveGame(match.getGame().getId());
|
||||||
GameManager.getInstance().removeGame(match.getGame().getId());
|
GameManager.getInstance().removeGame(match.getGame().getId());
|
||||||
try {
|
try {
|
||||||
if (!match.isMatchOver()) {
|
if (!match.isMatchOver()) {
|
||||||
|
|
@ -328,6 +331,9 @@ public class TableController {
|
||||||
match.sideboard();
|
match.sideboard();
|
||||||
startGame(choosingPlayerId);
|
startGame(choosingPlayerId);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
GamesRoomManager.getInstance().getRoom(table.getRoomId()).removeTable(sessionId, table.getId());
|
||||||
|
}
|
||||||
} catch (GameException ex) {
|
} catch (GameException ex) {
|
||||||
logger.fatal(null, ex);
|
logger.fatal(null, ex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,22 +58,22 @@ public class TableManager {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Table createTable(UUID sessionId, MatchOptions options) {
|
public Table createTable(UUID roomId, UUID sessionId, MatchOptions options) {
|
||||||
TableController tableController = new TableController(sessionId, options);
|
TableController tableController = new TableController(roomId, sessionId, options);
|
||||||
controllers.put(tableController.getTable().getId(), tableController);
|
controllers.put(tableController.getTable().getId(), tableController);
|
||||||
tables.put(tableController.getTable().getId(), tableController.getTable());
|
tables.put(tableController.getTable().getId(), tableController.getTable());
|
||||||
return tableController.getTable();
|
return tableController.getTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Table createTable(MatchOptions options) {
|
public Table createTable(UUID roomId, MatchOptions options) {
|
||||||
TableController tableController = new TableController(UUID.randomUUID(), options);
|
TableController tableController = new TableController(roomId, UUID.randomUUID(), options);
|
||||||
controllers.put(tableController.getTable().getId(), tableController);
|
controllers.put(tableController.getTable().getId(), tableController);
|
||||||
tables.put(tableController.getTable().getId(), tableController.getTable());
|
tables.put(tableController.getTable().getId(), tableController.getTable());
|
||||||
return tableController.getTable();
|
return tableController.getTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Table createTournamentTable(UUID sessionId, TournamentOptions options) {
|
public Table createTournamentTable(UUID roomId, UUID sessionId, TournamentOptions options) {
|
||||||
TableController tableController = new TableController(sessionId, options);
|
TableController tableController = new TableController(roomId, sessionId, options);
|
||||||
controllers.put(tableController.getTable().getId(), tableController);
|
controllers.put(tableController.getTable().getId(), tableController);
|
||||||
tables.put(tableController.getTable().getId(), tableController.getTable());
|
tables.put(tableController.getTable().getId(), tableController.getTable());
|
||||||
return tableController.getTable();
|
return tableController.getTable();
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public class GamesRoomImpl extends RoomImpl implements GamesRoom, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableView createTable(UUID sessionId, MatchOptions options) {
|
public TableView createTable(UUID sessionId, MatchOptions options) {
|
||||||
Table table = TableManager.getInstance().createTable(sessionId, options);
|
Table table = TableManager.getInstance().createTable(this.getRoomId(), sessionId, options);
|
||||||
tables.put(table.getId(), table);
|
tables.put(table.getId(), table);
|
||||||
return new TableView(table);
|
return new TableView(table);
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +89,7 @@ public class GamesRoomImpl extends RoomImpl implements GamesRoom, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableView createTournamentTable(UUID sessionId, TournamentOptions options) {
|
public TableView createTournamentTable(UUID sessionId, TournamentOptions options) {
|
||||||
Table table = TableManager.getInstance().createTournamentTable(sessionId, options);
|
Table table = TableManager.getInstance().createTournamentTable(this.getRoomId(), sessionId, options);
|
||||||
tables.put(table.getId(), table);
|
tables.put(table.getId(), table);
|
||||||
return new TableView(table);
|
return new TableView(table);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ import mage.game.tournament.TournamentPairing;
|
||||||
import mage.game.tournament.TournamentPlayer;
|
import mage.game.tournament.TournamentPlayer;
|
||||||
import mage.server.ChatManager;
|
import mage.server.ChatManager;
|
||||||
import mage.server.TableManager;
|
import mage.server.TableManager;
|
||||||
|
import mage.server.game.GamesRoomManager;
|
||||||
import mage.server.util.ThreadExecutor;
|
import mage.server.util.ThreadExecutor;
|
||||||
import mage.view.ChatMessage.MessageColor;
|
import mage.view.ChatMessage.MessageColor;
|
||||||
import mage.view.TournamentView;
|
import mage.view.TournamentView;
|
||||||
|
|
@ -169,7 +170,7 @@ public class TournamentController {
|
||||||
private void startMatch(TournamentPairing pair, MatchOptions matchOptions) {
|
private void startMatch(TournamentPairing pair, MatchOptions matchOptions) {
|
||||||
try {
|
try {
|
||||||
TableManager tableManager = TableManager.getInstance();
|
TableManager tableManager = TableManager.getInstance();
|
||||||
Table table = tableManager.createTable(matchOptions);
|
Table table = tableManager.createTable(GamesRoomManager.getInstance().getMainRoomId(), matchOptions);
|
||||||
TournamentPlayer player1 = pair.getPlayer1();
|
TournamentPlayer player1 = pair.getPlayer1();
|
||||||
TournamentPlayer player2 = pair.getPlayer2();
|
TournamentPlayer player2 = pair.getPlayer2();
|
||||||
tableManager.addPlayer(getPlayerSessionId(player1.getPlayer().getId()), table.getId(), player1.getPlayer(), player1.getPlayerType(), player1.getDeck());
|
tableManager.addPlayer(getPlayerSessionId(player1.getPlayer().getId()), table.getId(), player1.getPlayer(), player1.getPlayerType(), player1.getDeck());
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,9 @@ import mage.players.Player;
|
||||||
public class Table implements Serializable {
|
public class Table implements Serializable {
|
||||||
|
|
||||||
private UUID tableId;
|
private UUID tableId;
|
||||||
|
private UUID roomId;
|
||||||
private String name;
|
private String name;
|
||||||
|
private String controllerName;
|
||||||
private String gameType;
|
private String gameType;
|
||||||
private Seat[] seats;
|
private Seat[] seats;
|
||||||
private int numSeats;
|
private int numSeats;
|
||||||
|
|
@ -59,23 +61,25 @@ public class Table implements Serializable {
|
||||||
|
|
||||||
protected TableEventSource tableEventSource = new TableEventSource();
|
protected TableEventSource tableEventSource = new TableEventSource();
|
||||||
|
|
||||||
public Table(String gameType, String name, DeckValidator validator, List<String> playerTypes, Tournament tournament) {
|
public Table(UUID roomId, String gameType, String name, String controllerName, DeckValidator validator, List<String> playerTypes, Tournament tournament) {
|
||||||
this(gameType, name, validator, playerTypes);
|
this(roomId, gameType, name, controllerName, validator, playerTypes);
|
||||||
this.tournament = tournament;
|
this.tournament = tournament;
|
||||||
this.isTournament = true;
|
this.isTournament = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Table(String gameType, String name, DeckValidator validator, List<String> playerTypes, Match match) {
|
public Table(UUID roomId, String gameType, String name, String controllerName, DeckValidator validator, List<String> playerTypes, Match match) {
|
||||||
this(gameType, name, validator, playerTypes);
|
this(roomId, gameType, name, controllerName, validator, playerTypes);
|
||||||
this.match = match;
|
this.match = match;
|
||||||
this.isTournament = false;
|
this.isTournament = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Table(String gameType, String name, DeckValidator validator, List<String> playerTypes) {
|
protected Table(UUID roomId, String gameType, String name, String controllerName, DeckValidator validator, List<String> playerTypes) {
|
||||||
tableId = UUID.randomUUID();
|
tableId = UUID.randomUUID();
|
||||||
|
this.roomId = roomId;
|
||||||
this.numSeats = playerTypes.size();
|
this.numSeats = playerTypes.size();
|
||||||
this.gameType = gameType;
|
this.gameType = gameType;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.controllerName = controllerName;
|
||||||
createSeats(playerTypes);
|
createSeats(playerTypes);
|
||||||
this.validator = validator;
|
this.validator = validator;
|
||||||
}
|
}
|
||||||
|
|
@ -93,6 +97,10 @@ public class Table implements Serializable {
|
||||||
return tableId;
|
return tableId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UUID getRoomId() {
|
||||||
|
return roomId;
|
||||||
|
}
|
||||||
|
|
||||||
public void initGame() {
|
public void initGame() {
|
||||||
state = TableState.DUELING;
|
state = TableState.DUELING;
|
||||||
}
|
}
|
||||||
|
|
@ -194,4 +202,8 @@ public class Table implements Serializable {
|
||||||
return tournament;
|
return tournament;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getControllerName() {
|
||||||
|
return controllerName;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue