Working Card Rendering

This commit is contained in:
Mark Langen 2016-08-31 04:43:28 -06:00
parent eeaea4c566
commit d5415d2d04
63 changed files with 17729 additions and 1769 deletions

View file

@ -16,31 +16,26 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deckAreaSplitPane" alignment="0" pref="740" max="32767" attributes="0"/>
<Component id="deckAreaSplitPane" alignment="0" pref="918" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deckAreaSplitPane" alignment="0" pref="568" max="32767" attributes="0"/>
<Component id="deckAreaSplitPane" alignment="0" pref="377" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JSplitPane" name="deckAreaSplitPane">
<Properties>
<Property name="orientation" type="int" value="0"/>
<Property name="resizeWeight" type="double" value="0.8"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
<Property name="resizeWeight" type="double" value="0.6"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
<SubComponents>
<Component class="mage.client.cards.CardsList" name="deckList">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
<JSplitPaneConstraints position="left"/>
</Constraint>
</Constraints>
</Component>
<Component class="mage.client.cards.CardsList" name="sideboardList">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
@ -48,6 +43,13 @@
</Constraint>
</Constraints>
</Component>
<Component class="mage.client.cards.CardsList" name="deckList">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
<JSplitPaneConstraints position="left"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
</SubComponents>

View file

@ -118,23 +118,23 @@ public class DeckArea extends javax.swing.JPanel {
private void initComponents() {
deckAreaSplitPane = new javax.swing.JSplitPane();
deckList = new mage.client.cards.CardsList();
sideboardList = new mage.client.cards.CardsList();
deckList = new mage.client.cards.CardsList();
deckAreaSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
deckAreaSplitPane.setResizeWeight(0.8);
deckAreaSplitPane.setLeftComponent(deckList);
deckAreaSplitPane.setBorder(null);
deckAreaSplitPane.setResizeWeight(0.6);
deckAreaSplitPane.setRightComponent(sideboardList);
deckAreaSplitPane.setLeftComponent(deckList);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deckAreaSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 740, Short.MAX_VALUE)
.addComponent(deckAreaSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 918, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deckAreaSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 568, Short.MAX_VALUE)
.addComponent(deckAreaSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents

View file

@ -11,7 +11,7 @@ public class UpdateCountsCallback {
private final javax.swing.JLabel lblCount;
private final javax.swing.JLabel lblCreatureCount;
private final javax.swing.JLabel lblLandCount;
private final javax.swing.JLabel lblSoerceryCount;
private final javax.swing.JLabel lblSorceryCount;
private final javax.swing.JLabel lblInstantCount;
private final javax.swing.JLabel lblEnchantmentCount;
private final javax.swing.JLabel lblArtifactCount;
@ -20,19 +20,26 @@ public class UpdateCountsCallback {
this.lblCount = count;
this.lblCreatureCount = creatures;
this.lblLandCount = lands;
this.lblSoerceryCount = sorceries;
this.lblSorceryCount = sorceries;
this.lblInstantCount = instants;
this.lblEnchantmentCount = enchantments;
this.lblArtifactCount = artifacts;
}
public void update(int count, int creatures, int lands, int sorceries, int instants, int enchantments, int artifacts) {
this.lblCount.setText(Integer.toString(count));
this.lblCreatureCount.setText(Integer.toString(creatures));
this.lblLandCount.setText(Integer.toString(lands));
this.lblSoerceryCount.setText(Integer.toString(sorceries));
this.lblInstantCount.setText(Integer.toString(instants));
this.lblEnchantmentCount.setText(Integer.toString(enchantments));
this.lblArtifactCount.setText(Integer.toString(artifacts));
if (this.lblCount != null)
this.lblCount.setText(Integer.toString(count));
if (this.lblCreatureCount != null)
this.lblCreatureCount.setText(Integer.toString(creatures));
if (this.lblLandCount != null)
this.lblLandCount.setText(Integer.toString(lands));
if (this.lblSorceryCount != null)
this.lblSorceryCount.setText(Integer.toString(sorceries));
if (this.lblInstantCount != null)
this.lblInstantCount.setText(Integer.toString(instants));
if (this.lblEnchantmentCount != null)
this.lblEnchantmentCount.setText(Integer.toString(enchantments));
if (this.lblArtifactCount != null)
this.lblArtifactCount.setText(Integer.toString(artifacts));
}
}