mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Added display of player order to the draft panel. Added tray info for next card to pick if the XMage window is not active.
This commit is contained in:
parent
8e0dfcda80
commit
18d71a9377
6 changed files with 676 additions and 117 deletions
|
@ -40,6 +40,7 @@ public class MageTray {
|
|||
trayIcon.setImageAutoSize(true);
|
||||
|
||||
trayIcon.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
stopBlink();
|
||||
MageFrame frame = MageFrame.getInstance();
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="draftLeftPane" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="draftPicks" pref="582" max="32767" attributes="0"/>
|
||||
<Component id="draftPicks" pref="740" max="32767" attributes="0"/>
|
||||
<Component id="draftBooster" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
|
@ -32,10 +32,10 @@
|
|||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="draftLeftPane" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="draftLeftPane" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="draftPicks" pref="106" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="draftPicks" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="draftBooster" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
|
@ -49,69 +49,60 @@
|
|||
<BevelBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" 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"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblCardNo" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="1">
|
||||
<Component id="lblPack2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtPack2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lblPack1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtPack1" min="-2" pref="165" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblPack3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblTimeRemaining" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtCardNo" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtPack3" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtTimeRemaining" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="lblCardNo" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="1">
|
||||
<Component id="lblPack2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtPack2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lblPack1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtPack1" min="-2" pref="165" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lblPack3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtCardNo" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtPack3" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="chkPack3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkPack2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkPack1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="chkPack1" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="btnQuitTournament" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="txtTimeRemaining" min="-2" pref="94" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lblMessage" alignment="0" pref="231" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lblMessage" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="bigCard" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="64" max="-2" attributes="0"/>
|
||||
<Component id="btnQuitTournament" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="bigCard" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
|
@ -120,7 +111,10 @@
|
|||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="btnQuitTournament" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="btnQuitTournament" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtTimeRemaining" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="chkPack1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
|
@ -147,13 +141,10 @@
|
|||
<Component id="txtCardNo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtTimeRemaining" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblTimeRemaining" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblMessage" pref="24" max="32767" attributes="0"/>
|
||||
<Component id="lblMessage" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" pref="148" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="55" max="32767" attributes="0"/>
|
||||
<Component id="bigCard" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
|
@ -227,11 +218,6 @@
|
|||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblTimeRemaining">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Time:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtTimeRemaining">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
|
@ -249,10 +235,297 @@
|
|||
<Component class="javax.swing.JLabel" name="lblMessage">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo">
|
||||
<BevelBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<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.BevelBorderInfo">
|
||||
<BevelBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Properties>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
|
||||
<Property name="useNullLayout" type="boolean" value="true"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnlLeft">
|
||||
<Properties>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 132]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 132]"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 132]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="0" y="5" width="90" height="136"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
|
||||
<Property name="columns" type="int" value="1"/>
|
||||
<Property name="rows" type="int" value="8"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer01">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer02">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer03">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer04">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer05">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer06">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer07">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer08">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="4"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="lblTableImage">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="66" red="33" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo">
|
||||
<BevelBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="95" y="5" width="40" height="136"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="pnlRight">
|
||||
<Properties>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 132]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 132]"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 132]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="140" y="5" width="90" height="136"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
|
||||
<Property name="columns" type="int" value="1"/>
|
||||
<Property name="rows" type="int" value="8"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer09">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer10">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer11">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer12">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer13">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer14">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer15">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer16">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="10" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="mage.client.cards.CardsList" name="draftPicks">
|
||||
|
@ -269,12 +542,12 @@
|
|||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="580" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="738" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="452" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="439" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
|
|
|
@ -35,18 +35,25 @@
|
|||
package mage.client.draft;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Image;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.UUID;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.Timer;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.components.tray.MageTray;
|
||||
import mage.client.deckeditor.SortSettingDraft;
|
||||
import mage.client.plugins.impl.Plugins;
|
||||
import mage.client.util.CardsViewUtil;
|
||||
import mage.client.util.Event;
|
||||
import mage.client.util.ImageHelper;
|
||||
import mage.client.util.Listener;
|
||||
import mage.client.util.audio.AudioManager;
|
||||
import mage.client.util.gui.BufferedImageBuilder;
|
||||
import mage.remote.Session;
|
||||
import mage.view.CardsView;
|
||||
import mage.view.DraftPickView;
|
||||
|
@ -121,6 +128,84 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
this.chkPack2.setSelected(draftView.getBoosterNum() > 1);
|
||||
this.chkPack3.setSelected(draftView.getBoosterNum() > 2);
|
||||
this.txtCardNo.setText(Integer.toString(draftView.getCardNum()));
|
||||
|
||||
int right = draftView.getPlayers().size() / 2;
|
||||
int left = draftView.getPlayers().size() - right;
|
||||
int height = left * 18;
|
||||
lblTableImage.setSize(new Dimension(lblTableImage.getWidth(), height));
|
||||
Image tableImage = ImageHelper.getImageFromResources(draftView.getBoosterNum() == 2 ? "/draft/table_right.png":"/draft/table_left.png");
|
||||
BufferedImage resizedTable = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(tableImage, BufferedImage.TYPE_INT_ARGB), lblTableImage.getWidth());
|
||||
lblTableImage.setIcon(new ImageIcon(resizedTable));
|
||||
|
||||
int count = 0;
|
||||
int numberPlayers = draftView.getPlayers().size();
|
||||
for(String playerName: draftView.getPlayers()) {
|
||||
count++;
|
||||
setPlayerNameToLabel(playerName, count, numberPlayers);
|
||||
}
|
||||
}
|
||||
|
||||
private void setPlayerNameToLabel(String name, int index, int players) {
|
||||
int tablePosition;
|
||||
int right = players / 2;
|
||||
int left = players - right;
|
||||
if (index <= left) {
|
||||
// left side up (8 - 1)
|
||||
tablePosition = (9 - index) - (8- left);
|
||||
} else {
|
||||
// right side down (9-18)
|
||||
tablePosition = 8 + (index - left);
|
||||
}
|
||||
switch(tablePosition) {
|
||||
case 1:
|
||||
lblPlayer01.setText(name);
|
||||
break;
|
||||
case 2:
|
||||
lblPlayer02.setText(name);
|
||||
break;
|
||||
case 3:
|
||||
lblPlayer03.setText(name);
|
||||
break;
|
||||
case 4:
|
||||
lblPlayer04.setText(name);
|
||||
break;
|
||||
case 5:
|
||||
lblPlayer05.setText(name);
|
||||
break;
|
||||
case 6:
|
||||
lblPlayer06.setText(name);
|
||||
break;
|
||||
case 7:
|
||||
lblPlayer07.setText(name);
|
||||
break;
|
||||
case 8:
|
||||
lblPlayer08.setText(name);
|
||||
break;
|
||||
case 9:
|
||||
lblPlayer09.setText(name);
|
||||
break;
|
||||
case 10:
|
||||
lblPlayer10.setText(name);
|
||||
break;
|
||||
case 11:
|
||||
lblPlayer11.setText(name);
|
||||
break;
|
||||
case 12:
|
||||
lblPlayer12.setText(name);
|
||||
break;
|
||||
case 13:
|
||||
lblPlayer13.setText(name);
|
||||
break;
|
||||
case 14:
|
||||
lblPlayer14.setText(name);
|
||||
break;
|
||||
case 15:
|
||||
lblPlayer15.setText(name);
|
||||
break;
|
||||
case 16:
|
||||
lblPlayer16.setText(name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void loadBooster(DraftPickView draftPickView) {
|
||||
|
@ -149,6 +234,10 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
}
|
||||
);
|
||||
setMessage("Pick a card");
|
||||
if (!MageFrame.getInstance().isActive()) {
|
||||
MageTray.getInstance().displayMessage("Pick the next card.");
|
||||
MageTray.getInstance().blink();
|
||||
}
|
||||
countdown.stop();
|
||||
this.timeout = draftPickView.getTimeout();
|
||||
setTimeout(timeout);
|
||||
|
@ -214,14 +303,36 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
chkPack3 = new javax.swing.JCheckBox();
|
||||
lblCardNo = new javax.swing.JLabel();
|
||||
txtCardNo = new javax.swing.JTextField();
|
||||
lblTimeRemaining = new javax.swing.JLabel();
|
||||
txtTimeRemaining = new javax.swing.JTextField();
|
||||
lblMessage = new javax.swing.JLabel();
|
||||
bigCard = new mage.client.cards.BigCard();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
pnlLeft = new javax.swing.JPanel();
|
||||
lblPlayer01 = new javax.swing.JLabel();
|
||||
lblPlayer02 = new javax.swing.JLabel();
|
||||
lblPlayer03 = new javax.swing.JLabel();
|
||||
lblPlayer04 = new javax.swing.JLabel();
|
||||
lblPlayer05 = new javax.swing.JLabel();
|
||||
lblPlayer06 = new javax.swing.JLabel();
|
||||
lblPlayer07 = new javax.swing.JLabel();
|
||||
lblPlayer08 = new javax.swing.JLabel();
|
||||
lblTableImage = new javax.swing.JLabel();
|
||||
pnlRight = new javax.swing.JPanel();
|
||||
lblPlayer09 = new javax.swing.JLabel();
|
||||
lblPlayer10 = new javax.swing.JLabel();
|
||||
lblPlayer11 = new javax.swing.JLabel();
|
||||
lblPlayer12 = new javax.swing.JLabel();
|
||||
lblPlayer13 = new javax.swing.JLabel();
|
||||
lblPlayer14 = new javax.swing.JLabel();
|
||||
lblPlayer15 = new javax.swing.JLabel();
|
||||
lblPlayer16 = new javax.swing.JLabel();
|
||||
draftPicks = new mage.client.cards.CardsList();
|
||||
draftBooster = new mage.client.cards.DraftGrid();
|
||||
|
||||
draftLeftPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
draftLeftPane.setFocusable(false);
|
||||
draftLeftPane.setRequestFocusEnabled(false);
|
||||
draftLeftPane.setVerifyInputWhenFocusTarget(false);
|
||||
|
||||
btnQuitTournament.setText("Quit Tournament");
|
||||
btnQuitTournament.addActionListener(new java.awt.event.ActionListener() {
|
||||
|
@ -253,68 +364,216 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
txtCardNo.setEditable(false);
|
||||
txtCardNo.setEnabled(false);
|
||||
|
||||
lblTimeRemaining.setText("Time:");
|
||||
|
||||
txtTimeRemaining.setEditable(false);
|
||||
txtTimeRemaining.setForeground(java.awt.Color.red);
|
||||
txtTimeRemaining.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
txtTimeRemaining.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
|
||||
lblMessage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
lblMessage.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
lblMessage.setOpaque(true);
|
||||
|
||||
bigCard.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
|
||||
jPanel1.setOpaque(false);
|
||||
jPanel1.setLayout(null);
|
||||
|
||||
pnlLeft.setFocusable(false);
|
||||
pnlLeft.setMaximumSize(new java.awt.Dimension(80, 132));
|
||||
pnlLeft.setMinimumSize(new java.awt.Dimension(80, 132));
|
||||
pnlLeft.setOpaque(false);
|
||||
pnlLeft.setPreferredSize(new java.awt.Dimension(80, 132));
|
||||
pnlLeft.setRequestFocusEnabled(false);
|
||||
pnlLeft.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.setLayout(new java.awt.GridLayout(8, 1));
|
||||
|
||||
lblPlayer01.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer01.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer01.setFocusable(false);
|
||||
lblPlayer01.setRequestFocusEnabled(false);
|
||||
lblPlayer01.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer01);
|
||||
lblPlayer01.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
lblPlayer02.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer02.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer02.setFocusable(false);
|
||||
lblPlayer02.setRequestFocusEnabled(false);
|
||||
lblPlayer02.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer02);
|
||||
|
||||
lblPlayer03.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer03.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer03.setFocusable(false);
|
||||
lblPlayer03.setRequestFocusEnabled(false);
|
||||
lblPlayer03.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer03);
|
||||
|
||||
lblPlayer04.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer04.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer04.setFocusable(false);
|
||||
lblPlayer04.setRequestFocusEnabled(false);
|
||||
lblPlayer04.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer04);
|
||||
|
||||
lblPlayer05.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer05.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer05.setFocusable(false);
|
||||
lblPlayer05.setRequestFocusEnabled(false);
|
||||
lblPlayer05.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer05);
|
||||
|
||||
lblPlayer06.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer06.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer06.setFocusable(false);
|
||||
lblPlayer06.setRequestFocusEnabled(false);
|
||||
lblPlayer06.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer06);
|
||||
|
||||
lblPlayer07.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer07.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer07.setFocusable(false);
|
||||
lblPlayer07.setRequestFocusEnabled(false);
|
||||
lblPlayer07.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer07);
|
||||
|
||||
lblPlayer08.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer08.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
lblPlayer08.setFocusable(false);
|
||||
lblPlayer08.setRequestFocusEnabled(false);
|
||||
lblPlayer08.setVerifyInputWhenFocusTarget(false);
|
||||
pnlLeft.add(lblPlayer08);
|
||||
|
||||
jPanel1.add(pnlLeft);
|
||||
pnlLeft.setBounds(0, 5, 90, 136);
|
||||
|
||||
lblTableImage.setBackground(new java.awt.Color(51, 102, 255));
|
||||
lblTableImage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
lblTableImage.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
lblTableImage.setFocusable(false);
|
||||
lblTableImage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
lblTableImage.setOpaque(true);
|
||||
lblTableImage.setRequestFocusEnabled(false);
|
||||
lblTableImage.setVerifyInputWhenFocusTarget(false);
|
||||
jPanel1.add(lblTableImage);
|
||||
lblTableImage.setBounds(95, 5, 40, 136);
|
||||
|
||||
pnlRight.setFocusable(false);
|
||||
pnlRight.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
pnlRight.setMaximumSize(new java.awt.Dimension(80, 132));
|
||||
pnlRight.setMinimumSize(new java.awt.Dimension(80, 132));
|
||||
pnlRight.setOpaque(false);
|
||||
pnlRight.setPreferredSize(new java.awt.Dimension(80, 132));
|
||||
pnlRight.setRequestFocusEnabled(false);
|
||||
pnlRight.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.setLayout(new java.awt.GridLayout(8, 1));
|
||||
|
||||
lblPlayer09.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer09.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer09.setFocusable(false);
|
||||
lblPlayer09.setRequestFocusEnabled(false);
|
||||
lblPlayer09.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer09);
|
||||
|
||||
lblPlayer10.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer10.setFocusable(false);
|
||||
lblPlayer10.setRequestFocusEnabled(false);
|
||||
lblPlayer10.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer10);
|
||||
|
||||
lblPlayer11.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer11.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer11.setFocusable(false);
|
||||
lblPlayer11.setRequestFocusEnabled(false);
|
||||
lblPlayer11.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer11);
|
||||
|
||||
lblPlayer12.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer12.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer12.setFocusable(false);
|
||||
lblPlayer12.setRequestFocusEnabled(false);
|
||||
lblPlayer12.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer12);
|
||||
|
||||
lblPlayer13.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer13.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer13.setFocusable(false);
|
||||
lblPlayer13.setRequestFocusEnabled(false);
|
||||
lblPlayer13.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer13);
|
||||
|
||||
lblPlayer14.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer14.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer14.setFocusable(false);
|
||||
lblPlayer14.setRequestFocusEnabled(false);
|
||||
lblPlayer14.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer14);
|
||||
|
||||
lblPlayer15.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer15.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer15.setFocusable(false);
|
||||
lblPlayer15.setRequestFocusEnabled(false);
|
||||
lblPlayer15.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer15);
|
||||
|
||||
lblPlayer16.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
|
||||
lblPlayer16.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblPlayer16.setFocusable(false);
|
||||
lblPlayer16.setRequestFocusEnabled(false);
|
||||
lblPlayer16.setVerifyInputWhenFocusTarget(false);
|
||||
pnlRight.add(lblPlayer16);
|
||||
|
||||
jPanel1.add(pnlRight);
|
||||
pnlRight.setBounds(140, 5, 90, 136);
|
||||
|
||||
javax.swing.GroupLayout draftLeftPaneLayout = new javax.swing.GroupLayout(draftLeftPane);
|
||||
draftLeftPane.setLayout(draftLeftPaneLayout);
|
||||
draftLeftPaneLayout.setHorizontalGroup(
|
||||
draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lblCardNo)
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(lblPack2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtPack2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(lblPack1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtPack1, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lblPack3)
|
||||
.addComponent(lblTimeRemaining))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtCardNo)
|
||||
.addComponent(txtPack3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(txtTimeRemaining))))
|
||||
.addContainerGap()
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lblCardNo)
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(lblPack2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtPack2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(lblPack1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtPack1, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(lblPack3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtCardNo)
|
||||
.addComponent(txtPack3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(chkPack3)
|
||||
.addComponent(chkPack2))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(chkPack1)
|
||||
.addContainerGap())))
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(lblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap())))
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addGap(64, 64, 64)
|
||||
.addComponent(btnQuitTournament)))
|
||||
.addComponent(chkPack2)
|
||||
.addComponent(chkPack1)))
|
||||
.addGroup(draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(btnQuitTournament)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lblMessage, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE))))
|
||||
.addComponent(bigCard, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
);
|
||||
draftLeftPaneLayout.setVerticalGroup(
|
||||
draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, draftLeftPaneLayout.createSequentialGroup()
|
||||
.addComponent(btnQuitTournament)
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnQuitTournament)
|
||||
.addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(chkPack1)
|
||||
|
@ -336,12 +595,10 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
.addComponent(lblCardNo)
|
||||
.addComponent(txtCardNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(draftLeftPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtTimeRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lblTimeRemaining))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblMessage, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
|
||||
.addComponent(lblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)
|
||||
.addComponent(bigCard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
|
||||
|
@ -351,11 +608,11 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
draftBooster.setLayout(draftBoosterLayout);
|
||||
draftBoosterLayout.setHorizontalGroup(
|
||||
draftBoosterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 580, Short.MAX_VALUE)
|
||||
.addGap(0, 738, Short.MAX_VALUE)
|
||||
);
|
||||
draftBoosterLayout.setVerticalGroup(
|
||||
draftBoosterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 452, Short.MAX_VALUE)
|
||||
.addGap(0, 439, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
|
@ -366,15 +623,15 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
.addComponent(draftLeftPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(draftPicks, javax.swing.GroupLayout.DEFAULT_SIZE, 582, Short.MAX_VALUE)
|
||||
.addComponent(draftPicks, javax.swing.GroupLayout.DEFAULT_SIZE, 740, Short.MAX_VALUE)
|
||||
.addComponent(draftBooster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(draftLeftPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(draftLeftPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(draftPicks, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(draftPicks, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(draftBooster, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
@ -395,13 +652,32 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
private mage.client.cards.DraftGrid draftBooster;
|
||||
private javax.swing.JPanel draftLeftPane;
|
||||
private mage.client.cards.CardsList draftPicks;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JSeparator jSeparator1;
|
||||
private javax.swing.JLabel lblCardNo;
|
||||
private javax.swing.JLabel lblMessage;
|
||||
private javax.swing.JLabel lblPack1;
|
||||
private javax.swing.JLabel lblPack2;
|
||||
private javax.swing.JLabel lblPack3;
|
||||
private javax.swing.JLabel lblTimeRemaining;
|
||||
private javax.swing.JLabel lblPlayer01;
|
||||
private javax.swing.JLabel lblPlayer02;
|
||||
private javax.swing.JLabel lblPlayer03;
|
||||
private javax.swing.JLabel lblPlayer04;
|
||||
private javax.swing.JLabel lblPlayer05;
|
||||
private javax.swing.JLabel lblPlayer06;
|
||||
private javax.swing.JLabel lblPlayer07;
|
||||
private javax.swing.JLabel lblPlayer08;
|
||||
private javax.swing.JLabel lblPlayer09;
|
||||
private javax.swing.JLabel lblPlayer10;
|
||||
private javax.swing.JLabel lblPlayer11;
|
||||
private javax.swing.JLabel lblPlayer12;
|
||||
private javax.swing.JLabel lblPlayer13;
|
||||
private javax.swing.JLabel lblPlayer14;
|
||||
private javax.swing.JLabel lblPlayer15;
|
||||
private javax.swing.JLabel lblPlayer16;
|
||||
private javax.swing.JLabel lblTableImage;
|
||||
private javax.swing.JPanel pnlLeft;
|
||||
private javax.swing.JPanel pnlRight;
|
||||
private javax.swing.JTextField txtCardNo;
|
||||
private javax.swing.JTextField txtPack1;
|
||||
private javax.swing.JTextField txtPack2;
|
||||
|
|
BIN
Mage.Client/src/main/resources/draft/table_left.png
Normal file
BIN
Mage.Client/src/main/resources/draft/table_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
Mage.Client/src/main/resources/draft/table_right.png
Normal file
BIN
Mage.Client/src/main/resources/draft/table_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -33,6 +33,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.game.draft.Draft;
|
||||
import mage.game.draft.DraftPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -41,9 +42,10 @@ import mage.game.draft.Draft;
|
|||
public class DraftView implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private List<String> sets = new ArrayList<String>();
|
||||
private int boosterNum;
|
||||
private int cardNum;
|
||||
private final List<String> sets = new ArrayList<>();
|
||||
private final int boosterNum;
|
||||
private final int cardNum;
|
||||
private final List<String> players = new ArrayList<>();
|
||||
|
||||
public DraftView(Draft draft) {
|
||||
if (draft.getDraftCube() != null) {
|
||||
|
@ -57,12 +59,19 @@ public class DraftView implements Serializable {
|
|||
}
|
||||
this.boosterNum = draft.getBoosterNum();
|
||||
this.cardNum = draft.getCardNum();
|
||||
for(DraftPlayer draftPlayer :draft.getPlayers()) {
|
||||
players.add(draftPlayer.getPlayer().getName());
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getSets() {
|
||||
return sets;
|
||||
}
|
||||
|
||||
public List<String> getPlayers() {
|
||||
return players;
|
||||
}
|
||||
|
||||
public int getBoosterNum() {
|
||||
return boosterNum;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue