* Deck editor - Some more improvements UI changes.

This commit is contained in:
LevelX2 2014-05-08 17:15:03 +02:00
parent e313511170
commit 46fb16b228
24 changed files with 470 additions and 674 deletions

View file

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="bgView">
</Component>
</NonVisualComponents>
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
@ -30,7 +34,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelCardArea" alignment="0" max="32767" attributes="0"/>
<Component id="panelControl" pref="674" max="32767" attributes="0"/>
<Component id="panelControl" pref="754" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
@ -38,7 +42,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="panelControl" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="panelCardArea" pref="69" max="32767" attributes="0"/>
<Component id="panelCardArea" pref="49" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -74,24 +78,29 @@
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="cbSortBy" min="-2" pref="120" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jToggleListView" min="-2" pref="76" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jToggleCardView" min="-2" pref="85" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="92" max="-2" attributes="0"/>
<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="-2" pref="195" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="cbSortBy" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblCount" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblCreatureCount" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblLandCount" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jToggleCardView" alignment="3" min="-2" pref="21" max="-2" attributes="0"/>
<Component id="chkPiles" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jToggleListView" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jToggleCardView" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
@ -147,34 +156,48 @@
</Component>
<Component class="javax.swing.JToggleButton" name="jToggleListView">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="ListView"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="bgView"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\list_panel.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Shows the cards as a list."/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[2, 6, 2, 6]"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[45, 21]"/>
<Dimension value="[37, 25]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[54, 21]"/>
<Dimension value="[37, 25]"/>
</Property>
<Property name="opaque" type="boolean" value="false"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[45, 21]"/>
<Dimension value="[37, 22]"/>
</Property>
</Properties>
<AccessibilityProperties>
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Switch between image and table view."/>
</AccessibilityProperties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jToggleListViewActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="jToggleCardView">
<Properties>
<Property name="text" type="java.lang.String" value="CardView"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 21]"/>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="bgView"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 21]"/>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\card_panel.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Shows the card as images."/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[2, 6, 2, 6]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[77, 21]"/>
<Dimension value="[33, 22]"/>
</Property>
</Properties>
<Events>

View file

@ -142,23 +142,19 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
mainTable.getColumnModel().getColumn(7).setPreferredWidth(15);
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView").equals("listView")) {
jToggleListView.setSelected(true);
panelCardArea.setViewportView(mainTable);
currentView = mainModel;
cbSortBy.setEnabled(false);
chkPiles.setEnabled(false);
} else {
jToggleCardView.setSelected(true);
jToggleListView.setSelected(false);
currentView = this;
panelCardArea.setViewportView(cardArea);
cbSortBy.setEnabled(true);
chkPiles.setEnabled(true);
}
mainTable.setOpaque(false);
mainTable.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
@ -388,6 +384,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
bgView = new javax.swing.ButtonGroup();
panelControl = new javax.swing.JPanel();
lblCount = new javax.swing.JLabel();
lblCreatureCount = new javax.swing.JLabel();
@ -434,22 +431,25 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
}
});
jToggleListView.setSelected(true);
jToggleListView.setText("ListView");
jToggleListView.setFocusable(false);
jToggleListView.setMaximumSize(new java.awt.Dimension(45, 21));
jToggleListView.setMinimumSize(new java.awt.Dimension(54, 21));
jToggleListView.setPreferredSize(new java.awt.Dimension(45, 21));
bgView.add(jToggleListView);
jToggleListView.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\list_panel.png")); // NOI18N
jToggleListView.setToolTipText("Shows the cards as a list.");
jToggleListView.setMargin(new java.awt.Insets(2, 6, 2, 6));
jToggleListView.setMaximumSize(new java.awt.Dimension(37, 25));
jToggleListView.setMinimumSize(new java.awt.Dimension(37, 25));
jToggleListView.setOpaque(false);
jToggleListView.setPreferredSize(new java.awt.Dimension(37, 22));
jToggleListView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jToggleListViewActionPerformed(evt);
}
});
jToggleCardView.setText("CardView");
jToggleCardView.setMaximumSize(new java.awt.Dimension(77, 21));
jToggleCardView.setMinimumSize(new java.awt.Dimension(77, 21));
jToggleCardView.setPreferredSize(new java.awt.Dimension(77, 21));
bgView.add(jToggleCardView);
jToggleCardView.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\card_panel.png")); // NOI18N
jToggleCardView.setToolTipText("Shows the card as images.");
jToggleCardView.setMargin(new java.awt.Insets(2, 6, 2, 6));
jToggleCardView.setPreferredSize(new java.awt.Dimension(33, 22));
jToggleCardView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jToggleCardViewActionPerformed(evt);
@ -472,23 +472,28 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jToggleListView, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.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, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(92, 92, 92))
.addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(195, 195, 195))
);
panelControlLayout.setVerticalGroup(
panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelControlLayout.createSequentialGroup()
.addGroup(panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cbSortBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblCount)
.addComponent(lblCreatureCount)
.addComponent(lblLandCount)
.addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(chkPiles)
.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))
.addContainerGap())
);
jToggleListView.getAccessibleContext().setAccessibleDescription("Switch between image and table view.");
panelCardArea.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
panelCardArea.setViewportView(cardArea);
@ -497,35 +502,24 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelCardArea)
.addComponent(panelControl, javax.swing.GroupLayout.DEFAULT_SIZE, 674, Short.MAX_VALUE)
.addComponent(panelControl, javax.swing.GroupLayout.DEFAULT_SIZE, 754, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(panelControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(panelCardArea, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE))
.addComponent(panelCardArea, javax.swing.GroupLayout.DEFAULT_SIZE, 49, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
private void jToggleCardViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleCardViewActionPerformed
jToggleListView.setSelected(false);
currentView = this;
panelCardArea.setViewportView(cardArea);
cbSortBy.setEnabled(true);
chkPiles.setEnabled(true);
redrawCards();
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView");
}//GEN-LAST:event_jToggleCardViewActionPerformed
private void jToggleListViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleListViewActionPerformed
jToggleCardView.setSelected(false);
currentView = mainModel;
panelCardArea.setViewportView(mainTable);
cbSortBy.setEnabled(false);
chkPiles.setEnabled(false);
redrawCards();
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "listView");
redrawCards();
}//GEN-LAST:event_jToggleListViewActionPerformed
private void cbSortByActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbSortByActionPerformed
@ -538,7 +532,17 @@ 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;
private javax.swing.JComboBox<SortBy> cbSortBy;
private javax.swing.JCheckBox chkPiles;

View file

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents>
<Component class="javax.swing.ButtonGroup" name="bgView">
</Component>
</NonVisualComponents>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@ -28,10 +32,10 @@
<Component id="tbColor" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="tbTypes" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="cardSelectorScrollPane" pref="215" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="cardSelectorScrollPane" pref="232" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="cardSelectorBottomPanel" min="-2" max="-2" attributes="0"/>
<Component id="cardSelectorBottomPanel" min="-2" pref="31" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -41,84 +45,142 @@
<Properties>
<Property name="floatable" type="boolean" value="false"/>
<Property name="rollover" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Click with ALT to deselct all other colors or CTRL for invert selection."/>
<Property name="borderPainted" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="" noResource="true"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Component class="javax.swing.JRadioButton" name="rdoRed">
<Component class="javax.swing.JToggleButton" name="tbRed">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_red_off.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Red "/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;&lt;html&gt;&lt;font color=&apos;red&apos;&gt;&lt;strong&gt;Red&lt;/strong&gt;&lt;font/&gt;&lt;br/&gt;&quot; &#xd;&#xa;+ tbColor.getToolTipText()" type="code"/>
</Property>
<Property name="actionCommand" type="java.lang.String" value="Red"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_red.png"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoRedActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbRedActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="rdoGreen">
<Component class="javax.swing.JToggleButton" name="tbGreen">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_green_off.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Green "/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;&lt;html&gt;Green&lt;br/&gt;&quot; + tbColor.getToolTipText()" type="code"/>
</Property>
<Property name="actionCommand" type="java.lang.String" value="Green"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_green.png"/>
</Property>
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoGreenActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbGreenActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="rdoBlue">
<Component class="javax.swing.JToggleButton" name="tbBlue">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_blueOff.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Blue "/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;&lt;html&gt;Blue&lt;br/&gt;&quot; + tbColor.getToolTipText()" type="code"/>
</Property>
<Property name="actionCommand" type="java.lang.String" value="Blue"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_blue.png"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoBlueActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbBlueActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="rdoBlack">
<Component class="javax.swing.JToggleButton" name="tbBlack">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_black_off.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Black "/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;&lt;html&gt;Black&lt;br/&gt;&quot; + tbColor.getToolTipText()" type="code"/>
</Property>
<Property name="actionCommand" type="java.lang.String" value="Black"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_black.png"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoBlackActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbBlackActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="rdoWhite">
<Component class="javax.swing.JToggleButton" name="tbWhite">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_white_off.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="White "/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;&lt;html&gt;White&lt;br/&gt;&quot; + tbColor.getToolTipText()" type="code"/>
</Property>
<Property name="actionCommand" type="java.lang.String" value="White"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\color_white.png"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoWhiteActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbWhiteActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JRadioButton" name="rdoColorless">
<Component class="javax.swing.JToggleButton" name="tbColorless">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\colorless_off.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Colorless "/>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="&quot;&lt;html&gt;Colorless&lt;br/&gt;&quot; + tbColor.getToolTipText()" type="code"/>
</Property>
<Property name="actionCommand" type="java.lang.String" value="Colorless"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\colorless.png"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoColorlessActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="tbColorlessActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator1">
</Component>
<Component class="javax.swing.JComboBox" name="cbExpansionSet">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
@ -146,9 +208,12 @@
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator2">
</Component>
<Component class="javax.swing.JButton" name="btnBooster">
<Properties>
<Property name="text" type="java.lang.String" value="Open Booster"/>
<Property name="toolTipText" type="java.lang.String" value="(CURRENTLY NOT WORKING) Generates a booster of the selected set and adds the cards to the card selector."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
@ -174,6 +239,7 @@
<Properties>
<Property name="floatable" type="boolean" value="false"/>
<Property name="rollover" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Click card type with ALT-KEY to only get the clicked card type."/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[732, 27]"/>
</Property>
@ -265,9 +331,12 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdoPlaneswalkersActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator5">
</Component>
<Component class="javax.swing.JCheckBox" name="chkPiles">
<Properties>
<Property name="text" type="java.lang.String" value="Piles"/>
<Property name="toolTipText" type="java.lang.String" value="Shows the card in piles by the selected sort."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="4"/>
<Property name="verticalTextPosition" type="int" value="3"/>
@ -276,6 +345,8 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkPilesActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator3">
</Component>
<Component class="javax.swing.JComboBox" name="cbSortBy">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
@ -303,10 +374,18 @@
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;SortBy&gt;"/>
</AuxValues>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator4">
</Component>
<Component class="javax.swing.JToggleButton" name="jToggleListView">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="bgView"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\list_panel.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="ListView"/>
<Property name="toolTipText" type="java.lang.String" value="Shows the cards as a list."/>
<Property name="borderPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
@ -314,15 +393,14 @@
<Insets value="[2, 2, 2, 2]"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
<Dimension value="[37, 22]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
<Dimension value="[37, 22]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
<Dimension value="[37, 22]"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jToggleListViewActionPerformed"/>
@ -330,7 +408,13 @@
</Component>
<Component class="javax.swing.JToggleButton" name="jToggleCardView">
<Properties>
<Property name="text" type="java.lang.String" value="CardView"/>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="bgView"/>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\card_panel.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Shows the card as images."/>
<Property name="borderPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
@ -338,13 +422,14 @@
<Insets value="[2, 2, 2, 2]"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
<Dimension value="[37, 22]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
<Dimension value="[37, 22]"/>
</Property>
<Property name="name" type="java.lang.String" value="" noResource="true"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[70, 23]"/>
<Dimension value="[37, 22]"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
@ -379,7 +464,7 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="jButtonRemoveFromSideboard" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<Component id="jLabelSearch" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jTextFieldSearch" min="-2" pref="135" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
@ -402,7 +487,7 @@
<Component id="jButtonRemoveFromMain" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonAddToSideboard" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonRemoveFromSideboard" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabelSearch" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jTextFieldSearch" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonSearch" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonClean" alignment="3" min="-2" max="-2" attributes="0"/>
@ -410,7 +495,7 @@
<Component id="cardCount" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButtonAddToMain" alignment="3" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -418,8 +503,10 @@
<SubComponents>
<Component class="javax.swing.JButton" name="jButtonAddToMain">
<Properties>
<Property name="text" type="java.lang.String" value="+"/>
<Property name="toolTipText" type="java.lang.String" value="Add selected card to deck"/>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\deck_in.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Add selected cards to deck"/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="null"/>
</Property>
@ -430,7 +517,7 @@
<Dimension value="[42, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[42, 30]"/>
<Dimension value="[28, 22]"/>
</Property>
</Properties>
<Events>
@ -439,8 +526,10 @@
</Component>
<Component class="javax.swing.JButton" name="jButtonAddToSideboard">
<Properties>
<Property name="text" type="java.lang.String" value="+S"/>
<Property name="toolTipText" type="java.lang.String" value="Add to Sideboard"/>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\sideboard_in.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Add selected cards to sideboard."/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[2, 0, 2, 0]"/>
</Property>
@ -451,23 +540,28 @@
<Dimension value="[10, 30]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[50, 30]"/>
<Dimension value="[28, 22]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonAddToSideboardActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Component class="javax.swing.JLabel" name="jLabelSearch">
<Properties>
<Property name="text" type="java.lang.String" value="Search (by name,in rules):"/>
<Property name="text" type="java.lang.String" value="Search:"/>
<Property name="toolTipText" type="java.lang.String" value="Searches for card names and in the rule text of the card."/>
</Properties>
</Component>
<Component class="javax.swing.JTextField" name="jTextFieldSearch">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="Searches for card names and in the rule text of the card."/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="jButtonSearch">
<Properties>
<Property name="text" type="java.lang.String" value="Search"/>
<Property name="toolTipText" type="java.lang.String" value="Performs the search."/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonSearchActionPerformed"/>
@ -476,6 +570,7 @@
<Component class="javax.swing.JButton" name="jButtonClean">
<Properties>
<Property name="text" type="java.lang.String" value="Clear"/>
<Property name="toolTipText" type="java.lang.String" value="Clears the search field."/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonCleanActionPerformed"/>
@ -484,6 +579,7 @@
<Component class="javax.swing.JLabel" name="cardCountLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Card count:"/>
<Property name="toolTipText" type="java.lang.String" value="Number of cards currently shown."/>
</Properties>
<AccessibilityProperties>
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="cardCountLabel"/>
@ -499,8 +595,10 @@
</Component>
<Component class="javax.swing.JButton" name="jButtonRemoveFromMain">
<Properties>
<Property name="text" type="java.lang.String" value="-"/>
<Property name="toolTipText" type="java.lang.String" value="Remove selected card from deck"/>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\deck_out.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Remove selected cards from deck"/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="null"/>
</Property>
@ -511,7 +609,7 @@
<Dimension value="[42, 23]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[42, 30]"/>
<Dimension value="[28, 22]"/>
</Property>
</Properties>
<Events>
@ -520,8 +618,10 @@
</Component>
<Component class="javax.swing.JButton" name="jButtonRemoveFromSideboard">
<Properties>
<Property name="text" type="java.lang.String" value="-S"/>
<Property name="toolTipText" type="java.lang.String" value="Remove from Sideboard"/>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="2" name="D:\Projekte\mag\mageRep\localmage\Mage.Client\src\main\resources\buttons\sideboard_out.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Remove selected cards from sideboard."/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[2, 0, 2, 0]"/>
</Property>
@ -532,7 +632,7 @@
<Dimension value="[100, 30]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[50, 30]"/>
<Dimension value="[28, 22]"/>
</Property>
</Properties>
<Events>

View file

@ -145,9 +145,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
mainTable.getColumnModel().getColumn(7).setPreferredWidth(15);
cardSelectorScrollPane.setViewportView(mainTable);
mainTable.setOpaque(false);
cbSortBy.setEnabled(false);
chkPiles.setEnabled(false);
@ -164,6 +162,8 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
}
}
});
jToggleCardView.setToolTipText(jToggleCardView.getToolTipText() + " (works only up to " + CardGrid.MAX_IMAGES + " cards).");
}
/**
@ -221,22 +221,22 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
if (limited) {
ArrayList<Predicate<MageObject>> predicates = new ArrayList<>();
if (this.rdoGreen.isSelected()) {
if (this.tbGreen.isSelected()) {
predicates.add(new ColorPredicate(ObjectColor.GREEN));
}
if (this.rdoRed.isSelected()) {
if (this.tbRed.isSelected()) {
predicates.add(new ColorPredicate(ObjectColor.RED));
}
if (this.rdoBlack.isSelected()) {
if (this.tbBlack.isSelected()) {
predicates.add(new ColorPredicate(ObjectColor.BLACK));
}
if (this.rdoBlue.isSelected()) {
if (this.tbBlue.isSelected()) {
predicates.add(new ColorPredicate(ObjectColor.BLUE));
}
if (this.rdoWhite.isSelected()) {
if (this.tbWhite.isSelected()) {
predicates.add(new ColorPredicate(ObjectColor.WHITE));
}
if (this.rdoColorless.isSelected()) {
if (this.tbColorless.isSelected()) {
predicates.add(new ColorlessPredicate());
}
filter.add(Predicates.or(predicates));
@ -283,12 +283,12 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private CardCriteria buildCriteria() {
CardCriteria criteria = new CardCriteria();
criteria.black(this.rdoBlack.isSelected());
criteria.blue(this.rdoBlue.isSelected());
criteria.green(this.rdoGreen.isSelected());
criteria.red(this.rdoRed.isSelected());
criteria.white(this.rdoWhite.isSelected());
criteria.colorless(this.rdoColorless.isSelected());
criteria.black(this.tbBlack.isSelected());
criteria.blue(this.tbBlue.isSelected());
criteria.green(this.tbGreen.isSelected());
criteria.red(this.tbRed.isSelected());
criteria.white(this.tbWhite.isSelected());
criteria.colorless(this.tbColorless.isSelected());
if (this.rdoLand.isSelected()) {
criteria.types(CardType.LAND);
@ -323,6 +323,42 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
return criteria;
}
private boolean inverter(boolean invert, String string1, String string2) {
if (invert) {
return string1.equals(string2);
} else {
return !string1.equals(string2);
}
}
private void filterCardsColor(int modifiers, String actionCommand) {
// ALT Button was pushed
if ((modifiers & ActionEvent.ALT_MASK) == ActionEvent.ALT_MASK || (modifiers & ActionEvent.CTRL_MASK) == ActionEvent.CTRL_MASK) {
boolean invert = (modifiers & ActionEvent.ALT_MASK) == ActionEvent.ALT_MASK;
tbBlack.setSelected(inverter(invert, tbBlack.getActionCommand(), actionCommand));
tbBlue.setSelected(inverter(invert, tbBlue.getActionCommand(), actionCommand));
tbColorless.setSelected(inverter(invert, tbColorless.getActionCommand(), actionCommand));
tbGreen.setSelected(inverter(invert, tbGreen.getActionCommand(), actionCommand));
tbRed.setSelected(inverter(invert, tbRed.getActionCommand(), actionCommand));
tbWhite.setSelected(inverter(invert, tbWhite.getActionCommand(), actionCommand));
}
filterCards();
}
private void filterCardsType(int modifiers, String actionCommand) {
// ALT Button was pushed
if ((modifiers & ActionEvent.ALT_MASK) == ActionEvent.ALT_MASK) {
rdoArtifacts.setSelected(rdoArtifacts.getActionCommand().equals(actionCommand));
rdoCreatures.setSelected(rdoCreatures.getActionCommand().equals(actionCommand));
rdoEnchantments.setSelected(rdoEnchantments.getActionCommand().equals(actionCommand));
rdoInstants.setSelected(rdoInstants.getActionCommand().equals(actionCommand));
rdoLand.setSelected(rdoLand.getActionCommand().equals(actionCommand));
rdoPlaneswalkers.setSelected(rdoPlaneswalkers.getActionCommand().equals(actionCommand));
rdoSorceries.setSelected(rdoSorceries.getActionCommand().equals(actionCommand));
}
filterCards();
}
private void filterCards() {
FilterCard filter = buildFilter();
try {
@ -386,14 +422,17 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
bgView = new javax.swing.ButtonGroup();
tbColor = new javax.swing.JToolBar();
rdoRed = new javax.swing.JRadioButton();
rdoGreen = new javax.swing.JRadioButton();
rdoBlue = new javax.swing.JRadioButton();
rdoBlack = new javax.swing.JRadioButton();
rdoWhite = new javax.swing.JRadioButton();
rdoColorless = new javax.swing.JRadioButton();
tbRed = new javax.swing.JToggleButton();
tbGreen = new javax.swing.JToggleButton();
tbBlue = new javax.swing.JToggleButton();
tbBlack = new javax.swing.JToggleButton();
tbWhite = new javax.swing.JToggleButton();
tbColorless = new javax.swing.JToggleButton();
jSeparator1 = new javax.swing.JToolBar.Separator();
cbExpansionSet = new javax.swing.JComboBox<String>();
jSeparator2 = new javax.swing.JToolBar.Separator();
btnBooster = new javax.swing.JButton();
btnClear = new javax.swing.JButton();
tbTypes = new javax.swing.JToolBar();
@ -404,15 +443,18 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
rdoInstants = new javax.swing.JRadioButton();
rdoSorceries = new javax.swing.JRadioButton();
rdoPlaneswalkers = new javax.swing.JRadioButton();
jSeparator5 = new javax.swing.JToolBar.Separator();
chkPiles = new javax.swing.JCheckBox();
jSeparator3 = new javax.swing.JToolBar.Separator();
cbSortBy = new javax.swing.JComboBox<SortBy>();
jSeparator4 = new javax.swing.JToolBar.Separator();
jToggleListView = new javax.swing.JToggleButton();
jToggleCardView = new javax.swing.JToggleButton();
cardSelectorScrollPane = new javax.swing.JScrollPane();
cardSelectorBottomPanel = new javax.swing.JPanel();
jButtonAddToMain = new javax.swing.JButton();
jButtonAddToSideboard = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabelSearch = new javax.swing.JLabel();
jTextFieldSearch = new javax.swing.JTextField();
jButtonSearch = new javax.swing.JButton();
jButtonClean = new javax.swing.JButton();
@ -423,80 +465,102 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
tbColor.setFloatable(false);
tbColor.setRollover(true);
tbColor.setToolTipText("Click with ALT to deselct all other colors or CTRL for invert selection.");
tbColor.setBorderPainted(false);
tbColor.setName(""); // NOI18N
rdoRed.setSelected(true);
rdoRed.setText("Red ");
rdoRed.setFocusable(false);
rdoRed.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
rdoRed.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rdoRed.addActionListener(new java.awt.event.ActionListener() {
tbRed.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_red_off.png")); // NOI18N
tbRed.setSelected(true);
tbRed.setToolTipText("<html><font color='red'><strong>Red</strong><font/><br/>"
+ tbColor.getToolTipText());
tbRed.setActionCommand("Red");
tbRed.setFocusable(false);
tbRed.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
tbRed.setSelectedIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_red.png")); // NOI18N
tbRed.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
tbRed.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoRedActionPerformed(evt);
tbRedActionPerformed(evt);
}
});
tbColor.add(rdoRed);
tbColor.add(tbRed);
rdoGreen.setSelected(true);
rdoGreen.setText("Green ");
rdoGreen.setFocusable(false);
rdoGreen.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
rdoGreen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rdoGreen.addActionListener(new java.awt.event.ActionListener() {
tbGreen.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_green_off.png")); // NOI18N
tbGreen.setSelected(true);
tbGreen.setToolTipText("<html>Green<br/>" + tbColor.getToolTipText());
tbGreen.setActionCommand("Green");
tbGreen.setFocusable(false);
tbGreen.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
tbGreen.setSelectedIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_green.png")); // NOI18N
tbGreen.setVerifyInputWhenFocusTarget(false);
tbGreen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
tbGreen.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoGreenActionPerformed(evt);
tbGreenActionPerformed(evt);
}
});
tbColor.add(rdoGreen);
tbColor.add(tbGreen);
rdoBlue.setSelected(true);
rdoBlue.setText("Blue ");
rdoBlue.setFocusable(false);
rdoBlue.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
rdoBlue.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rdoBlue.addActionListener(new java.awt.event.ActionListener() {
tbBlue.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_blueOff.png")); // NOI18N
tbBlue.setSelected(true);
tbBlue.setToolTipText("<html>Blue<br/>" + tbColor.getToolTipText());
tbBlue.setActionCommand("Blue");
tbBlue.setFocusable(false);
tbBlue.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
tbBlue.setSelectedIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_blue.png")); // NOI18N
tbBlue.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
tbBlue.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoBlueActionPerformed(evt);
tbBlueActionPerformed(evt);
}
});
tbColor.add(rdoBlue);
tbColor.add(tbBlue);
rdoBlack.setSelected(true);
rdoBlack.setText("Black ");
rdoBlack.setFocusable(false);
rdoBlack.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
rdoBlack.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rdoBlack.addActionListener(new java.awt.event.ActionListener() {
tbBlack.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_black_off.png")); // NOI18N
tbBlack.setSelected(true);
tbBlack.setToolTipText("<html>Black<br/>" + tbColor.getToolTipText());
tbBlack.setActionCommand("Black");
tbBlack.setFocusable(false);
tbBlack.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
tbBlack.setSelectedIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_black.png")); // NOI18N
tbBlack.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
tbBlack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoBlackActionPerformed(evt);
tbBlackActionPerformed(evt);
}
});
tbColor.add(rdoBlack);
tbColor.add(tbBlack);
rdoWhite.setSelected(true);
rdoWhite.setText("White ");
rdoWhite.setFocusable(false);
rdoWhite.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
rdoWhite.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rdoWhite.addActionListener(new java.awt.event.ActionListener() {
tbWhite.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_white_off.png")); // NOI18N
tbWhite.setSelected(true);
tbWhite.setToolTipText("<html>White<br/>" + tbColor.getToolTipText());
tbWhite.setActionCommand("White");
tbWhite.setFocusable(false);
tbWhite.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
tbWhite.setSelectedIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\color_white.png")); // NOI18N
tbWhite.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
tbWhite.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoWhiteActionPerformed(evt);
tbWhiteActionPerformed(evt);
}
});
tbColor.add(rdoWhite);
tbColor.add(tbWhite);
rdoColorless.setSelected(true);
rdoColorless.setText("Colorless ");
rdoColorless.setFocusable(false);
rdoColorless.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
rdoColorless.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rdoColorless.addActionListener(new java.awt.event.ActionListener() {
tbColorless.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\colorless_off.png")); // NOI18N
tbColorless.setSelected(true);
tbColorless.setToolTipText("<html>Colorless<br/>" + tbColor.getToolTipText());
tbColorless.setActionCommand("Colorless");
tbColorless.setFocusable(false);
tbColorless.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
tbColorless.setSelectedIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\colorless.png")); // NOI18N
tbColorless.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
tbColorless.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoColorlessActionPerformed(evt);
tbColorlessActionPerformed(evt);
}
});
tbColor.add(rdoColorless);
tbColor.add(tbColorless);
tbColor.add(jSeparator1);
cbExpansionSet.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
cbExpansionSet.setMaximumSize(new java.awt.Dimension(250, 25));
@ -508,8 +572,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
}
});
tbColor.add(cbExpansionSet);
tbColor.add(jSeparator2);
btnBooster.setText("Open Booster");
btnBooster.setToolTipText("(CURRENTLY NOT WORKING) Generates a booster of the selected set and adds the cards to the card selector.");
btnBooster.setFocusable(false);
btnBooster.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnBooster.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
@ -533,6 +599,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
tbTypes.setFloatable(false);
tbTypes.setRollover(true);
tbTypes.setToolTipText("Click card type with ALT-KEY to only get the clicked card type.");
tbTypes.setPreferredSize(new java.awt.Dimension(732, 27));
rdoLand.setSelected(true);
@ -618,8 +685,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
}
});
tbTypes.add(rdoPlaneswalkers);
tbTypes.add(jSeparator5);
chkPiles.setText("Piles");
chkPiles.setToolTipText("Shows the card in piles by the selected sort.");
chkPiles.setFocusable(false);
chkPiles.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
chkPiles.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
@ -629,6 +698,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
}
});
tbTypes.add(chkPiles);
tbTypes.add(jSeparator3);
cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
cbSortBy.setMaximumSize(new java.awt.Dimension(120, 20));
@ -640,17 +710,19 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
}
});
tbTypes.add(cbSortBy);
tbTypes.add(jSeparator4);
bgView.add(jToggleListView);
jToggleListView.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\list_panel.png")); // NOI18N
jToggleListView.setSelected(true);
jToggleListView.setText("ListView");
jToggleListView.setToolTipText("Shows the cards as a list.");
jToggleListView.setBorderPainted(false);
jToggleListView.setFocusable(false);
jToggleListView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jToggleListView.setMargin(new java.awt.Insets(2, 2, 2, 2));
jToggleListView.setMaximumSize(new java.awt.Dimension(70, 23));
jToggleListView.setMinimumSize(new java.awt.Dimension(70, 23));
jToggleListView.setPreferredSize(new java.awt.Dimension(70, 23));
jToggleListView.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToggleListView.setMaximumSize(new java.awt.Dimension(37, 22));
jToggleListView.setMinimumSize(new java.awt.Dimension(37, 22));
jToggleListView.setPreferredSize(new java.awt.Dimension(37, 22));
jToggleListView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jToggleListViewActionPerformed(evt);
@ -658,14 +730,17 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
});
tbTypes.add(jToggleListView);
jToggleCardView.setText("CardView");
bgView.add(jToggleCardView);
jToggleCardView.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\card_panel.png")); // NOI18N
jToggleCardView.setToolTipText("Shows the card as images.");
jToggleCardView.setBorderPainted(false);
jToggleCardView.setFocusable(false);
jToggleCardView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jToggleCardView.setMargin(new java.awt.Insets(2, 2, 2, 2));
jToggleCardView.setMaximumSize(new java.awt.Dimension(70, 23));
jToggleCardView.setMinimumSize(new java.awt.Dimension(70, 23));
jToggleCardView.setPreferredSize(new java.awt.Dimension(70, 23));
jToggleCardView.setMaximumSize(new java.awt.Dimension(37, 22));
jToggleCardView.setMinimumSize(new java.awt.Dimension(37, 22));
jToggleCardView.setName(""); // NOI18N
jToggleCardView.setPreferredSize(new java.awt.Dimension(37, 22));
jToggleCardView.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToggleCardView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -677,33 +752,37 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
cardSelectorBottomPanel.setOpaque(false);
cardSelectorBottomPanel.setPreferredSize(new java.awt.Dimension(897, 40));
jButtonAddToMain.setText("+");
jButtonAddToMain.setToolTipText("Add selected card to deck");
jButtonAddToMain.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\deck_in.png")); // NOI18N
jButtonAddToMain.setToolTipText("Add selected cards to deck");
jButtonAddToMain.setMargin(null);
jButtonAddToMain.setMaximumSize(new java.awt.Dimension(42, 23));
jButtonAddToMain.setMinimumSize(new java.awt.Dimension(42, 23));
jButtonAddToMain.setPreferredSize(new java.awt.Dimension(42, 30));
jButtonAddToMain.setPreferredSize(new java.awt.Dimension(28, 22));
jButtonAddToMain.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonAddToMainActionPerformed(evt);
}
});
jButtonAddToSideboard.setText("+S");
jButtonAddToSideboard.setToolTipText("Add to Sideboard");
jButtonAddToSideboard.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\sideboard_in.png")); // NOI18N
jButtonAddToSideboard.setToolTipText("Add selected cards to sideboard.");
jButtonAddToSideboard.setMargin(new java.awt.Insets(2, 0, 2, 0));
jButtonAddToSideboard.setMaximumSize(new java.awt.Dimension(100, 30));
jButtonAddToSideboard.setMinimumSize(new java.awt.Dimension(10, 30));
jButtonAddToSideboard.setPreferredSize(new java.awt.Dimension(50, 30));
jButtonAddToSideboard.setPreferredSize(new java.awt.Dimension(28, 22));
jButtonAddToSideboard.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonAddToSideboardActionPerformed(evt);
}
});
jLabel1.setText("Search (by name,in rules):");
jLabelSearch.setText("Search:");
jLabelSearch.setToolTipText("Searches for card names and in the rule text of the card.");
jTextFieldSearch.setToolTipText("Searches for card names and in the rule text of the card.");
jButtonSearch.setText("Search");
jButtonSearch.setToolTipText("Performs the search.");
jButtonSearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonSearchActionPerformed(evt);
@ -711,6 +790,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
});
jButtonClean.setText("Clear");
jButtonClean.setToolTipText("Clears the search field.");
jButtonClean.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonCleanActionPerformed(evt);
@ -718,27 +798,28 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
});
cardCountLabel.setText("Card count:");
cardCountLabel.setToolTipText("Number of cards currently shown.");
cardCount.setText("0");
jButtonRemoveFromMain.setText("-");
jButtonRemoveFromMain.setToolTipText("Remove selected card from deck");
jButtonRemoveFromMain.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\deck_out.png")); // NOI18N
jButtonRemoveFromMain.setToolTipText("Remove selected cards from deck");
jButtonRemoveFromMain.setMargin(null);
jButtonRemoveFromMain.setMaximumSize(new java.awt.Dimension(42, 23));
jButtonRemoveFromMain.setMinimumSize(new java.awt.Dimension(42, 23));
jButtonRemoveFromMain.setPreferredSize(new java.awt.Dimension(42, 30));
jButtonRemoveFromMain.setPreferredSize(new java.awt.Dimension(28, 22));
jButtonRemoveFromMain.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonRemoveFromMainActionPerformed(evt);
}
});
jButtonRemoveFromSideboard.setText("-S");
jButtonRemoveFromSideboard.setToolTipText("Remove from Sideboard");
jButtonRemoveFromSideboard.setIcon(new javax.swing.ImageIcon("D:\\Projekte\\mag\\mageRep\\localmage\\Mage.Client\\src\\main\\resources\\buttons\\sideboard_out.png")); // NOI18N
jButtonRemoveFromSideboard.setToolTipText("Remove selected cards from sideboard.");
jButtonRemoveFromSideboard.setMargin(new java.awt.Insets(2, 0, 2, 0));
jButtonRemoveFromSideboard.setMaximumSize(new java.awt.Dimension(10, 30));
jButtonRemoveFromSideboard.setMinimumSize(new java.awt.Dimension(100, 30));
jButtonRemoveFromSideboard.setPreferredSize(new java.awt.Dimension(50, 30));
jButtonRemoveFromSideboard.setPreferredSize(new java.awt.Dimension(28, 22));
jButtonRemoveFromSideboard.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonRemoveFromSideboardActionPerformed(evt);
@ -759,7 +840,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButtonRemoveFromSideboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addComponent(jLabelSearch)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextFieldSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
@ -780,14 +861,14 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
.addComponent(jButtonRemoveFromMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonAddToSideboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonRemoveFromSideboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addComponent(jLabelSearch)
.addComponent(jTextFieldSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonSearch)
.addComponent(jButtonClean)
.addComponent(cardCountLabel)
.addComponent(cardCount)
.addComponent(jButtonAddToMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(4, 4, 4))
);
cardCountLabel.getAccessibleContext().setAccessibleName("cardCountLabel");
@ -808,63 +889,39 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
.addComponent(tbColor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(tbTypes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cardSelectorScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
.addGap(0, 0, 0)
.addComponent(cardSelectorScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
.addGap(0, 0, 0)
.addComponent(cardSelectorBottomPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(cardSelectorBottomPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
);
}// </editor-fold>//GEN-END:initComponents
private void rdoGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoGreenActionPerformed
filterCards();
}//GEN-LAST:event_rdoGreenActionPerformed
private void rdoBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlackActionPerformed
filterCards();
}//GEN-LAST:event_rdoBlackActionPerformed
private void rdoWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoWhiteActionPerformed
filterCards();
}//GEN-LAST:event_rdoWhiteActionPerformed
private void rdoRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoRedActionPerformed
filterCards();
}//GEN-LAST:event_rdoRedActionPerformed
private void rdoBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoBlueActionPerformed
filterCards();
}//GEN-LAST:event_rdoBlueActionPerformed
private void rdoColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoColorlessActionPerformed
filterCards();
}//GEN-LAST:event_rdoColorlessActionPerformed
private void rdoLandActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoLandActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoLandActionPerformed
private void rdoCreaturesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCreaturesActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoCreaturesActionPerformed
private void rdoArtifactsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoArtifactsActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoArtifactsActionPerformed
private void rdoEnchantmentsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoEnchantmentsActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoEnchantmentsActionPerformed
private void rdoInstantsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoInstantsActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoInstantsActionPerformed
private void rdoSorceriesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoSorceriesActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoSorceriesActionPerformed
private void rdoPlaneswalkersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoPlaneswalkersActionPerformed
filterCards();
filterCardsType(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_rdoPlaneswalkersActionPerformed
private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed
@ -916,8 +973,6 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private void jToggleListViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleListViewActionPerformed
if (!(currentView instanceof TableModel)) {
toggleViewMode();
} else {
jToggleListView.setSelected(true);
}
filterCards();
}//GEN-LAST:event_jToggleListViewActionPerformed
@ -925,13 +980,11 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private void jToggleCardViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleCardViewActionPerformed
if (currentView.cardsSize() > CardGrid.MAX_IMAGES) {
jToggleCardView.setSelected(false);
jToggleListView.setSelected(true);
JOptionPane.showMessageDialog(this, new StringBuilder("The card view can't be used for more than ").append(CardGrid.MAX_IMAGES).append(" cards.").toString());
} else {
if (!(currentView instanceof CardGrid)) {
toggleViewMode();
} else {
jToggleCardView.setSelected(true);
}
filterCards();
}
@ -985,6 +1038,30 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
filterCards();
}//GEN-LAST:event_jButtonCleanActionPerformed
private void tbRedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbRedActionPerformed
filterCardsColor(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_tbRedActionPerformed
private void tbGreenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbGreenActionPerformed
filterCardsColor(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_tbGreenActionPerformed
private void tbBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBlueActionPerformed
filterCardsColor(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_tbBlueActionPerformed
private void tbBlackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBlackActionPerformed
filterCardsColor(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_tbBlackActionPerformed
private void tbWhiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbWhiteActionPerformed
filterCardsColor(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_tbWhiteActionPerformed
private void tbColorlessActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbColorlessActionPerformed
filterCardsColor(evt.getModifiers(), evt.getActionCommand());
}//GEN-LAST:event_tbColorlessActionPerformed
private void toggleViewMode() {
if (currentView instanceof CardGrid) {
jToggleListView.setSelected(true);
@ -1029,6 +1106,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private ICardGrid currentView;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.ButtonGroup bgView;
private javax.swing.JButton btnBooster;
private javax.swing.JButton btnClear;
private javax.swing.JLabel cardCount;
@ -1044,25 +1122,30 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
private javax.swing.JButton jButtonRemoveFromMain;
private javax.swing.JButton jButtonRemoveFromSideboard;
private javax.swing.JButton jButtonSearch;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabelSearch;
private javax.swing.JToolBar.Separator jSeparator1;
private javax.swing.JToolBar.Separator jSeparator2;
private javax.swing.JToolBar.Separator jSeparator3;
private javax.swing.JToolBar.Separator jSeparator4;
private javax.swing.JToolBar.Separator jSeparator5;
private javax.swing.JTextField jTextFieldSearch;
private javax.swing.JToggleButton jToggleCardView;
private javax.swing.JToggleButton jToggleListView;
private javax.swing.JRadioButton rdoArtifacts;
private javax.swing.JRadioButton rdoBlack;
private javax.swing.JRadioButton rdoBlue;
private javax.swing.JRadioButton rdoColorless;
private javax.swing.JRadioButton rdoCreatures;
private javax.swing.JRadioButton rdoEnchantments;
private javax.swing.JRadioButton rdoGreen;
private javax.swing.JRadioButton rdoInstants;
private javax.swing.JRadioButton rdoLand;
private javax.swing.JRadioButton rdoPlaneswalkers;
private javax.swing.JRadioButton rdoRed;
private javax.swing.JRadioButton rdoSorceries;
private javax.swing.JRadioButton rdoWhite;
private javax.swing.JToggleButton tbBlack;
private javax.swing.JToggleButton tbBlue;
private javax.swing.JToolBar tbColor;
private javax.swing.JToggleButton tbColorless;
private javax.swing.JToggleButton tbGreen;
private javax.swing.JToggleButton tbRed;
private javax.swing.JToolBar tbTypes;
private javax.swing.JToggleButton tbWhite;
// End of variables declaration//GEN-END:variables
private final mage.client.cards.CardGrid cardGrid;

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

View file

@ -1,145 +0,0 @@
1|Admonition Angel
2|Apex Hawks
3|Archon of Redemption
4|Battle Hurda
5|Fledgling Griffin
6|Guardian Zendikon
7|Hada Freeblade
8|Iona's Judgment
9|Join the Ranks
10|Kitesail Apprentice
11|Kor Firewalker
12|Lightkeeper of Emeria
13|Loam Lion
14|Marsh Threader
15|Marshal's Anthem
16|Perimeter Captain
17|Refraction Trap
18|Rest for the Weary
19|Ruin Ghost
20|Stoneforge Mystic
21|Talus Paladin
22|Terra Eternal
23|Veteran's Reflexes
24|AEther Tradewinds
25|Calcite Snapper
26|Dispel
27|Enclave Elite
28|Goliath Sphinx
29|Halimar Excavator
30|Horizon Drake
31|Jace, the Mind Sculptor
32|Jwari Shapeshifter
33|Mysteries of the Deep
34|Permafrost Trap
35|Quest for Ula's Temple
36|Sejiri Merfolk
37|Selective Memory
38|Spell Contortion
39|Surrakar Banisher
40|Thada Adel, Acquisitor
41|Tideforce Elemental
42|Treasure Hunt
43|Twitch
44|Vapor Snare
45|Voyager Drake
46|Wind Zendikon
47|Abyssal Persecutor
48|Agadeem Occultist
49|Anowon, the Ruin Sage
50|Bloodhusk Ritualist
51|Bojuka Brigand
52|Brink of Disaster
53|Butcher of Malakir
54|Caustic Crawler
55|Corrupted Zendikon
56|Dead Reckoning
57|Death's Shadow
58|Jagwasp Swarm
59|Kalastria Highborn
60|Mire's Toll
61|Nemesis Trap
62|Pulse Tracker
63|Quag Vampires
64|Quest for the Nihil Stone
65|Ruthless Cullblade
66|Scrib Nibblers
67|Shoreline Salvager
68|Smother
69|Tomb Hex
70|Urge to Feed
71|Akoum Battlesinger
72|Bazaar Trader
73|Bull Rush
74|Chain Reaction
75|Claws of Valakut
76|Comet Storm
77|Cosi's Ravager
78|Crusher Zendikon
79|Cunning Sparkmage
80|Deathforge Shaman
81|Dragonmaster Outcast
82|Goblin Roughrider
83|Grotag Thrasher
84|Kazuul, Tyrant of the Cliffs
85|Mordant Dragon
86|Quest for the Goblin Lord
87|Ricochet Trap
88|Roiling Terrain
89|Rumbling Aftershocks
90|Searing Blaze
91|Skitter of Lizards
92|Slavering Nulls
93|Stone Idol Trap
94|Tuktuk Scrapper
95|Arbor Elf
96|Avenger of Zendikar
97|Bestial Menace
98|Canopy Cover
99|Explore
100|Feral Contest
101|Gnarlid Pack
102|Grappler Spider
103|Graypelt Hunter
104|Groundswell
105|Harabaz Druid
106|Joraga Warcaller
107|Leatherback Baloth
108|Nature's Claim
109|Omnath, Locus of Mana
110|Quest for Renewal
111|Slingbow Trap
112|Snapping Creeper
113|Strength of the Tajuru
114|Summit Apes
115|Terastodon
116|Vastwood Animist
117|Vastwood Zendikon
118|Wolfbriar Elemental
119|Novablast Wurm
120|Wrexial, the Risen Deep
121|Amulet of Vigor
122|Basilisk Collar
123|Everflowing Chalice
124|Hammer of Ruin
125|Hedron Rover
126|Kitesail
127|Lodestone Golem
128|Pilgrim's Eye
129|Razor Boomerang
130|Seer's Sundial
131|Walking Atlas
132|Bojuka Bog
133|Celestial Colonnade
134|Creeping Tar Pit
135|Dread Statuary
136|Eye of Ugin
137|Halimar Depths
138|Khalni Garden
139|Lavaclaw Reaches
140|Quicksand
141|Raging Ravine
142|Sejiri Steppe
143|Smoldering Spires
144|Stirring Wildwood
145|Tectonic Edge

View file

@ -1,269 +0,0 @@
1|Armament Master
2|Arrow Volley Trap
3|Bold Defense
4|Brave the Elements
5|Caravan Hurda
6|Celestial Mantle
7|Cliff Threader
8|Conqueror's Pledge
9|Day of Judgment
10|Devout Lightcaster
11|Emeria Angel
12|Felidar Sovereign
13|Iona, Shield of Emeria
14|Journey to Nowhere
15|Kabira Evangel
16|Kazandu Blademaster
17|Kor Aeronaut
18|Kor Cartographer
19|Kor Duelist
20|Kor Hookmaster
21|Kor Outfitter
22|Kor Sanctifiers
23|Kor Skyfisher
24|Landbind Ritual
25|Luminarch Ascension
26|Makindi Shieldmate
27|Narrow Escape
28|Nimbus Wings
29|Noble Vestige
30|Ondu Cleric
31|Pillarfield Ox
32|Pitfall Trap
33|Quest for the Holy Relic
34|Shepherd of the Lost
35|Shieldmate's Blessing
36|Steppe Lynx
37|Sunspring Expedition
38|Windborne Charge
39|World Queller
40|AEther Figment
41|Archive Trap
42|Archmage Ascension
43|Caller of Gales
44|Cancel
45|Cosi's Trickster
46|Gomazoa
47|Hedron Crab
48|Into the Roil
49|Ior Ruin Expedition
50|Kraken Hatchling
51|Lethargy Trap
52|Living Tsunami
53|Lorthos, the Tidemaker
54|Lullmage Mentor
55|Merfolk Seastalkers
56|Merfolk Wayfinder
57|Mindbreak Trap
58|Paralyzing Grasp
59|Quest for Ancient Secrets
60|Reckless Scholar
61|Rite of Replication
62|Roil Elemental
63|Sea Gate Loremaster
64|Seascape Aerialist
65|Shoal Serpent
66|Sky Ruin Drake
67|Spell Pierce
68|Sphinx of Jwar Isle
69|Sphinx of Lost Truths
70|Spreading Seas
71|Summoner's Bane
72|Tempest Owl
73|Trapfinder's Trick
74|Trapmaker's Snare
75|Umara Raptor
76|Welkin Tern
77|Whiplash Trap
78|Windrider Eel
79|Bala Ged Thief
80|Blood Seeker
81|Blood Tribute
82|Bloodchief Ascension
83|Bloodghast
84|Bog Tatters
85|Crypt Ripper
86|Desecrated Earth
87|Disfigure
88|Feast of Blood
89|Gatekeeper of Malakir
90|Giant Scorpion
91|Grim Discovery
92|Guul Draz Specter
93|Guul Draz Vampire
94|Hagra Crocodile
95|Hagra Diabolist
96|Halo Hunter
97|Heartstabber Mosquito
98|Hideous End
99|Kalitas, Bloodchief of Ghet
100|Malakir Bloodwitch
101|Marsh Casualties
102|Mind Sludge
103|Mindless Null
104|Mire Blight
105|Needlebite Trap
106|Nimana Sell-Sword
107|Ob Nixilis, the Fallen
108|Quest for the Gravelord
109|Ravenous Trap
110|Sadistic Sacrament
111|Sorin Markov
112|Soul Stair Expedition
113|Surrakar Marauder
114|Vampire Hexmage
115|Vampire Lacerator
116|Vampire Nighthawk
117|Vampire's Bite
118|Bladetusk Boar
119|Burst Lightning
120|Chandra Ablaze
121|Demolish
122|Electropotence
123|Elemental Appeal
124|Geyser Glider
125|Goblin Bushwhacker
126|Goblin Guide
127|Goblin Ruinblaster
128|Goblin Shortcutter
129|Goblin War Paint
130|Hellfire Mongrel
131|Hellkite Charger
132|Highland Berserker
133|Inferno Trap
134|Kazuul Warlord
135|Lavaball Trap
136|Magma Rift
137|Mark of Mutiny
138|Molten Ravager
139|Murasa Pyromancer
140|Obsidian Fireheart
141|Plated Geopede
142|Punishing Fire
143|Pyromancer Ascension
144|Quest for Pure Flame
145|Ruinous Minotaur
146|Runeflare Trap
147|Seismic Shudder
148|Shatterskull Giant
149|Slaughter Cry
150|Spire Barrage
151|Torch Slinger
152|Tuktuk Grunts
153|Unstable Footing
154|Warren Instigator
155|Zektar Shrine Expedition
156|Baloth Cage Trap
157|Baloth Woodcrasher
158|Beast Hunt
159|Beastmaster Ascension
160|Cobra Trap
161|Frontier Guide
162|Gigantiform
163|Grazing Gladehart
164|Greenweaver Druid
165|Harrow
166|Joraga Bard
167|Khalni Heart Expedition
168|Lotus Cobra
169|Mold Shambler
170|Nissa Revane
171|Nissa's Chosen
172|Oracle of Mul Daya
173|Oran-Rief Recluse
174|Oran-Rief Survivalist
175|Predatory Urge
176|Primal Bellow
177|Quest for the Gemblades
178|Rampaging Baloths
179|Relic Crush
180|River Boa
181|Savage Silhouette
182|Scute Mob
183|Scythe Tiger
184|Summoning Trap
185|Tajuru Archer
186|Tanglesap
187|Terra Stomper
188|Territorial Baloth
189|Timbermaw Larva
190|Turntimber Basilisk
191|Turntimber Ranger
192|Vastwood Gorger
193|Vines of Vastwood
194|Zendikar Farguide
195|Adventuring Gear
196|Blade of the Bloodchief
197|Blazing Torch
198|Carnage Altar
199|Eldrazi Monument
200|Eternity Vessel
201|Expedition Map
202|Explorer's Scope
203|Grappling Hook
204|Hedron Scrabbler
205|Khalni Gem
206|Spidersilk Net
207|Stonework Puma
208|Trailblazer's Boots
209|Trusty Machete
210|Akoum Refuge
211|Arid Mesa
212|Crypt of Agadeem
213|Emeria, the Sky Ruin
214|Graypelt Refuge
215|Jwar Isle Refuge
216|Kabira Crossroads
217|Kazandu Refuge
218|Magosi, the Waterveil
219|Marsh Flats
220|Misty Rainforest
221|Oran-Rief, the Vastwood
222|Piranha Marsh
223|Scalding Tarn
224|Sejiri Refuge
225|Soaring Seacliff
226|Teetering Peaks
227|Turntimber Grove
228|Valakut, the Molten Pinnacle
229|Verdant Catacombs
230|Plains
230|Plains
231|Plains
231|Plains
232|Plains
232|Plains
233|Plains
233|Plains
234|Island
234|Island
235|Island
235|Island
236|Island
236|Island
237|Island
237|Island
238|Swamp
238|Swamp
239|Swamp
239|Swamp
240|Swamp
240|Swamp
241|Swamp
241|Swamp
242|Mountain
242|Mountain
243|Mountain
243|Mountain
244|Mountain
244|Mountain
245|Mountain
245|Mountain
246|Forest
246|Forest
247|Forest
247|Forest
248|Forest
248|Forest
249|Forest
249|Forest