forked from External/mage
Working Card Rendering
This commit is contained in:
parent
eeaea4c566
commit
d5415d2d04
63 changed files with 17729 additions and 1769 deletions
|
|
@ -92,6 +92,7 @@ import mage.view.CardView;
|
|||
import mage.view.CounterView;
|
||||
import mage.view.PermanentView;
|
||||
import mage.view.StackAbilityView;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -191,7 +192,7 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
|
|||
gSmall.drawImage(ImageHelper.scaleImage(image, Config.dimensions.frameWidth, Config.dimensions.frameHeight), 0, 0, this);
|
||||
|
||||
gImage.setFont(new Font("Arial", Font.PLAIN, NAME_FONT_MAX_SIZE));
|
||||
gImage.drawString(card.getName(), CONTENT_MAX_XOFFSET, NAME_MAX_YOFFSET);
|
||||
gImage.drawString(card.getName()+"TEST", CONTENT_MAX_XOFFSET, NAME_MAX_YOFFSET);
|
||||
if (card.getCardTypes().contains(CardType.CREATURE)) {
|
||||
gImage.drawString(card.getPower() + "/" + card.getToughness(), POWBOX_TEXT_MAX_LEFT, POWBOX_TEXT_MAX_TOP);
|
||||
} else if (card.getCardTypes().contains(CardType.PLANESWALKER)) {
|
||||
|
|
@ -205,9 +206,9 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
|
|||
gImage.dispose();
|
||||
|
||||
gSmall.setFont(new Font("Arial", Font.PLAIN, Config.dimensions.nameFontSize));
|
||||
gSmall.drawString(card.getName(), Config.dimensions.contentXOffset, Config.dimensions.nameYOffset);
|
||||
gSmall.drawString(card.getName()+"TEST2", Config.dimensions.contentXOffset, Config.dimensions.nameYOffset);
|
||||
if (card.getCardTypes().contains(CardType.CREATURE)) {
|
||||
gSmall.drawString(card.getPower() + "/" + card.getToughness(), Config.dimensions.powBoxTextLeft, Config.dimensions.powBoxTextTop);
|
||||
gSmall.drawString(card.getPower() + "/-/" + card.getToughness(), Config.dimensions.powBoxTextLeft, Config.dimensions.powBoxTextTop);
|
||||
} else if (card.getCardTypes().contains(CardType.PLANESWALKER)) {
|
||||
gSmall.drawString(card.getLoyalty(), Config.dimensions.powBoxTextLeft, Config.dimensions.powBoxTextTop);
|
||||
}
|
||||
|
|
@ -318,6 +319,19 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
|
|||
|
||||
return sbType.toString();
|
||||
}
|
||||
|
||||
protected void drawDetailed(Graphics2D g) {
|
||||
// Get the size of the card
|
||||
int width = getWidth();
|
||||
int height = getHeight();
|
||||
|
||||
g.setColor(Color.black);
|
||||
g.drawRoundRect(0, 0, width, height, 4, 4);
|
||||
g.setColor(Color.white);
|
||||
g.setFont(new Font("Arial", Font.PLAIN, NAME_FONT_MAX_SIZE));
|
||||
g.drawString(card.getName(), 0, 0);
|
||||
Logger.getLogger(Card.class).info("Drawing");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
|
|
@ -355,6 +369,8 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
|
|||
|
||||
@Override
|
||||
public void paintComponent(Graphics graphics) {
|
||||
drawDetailed((Graphics2D)graphics);
|
||||
/*
|
||||
Graphics2D g2 = (Graphics2D) graphics;
|
||||
g2.drawImage(small, 0, 0, this);
|
||||
|
||||
|
|
@ -365,6 +381,7 @@ public class Card extends MagePermanent implements MouseMotionListener, MouseLis
|
|||
g2.setColor(Color.BLACK);
|
||||
}
|
||||
g2.drawRect(0, 0, Config.dimensions.frameWidth - 1, Config.dimensions.frameHeight - 1);
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -34,21 +34,16 @@
|
|||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelControl" pref="703" max="32767" attributes="0"/>
|
||||
<Component id="panelCardArea" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Component id="panelControl" alignment="0" pref="467" max="32767" attributes="0"/>
|
||||
<Component id="panelCardArea" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="panelControl" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="panelCardArea" pref="86" max="32767" attributes="0"/>
|
||||
<Component id="panelControl" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
|
||||
<Component id="panelCardArea" pref="179" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -81,15 +76,7 @@
|
|||
<Component id="lblLandCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblCreatureCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblSorceryCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblInstantCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lblEnchantmentCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
||||
<Component id="lblArtifactCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkPiles" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="cbSortBy" min="-2" max="-2" attributes="0"/>
|
||||
|
|
@ -97,7 +84,7 @@
|
|||
<Component id="jToggleListView" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jToggleCardView" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="62" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -109,11 +96,7 @@
|
|||
<Component id="lblCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblLandCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCreatureCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblSorceryCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblInstantCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblEnchantmentCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkPiles" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblArtifactCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="cbSortBy" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jToggleListView" min="-2" max="-2" attributes="0"/>
|
||||
|
|
@ -177,60 +160,6 @@
|
|||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblSorceryCount">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/type_sorcery.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="999"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Number of sorceries."/>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="inheritsPopupMenu" 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="lblInstantCount">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/type_instant.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="999"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Number of instants."/>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="inheritsPopupMenu" 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="lblEnchantmentCount">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/type_enchantment.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="999"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Number of enchantments."/>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="inheritsPopupMenu" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkPiles">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Piles"/>
|
||||
|
|
@ -324,24 +253,6 @@
|
|||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jToggleCardViewActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblArtifactCount">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/type_artifact.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="999"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Number of artifacts"/>
|
||||
<Property name="verticalAlignment" type="int" value="1"/>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="inheritsPopupMenu" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="panelCardArea">
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
}
|
||||
});
|
||||
|
||||
mainModel.setUpdateCountsCallback(new UpdateCountsCallback(lblCount, lblCreatureCount, lblLandCount, lblSorceryCount, lblInstantCount, lblEnchantmentCount, lblArtifactCount));
|
||||
mainModel.setUpdateCountsCallback(new UpdateCountsCallback(lblCount, lblCreatureCount, lblLandCount, null, null, null, null));
|
||||
}
|
||||
|
||||
// if you use the deck ediot to build a free deck, numbers can be set directly in deck and sideboard
|
||||
|
|
@ -418,10 +418,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
this.lblCount.setText(Integer.toString(count));
|
||||
this.lblCreatureCount.setText(Integer.toString(creatureCount));
|
||||
this.lblLandCount.setText(Integer.toString(landCount));
|
||||
this.lblSorceryCount.setText(Integer.toString(sorceryCount));
|
||||
this.lblInstantCount.setText(Integer.toString(instantCount));
|
||||
this.lblEnchantmentCount.setText(Integer.toString(enchantmentCount));
|
||||
this.lblArtifactCount.setText(Integer.toString(artifactCount));
|
||||
}
|
||||
|
||||
private MageCard addCard(CardView card, BigCard bigCard, UUID gameId) {
|
||||
|
|
@ -482,14 +478,10 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
lblCount = new javax.swing.JLabel();
|
||||
lblLandCount = new javax.swing.JLabel();
|
||||
lblCreatureCount = new javax.swing.JLabel();
|
||||
lblSorceryCount = new javax.swing.JLabel();
|
||||
lblInstantCount = new javax.swing.JLabel();
|
||||
lblEnchantmentCount = new javax.swing.JLabel();
|
||||
chkPiles = new javax.swing.JCheckBox();
|
||||
cbSortBy = new javax.swing.JComboBox();
|
||||
jToggleListView = new javax.swing.JToggleButton();
|
||||
jToggleCardView = new javax.swing.JToggleButton();
|
||||
lblArtifactCount = new javax.swing.JLabel();
|
||||
panelCardArea = new javax.swing.JScrollPane();
|
||||
cardArea = new javax.swing.JLayeredPane();
|
||||
|
||||
|
|
@ -537,39 +529,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
lblCreatureCount.setRequestFocusEnabled(false);
|
||||
lblCreatureCount.setVerifyInputWhenFocusTarget(false);
|
||||
|
||||
lblSorceryCount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblSorceryCount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_sorcery.png"))); // NOI18N
|
||||
lblSorceryCount.setText("999");
|
||||
lblSorceryCount.setToolTipText("Number of sorceries.");
|
||||
lblSorceryCount.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
lblSorceryCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
lblSorceryCount.setFocusable(false);
|
||||
lblSorceryCount.setInheritsPopupMenu(false);
|
||||
lblSorceryCount.setRequestFocusEnabled(false);
|
||||
lblSorceryCount.setVerifyInputWhenFocusTarget(false);
|
||||
|
||||
lblInstantCount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblInstantCount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_instant.png"))); // NOI18N
|
||||
lblInstantCount.setText("999");
|
||||
lblInstantCount.setToolTipText("Number of instants.");
|
||||
lblInstantCount.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
lblInstantCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
lblInstantCount.setFocusable(false);
|
||||
lblInstantCount.setInheritsPopupMenu(false);
|
||||
lblInstantCount.setRequestFocusEnabled(false);
|
||||
lblInstantCount.setVerifyInputWhenFocusTarget(false);
|
||||
|
||||
lblEnchantmentCount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblEnchantmentCount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_enchantment.png"))); // NOI18N
|
||||
lblEnchantmentCount.setText("999");
|
||||
lblEnchantmentCount.setToolTipText("Number of enchantments.");
|
||||
lblEnchantmentCount.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
lblEnchantmentCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
lblEnchantmentCount.setFocusable(false);
|
||||
lblEnchantmentCount.setInheritsPopupMenu(false);
|
||||
lblEnchantmentCount.setRequestFocusEnabled(false);
|
||||
lblEnchantmentCount.setVerifyInputWhenFocusTarget(false);
|
||||
|
||||
chkPiles.setText("Piles");
|
||||
chkPiles.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
chkPiles.setMargin(new java.awt.Insets(3, 2, 2, 2));
|
||||
|
|
@ -619,17 +578,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
}
|
||||
});
|
||||
|
||||
lblArtifactCount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
lblArtifactCount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_artifact.png"))); // NOI18N
|
||||
lblArtifactCount.setText("999");
|
||||
lblArtifactCount.setToolTipText("Number of artifacts");
|
||||
lblArtifactCount.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
lblArtifactCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
lblArtifactCount.setFocusable(false);
|
||||
lblArtifactCount.setInheritsPopupMenu(false);
|
||||
lblArtifactCount.setRequestFocusEnabled(false);
|
||||
lblArtifactCount.setVerifyInputWhenFocusTarget(false);
|
||||
|
||||
javax.swing.GroupLayout panelControlLayout = new javax.swing.GroupLayout(panelControl);
|
||||
panelControl.setLayout(panelControlLayout);
|
||||
panelControlLayout.setHorizontalGroup(
|
||||
|
|
@ -641,14 +589,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblCreatureCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblSorceryCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblInstantCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblEnchantmentCount)
|
||||
.addGap(4, 4, 4)
|
||||
.addComponent(lblArtifactCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(chkPiles)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
|
|
@ -656,7 +596,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
.addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 62, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
panelControlLayout.setVerticalGroup(
|
||||
panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
|
|
@ -666,11 +606,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
.addComponent(lblCount)
|
||||
.addComponent(lblLandCount)
|
||||
.addComponent(lblCreatureCount)
|
||||
.addComponent(lblSorceryCount)
|
||||
.addComponent(lblInstantCount)
|
||||
.addComponent(lblEnchantmentCount)
|
||||
.addComponent(chkPiles)
|
||||
.addComponent(lblArtifactCount))
|
||||
.addComponent(chkPiles))
|
||||
.addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
|
|
@ -686,21 +622,27 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelControl, javax.swing.GroupLayout.DEFAULT_SIZE, 703, Short.MAX_VALUE)
|
||||
.addComponent(panelCardArea)))
|
||||
.addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, 467, Short.MAX_VALUE)
|
||||
.addComponent(panelCardArea)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(panelCardArea, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE))
|
||||
.addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2, 2, 2)
|
||||
.addComponent(panelCardArea, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jToggleCardViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleCardViewActionPerformed
|
||||
currentView = this;
|
||||
panelCardArea.setViewportView(cardArea);
|
||||
cbSortBy.setEnabled(true);
|
||||
chkPiles.setEnabled(true);
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView");
|
||||
redrawCards();
|
||||
}//GEN-LAST:event_jToggleCardViewActionPerformed
|
||||
|
||||
private void jToggleListViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleListViewActionPerformed
|
||||
currentView = mainModel;
|
||||
panelCardArea.setViewportView(mainTable);
|
||||
|
|
@ -720,15 +662,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
drawCards(sortSetting);
|
||||
}//GEN-LAST:event_chkPilesActionPerformed
|
||||
|
||||
private void jToggleCardViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleCardViewActionPerformed
|
||||
currentView = this;
|
||||
panelCardArea.setViewportView(cardArea);
|
||||
cbSortBy.setEnabled(true);
|
||||
chkPiles.setEnabled(true);
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView");
|
||||
redrawCards();
|
||||
}//GEN-LAST:event_jToggleCardViewActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.ButtonGroup bgView;
|
||||
private javax.swing.JLayeredPane cardArea;
|
||||
|
|
@ -736,13 +669,9 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
private javax.swing.JCheckBox chkPiles;
|
||||
private javax.swing.JToggleButton jToggleCardView;
|
||||
private javax.swing.JToggleButton jToggleListView;
|
||||
private javax.swing.JLabel lblArtifactCount;
|
||||
private javax.swing.JLabel lblCount;
|
||||
private javax.swing.JLabel lblCreatureCount;
|
||||
private javax.swing.JLabel lblEnchantmentCount;
|
||||
private javax.swing.JLabel lblInstantCount;
|
||||
private javax.swing.JLabel lblLandCount;
|
||||
private javax.swing.JLabel lblSorceryCount;
|
||||
private javax.swing.JScrollPane panelCardArea;
|
||||
private javax.swing.JPanel panelControl;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue