mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Deck editor - Some minor layout changes (not finished yet).
This commit is contained in:
parent
9364616517
commit
4a83b416d4
6 changed files with 385 additions and 197 deletions
|
|
@ -7,6 +7,9 @@
|
|||
<LineBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[30, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="(!Beans.isDesignTime())?(new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight)):(new Dimension(100, 100))" type="code"/>
|
||||
</Property>
|
||||
|
|
@ -26,50 +29,55 @@
|
|||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" alignment="0" pref="808" max="32767" attributes="0"/>
|
||||
<Component id="panelCardArea" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="panelControl" pref="910" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="23" max="32767" attributes="0"/>
|
||||
<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="50" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JLayeredPane" name="cardArea">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Container class="javax.swing.JPanel" name="panelControl">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[616, 23]"/>
|
||||
</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="[616, 23]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="lblCount" min="-2" pref="81" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="1"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCount" min="-2" pref="75" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCreatureCount" min="-2" pref="100" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblLandCount" min="-2" pref="75" 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" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jToggleListView" min="-2" pref="76" 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"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -88,21 +96,6 @@
|
|||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JComboBox" name="cbSortBy">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="4">
|
||||
<StringItem index="0" value="Item 1"/>
|
||||
<StringItem index="1" value="Item 2"/>
|
||||
<StringItem index="2" value="Item 3"/>
|
||||
<StringItem index="3" value="Item 4"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbSortByActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblCount">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Card Count"/>
|
||||
|
|
@ -118,6 +111,40 @@
|
|||
<Property name="text" type="java.lang.String" value="Land Count"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkPiles">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Piles"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkPilesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="cbSortBy">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="1">
|
||||
<StringItem index="0" value="SortBy"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Sort the cards if card view is active."/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 20]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 20]"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="SortBy" noResource="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 20]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbSortByActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<SortBy>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JToggleButton" name="jToggleListView">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
|
|
@ -146,7 +173,6 @@
|
|||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[77, 21]"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[77, 21]"/>
|
||||
</Property>
|
||||
|
|
@ -155,14 +181,25 @@
|
|||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jToggleCardViewActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkPiles">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Piles"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkPilesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="panelCardArea">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo">
|
||||
<BevelBorder bevelType="1"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JLayeredPane" name="cardArea">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
|
||||
<Property name="useNullLayout" type="boolean" value="true"/>
|
||||
</Layout>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
|
|
|||
|
|
@ -113,10 +113,12 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
}
|
||||
|
||||
private void makeTransparent() {
|
||||
jScrollPane1.setOpaque(false);
|
||||
panelCardArea.setOpaque(false);
|
||||
cardArea.setOpaque(false);
|
||||
jScrollPane1.getViewport().setOpaque(false);
|
||||
cbSortBy.setModel(new DefaultComboBoxModel(SortBy.values()));
|
||||
panelCardArea.getViewport().setOpaque(false);
|
||||
panelControl.setBackground(new Color(250, 250, 250, 150));
|
||||
panelControl.setOpaque(true);
|
||||
cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values()));
|
||||
}
|
||||
|
||||
private void initListViewComponents() {
|
||||
|
|
@ -140,7 +142,7 @@ 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")) {
|
||||
jScrollPane1.setViewportView(mainTable);
|
||||
panelCardArea.setViewportView(mainTable);
|
||||
currentView = mainModel;
|
||||
cbSortBy.setEnabled(false);
|
||||
chkPiles.setEnabled(false);
|
||||
|
|
@ -148,7 +150,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
jToggleCardView.setSelected(true);
|
||||
jToggleListView.setSelected(false);
|
||||
currentView = this;
|
||||
jScrollPane1.setViewportView(cardArea);
|
||||
panelCardArea.setViewportView(cardArea);
|
||||
cbSortBy.setEnabled(true);
|
||||
chkPiles.setEnabled(true);
|
||||
}
|
||||
|
|
@ -386,28 +388,26 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
cardArea = new javax.swing.JLayeredPane();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
cbSortBy = new javax.swing.JComboBox();
|
||||
panelControl = new javax.swing.JPanel();
|
||||
lblCount = new javax.swing.JLabel();
|
||||
lblCreatureCount = new javax.swing.JLabel();
|
||||
lblLandCount = new javax.swing.JLabel();
|
||||
chkPiles = new javax.swing.JCheckBox();
|
||||
cbSortBy = new javax.swing.JComboBox<SortBy>();
|
||||
jToggleListView = new javax.swing.JToggleButton();
|
||||
jToggleCardView = new javax.swing.JToggleButton();
|
||||
chkPiles = new javax.swing.JCheckBox();
|
||||
panelCardArea = new javax.swing.JScrollPane();
|
||||
cardArea = new javax.swing.JLayeredPane();
|
||||
|
||||
setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
|
||||
setMinimumSize(new java.awt.Dimension(30, 30));
|
||||
setPreferredSize((!Beans.isDesignTime())?(new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight)):(new Dimension(100, 100)));
|
||||
|
||||
jScrollPane1.setViewportView(cardArea);
|
||||
|
||||
cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||
cbSortBy.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbSortByActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
panelControl.setMaximumSize(new java.awt.Dimension(32767, 23));
|
||||
panelControl.setMinimumSize(new java.awt.Dimension(616, 23));
|
||||
panelControl.setName(""); // NOI18N
|
||||
panelControl.setPreferredSize(new java.awt.Dimension(616, 23));
|
||||
panelControl.setRequestFocusEnabled(false);
|
||||
|
||||
lblCount.setText("Card Count");
|
||||
|
||||
|
|
@ -415,6 +415,25 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
|
||||
lblLandCount.setText("Land Count");
|
||||
|
||||
chkPiles.setText("Piles");
|
||||
chkPiles.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
chkPilesActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SortBy" }));
|
||||
cbSortBy.setToolTipText("Sort the cards if card view is active.");
|
||||
cbSortBy.setMaximumSize(new java.awt.Dimension(80, 20));
|
||||
cbSortBy.setMinimumSize(new java.awt.Dimension(80, 20));
|
||||
cbSortBy.setName("SortBy"); // NOI18N
|
||||
cbSortBy.setPreferredSize(new java.awt.Dimension(80, 20));
|
||||
cbSortBy.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbSortByActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jToggleListView.setSelected(true);
|
||||
jToggleListView.setText("ListView");
|
||||
jToggleListView.setFocusable(false);
|
||||
|
|
@ -430,7 +449,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
jToggleCardView.setText("CardView");
|
||||
jToggleCardView.setMaximumSize(new java.awt.Dimension(77, 21));
|
||||
jToggleCardView.setMinimumSize(new java.awt.Dimension(77, 21));
|
||||
jToggleCardView.setOpaque(true);
|
||||
jToggleCardView.setPreferredSize(new java.awt.Dimension(77, 21));
|
||||
jToggleCardView.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
|
|
@ -438,35 +456,30 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
}
|
||||
});
|
||||
|
||||
chkPiles.setText("Piles");
|
||||
chkPiles.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
chkPilesActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
||||
jPanel1.setLayout(jPanel1Layout);
|
||||
jPanel1Layout.setHorizontalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
|
||||
.addComponent(lblCount, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
javax.swing.GroupLayout panelControlLayout = new javax.swing.GroupLayout(panelControl);
|
||||
panelControl.setLayout(panelControlLayout);
|
||||
panelControlLayout.setHorizontalGroup(
|
||||
panelControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelControlLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(lblCount, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lblCreatureCount, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(lblLandCount, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(chkPiles)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(cbSortBy, 0, 1, Short.MAX_VALUE)
|
||||
.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)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jToggleCardView, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(92, 92, 92))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
panelControlLayout.setVerticalGroup(
|
||||
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)
|
||||
|
|
@ -476,22 +489,45 @@ 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))
|
||||
);
|
||||
|
||||
panelCardArea.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
|
||||
panelCardArea.setViewportView(cardArea);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 959, Short.MAX_VALUE)
|
||||
.addComponent(panelCardArea)
|
||||
.addComponent(panelControl, javax.swing.GroupLayout.DEFAULT_SIZE, 910, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE))
|
||||
.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, 50, 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");
|
||||
}//GEN-LAST:event_jToggleListViewActionPerformed
|
||||
|
||||
private void cbSortByActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbSortByActionPerformed
|
||||
sortSetting.setSortBy((SortBy) cbSortBy.getSelectedItem());
|
||||
drawCards(sortSetting);
|
||||
|
|
@ -502,37 +538,17 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
drawCards(sortSetting);
|
||||
}//GEN-LAST:event_chkPilesActionPerformed
|
||||
|
||||
private void jToggleListViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleListViewActionPerformed
|
||||
jToggleCardView.setSelected(false);
|
||||
currentView = mainModel;
|
||||
jScrollPane1.setViewportView(mainTable);
|
||||
cbSortBy.setEnabled(false);
|
||||
chkPiles.setEnabled(false);
|
||||
redrawCards();
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "listView");
|
||||
}//GEN-LAST:event_jToggleListViewActionPerformed
|
||||
|
||||
private void jToggleCardViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleCardViewActionPerformed
|
||||
jToggleListView.setSelected(false);
|
||||
currentView = this;
|
||||
jScrollPane1.setViewportView(cardArea);
|
||||
cbSortBy.setEnabled(true);
|
||||
chkPiles.setEnabled(true);
|
||||
redrawCards();
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView");
|
||||
}//GEN-LAST:event_jToggleCardViewActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLayeredPane cardArea;
|
||||
private javax.swing.JComboBox cbSortBy;
|
||||
private javax.swing.JComboBox<SortBy> cbSortBy;
|
||||
private javax.swing.JCheckBox chkPiles;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JToggleButton jToggleCardView;
|
||||
private javax.swing.JToggleButton jToggleListView;
|
||||
private javax.swing.JLabel lblCount;
|
||||
private javax.swing.JLabel lblCreatureCount;
|
||||
private javax.swing.JLabel lblLandCount;
|
||||
private javax.swing.JScrollPane panelCardArea;
|
||||
private javax.swing.JPanel panelControl;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -16,25 +16,21 @@
|
|||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tbColor" alignment="0" pref="917" max="32767" attributes="0"/>
|
||||
<Component id="tbTypes" alignment="0" pref="917" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cardSelectorBottomPanel" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="cardSelectorScrollPane" alignment="0" pref="917" max="32767" attributes="0"/>
|
||||
<Component id="tbColor" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbTypes" alignment="0" pref="897" max="32767" attributes="0"/>
|
||||
<Component id="cardSelectorScrollPane" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="cardSelectorBottomPanel" 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="tbColor" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="tbColor" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="tbTypes" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cardSelectorScrollPane" pref="273" max="32767" attributes="0"/>
|
||||
<EmptySpace 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="220" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="cardSelectorBottomPanel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
|
|
@ -45,6 +41,8 @@
|
|||
<Properties>
|
||||
<Property name="floatable" type="boolean" value="false"/>
|
||||
<Property name="rollover" type="boolean" value="true"/>
|
||||
<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"/>
|
||||
|
|
@ -131,10 +129,22 @@
|
|||
<StringItem index="3" value="Item 4"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 25]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbExpansionSetActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnBooster">
|
||||
<Properties>
|
||||
|
|
@ -164,6 +174,9 @@
|
|||
<Properties>
|
||||
<Property name="floatable" type="boolean" value="false"/>
|
||||
<Property name="rollover" type="boolean" value="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[732, 27]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
|
||||
|
|
@ -273,17 +286,42 @@
|
|||
<StringItem index="3" value="Item 4"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 20]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 20]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[120, 20]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbSortByActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<SortBy>"/>
|
||||
</AuxValues>
|
||||
</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="horizontalAlignment" type="int" value="10"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 4, 2, 4]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[51, 21]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[51, 21]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[51, 21]"/>
|
||||
</Property>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
|
@ -294,6 +332,7 @@
|
|||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="CardView"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalAlignment" type="int" value="10"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
</Properties>
|
||||
|
|
@ -319,42 +358,47 @@
|
|||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Component id="jButtonAddToMain" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButtonRemoveFromMain" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jButtonAddToSideboard" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
||||
<Component id="jButtonRemoveFromSideboard" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jTextFieldSearch" min="-2" pref="112" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButtonAddToSideboard" min="-2" max="-2" attributes="0"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<Component id="jButtonSearch" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jButtonClean" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cardCountLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cardCount" min="-2" pref="48" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="121" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="jButtonAddToMain" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" 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"/>
|
||||
<Component id="cardCountLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cardCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<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"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jButtonAddToMain" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<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="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"/>
|
||||
<Component id="cardCountLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="cardCount" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
|
@ -363,7 +407,19 @@
|
|||
<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 to Main"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Add selected card to deck"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 10, 2, 10]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonAddToMainActionPerformed"/>
|
||||
|
|
@ -373,6 +429,18 @@
|
|||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="+S"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Add to Sideboard"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 4, 2, 4]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonAddToSideboardActionPerformed"/>
|
||||
|
|
@ -420,7 +488,19 @@
|
|||
<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 from Main"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Remove selected card from deck"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 10, 2, 10]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonRemoveFromMainActionPerformed"/>
|
||||
|
|
@ -430,6 +510,18 @@
|
|||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="-S"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Remove from Sideboard"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[2, 4, 2, 4]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[36, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonRemoveFromSideboardActionPerformed"/>
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
cardGrid.setOpaque(false);
|
||||
cardSelectorScrollPane.setOpaque(false);
|
||||
cardSelectorScrollPane.getViewport().setOpaque(false);
|
||||
cbSortBy.setModel(new DefaultComboBoxModel(SortBy.values()));
|
||||
cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values()));
|
||||
cbSortBy.setSelectedItem(sortSetting.getSortBy());
|
||||
jTextFieldSearch.addActionListener(searchAction);
|
||||
// make the components more readable
|
||||
|
|
@ -120,6 +120,8 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
tbColor.setOpaque(true); // false = transparent
|
||||
tbTypes.setBackground(new Color(250, 250, 250, 150));
|
||||
tbTypes.setOpaque(true); // false = transparent
|
||||
cardSelectorBottomPanel.setBackground(new Color(250, 250, 250, 150));
|
||||
cardSelectorBottomPanel.setOpaque(true); // false = transparent
|
||||
}
|
||||
|
||||
private void initListViewComponents() {
|
||||
|
|
@ -205,7 +207,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
this.btnBooster.setVisible(true);
|
||||
this.btnClear.setVisible(true);
|
||||
this.cbExpansionSet.setVisible(true);
|
||||
cbExpansionSet.setModel(new DefaultComboBoxModel(ConstructedFormats.getTypes()));
|
||||
cbExpansionSet.setModel(new DefaultComboBoxModel<>(ConstructedFormats.getTypes()));
|
||||
// Action event on Expansion set triggers loadCards method
|
||||
cbExpansionSet.setSelectedIndex(0);
|
||||
}
|
||||
|
|
@ -217,7 +219,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
filter.add(new CardTextPredicate(name));
|
||||
|
||||
if (limited) {
|
||||
ArrayList<Predicate<MageObject>> predicates = new ArrayList<Predicate<MageObject>>();
|
||||
ArrayList<Predicate<MageObject>> predicates = new ArrayList<>();
|
||||
|
||||
if (this.rdoGreen.isSelected()) {
|
||||
predicates.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
|
|
@ -267,7 +269,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
if (this.cbExpansionSet.isVisible()) {
|
||||
String expansionSelection = this.cbExpansionSet.getSelectedItem().toString();
|
||||
if (!expansionSelection.equals("- All Sets")) {
|
||||
ArrayList<Predicate<Card>> expansionPredicates = new ArrayList<Predicate<Card>>();
|
||||
ArrayList<Predicate<Card>> expansionPredicates = new ArrayList<>();
|
||||
for (String setCode : ConstructedFormats.getSetsByFormat(expansionSelection)) {
|
||||
expansionPredicates.add(new ExpansionSetPredicate(setCode));
|
||||
}
|
||||
|
|
@ -324,7 +326,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
private void filterCards() {
|
||||
FilterCard filter = buildFilter();
|
||||
try {
|
||||
List<Card> filteredCards = new ArrayList<Card>();
|
||||
List<Card> filteredCards = new ArrayList<>();
|
||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||
if (limited) {
|
||||
for (Card card: cards) {
|
||||
|
|
@ -358,7 +360,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
}
|
||||
|
||||
public List<ICardGrid> getCardGridComponents() {
|
||||
List<ICardGrid> components = new ArrayList<ICardGrid>();
|
||||
List<ICardGrid> components = new ArrayList<>();
|
||||
components.add(mainModel);
|
||||
components.add(cardGrid);
|
||||
return components;
|
||||
|
|
@ -391,7 +393,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
rdoBlack = new javax.swing.JRadioButton();
|
||||
rdoWhite = new javax.swing.JRadioButton();
|
||||
rdoColorless = new javax.swing.JRadioButton();
|
||||
cbExpansionSet = new javax.swing.JComboBox();
|
||||
cbExpansionSet = new javax.swing.JComboBox<String>();
|
||||
btnBooster = new javax.swing.JButton();
|
||||
btnClear = new javax.swing.JButton();
|
||||
tbTypes = new javax.swing.JToolBar();
|
||||
|
|
@ -403,7 +405,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
rdoSorceries = new javax.swing.JRadioButton();
|
||||
rdoPlaneswalkers = new javax.swing.JRadioButton();
|
||||
chkPiles = new javax.swing.JCheckBox();
|
||||
cbSortBy = new javax.swing.JComboBox();
|
||||
cbSortBy = new javax.swing.JComboBox<SortBy>();
|
||||
jToggleListView = new javax.swing.JToggleButton();
|
||||
jToggleCardView = new javax.swing.JToggleButton();
|
||||
cardSelectorScrollPane = new javax.swing.JScrollPane();
|
||||
|
|
@ -421,6 +423,8 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
|
||||
tbColor.setFloatable(false);
|
||||
tbColor.setRollover(true);
|
||||
tbColor.setBorderPainted(false);
|
||||
tbColor.setName(""); // NOI18N
|
||||
|
||||
rdoRed.setSelected(true);
|
||||
rdoRed.setText("Red ");
|
||||
|
|
@ -495,6 +499,9 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
tbColor.add(rdoColorless);
|
||||
|
||||
cbExpansionSet.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||
cbExpansionSet.setMaximumSize(new java.awt.Dimension(250, 25));
|
||||
cbExpansionSet.setMinimumSize(new java.awt.Dimension(250, 25));
|
||||
cbExpansionSet.setPreferredSize(new java.awt.Dimension(250, 25));
|
||||
cbExpansionSet.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbExpansionSetActionPerformed(evt);
|
||||
|
|
@ -526,6 +533,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
|
||||
tbTypes.setFloatable(false);
|
||||
tbTypes.setRollover(true);
|
||||
tbTypes.setPreferredSize(new java.awt.Dimension(732, 27));
|
||||
|
||||
rdoLand.setSelected(true);
|
||||
rdoLand.setFocusable(false);
|
||||
|
|
@ -623,6 +631,9 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
tbTypes.add(chkPiles);
|
||||
|
||||
cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||
cbSortBy.setMaximumSize(new java.awt.Dimension(120, 20));
|
||||
cbSortBy.setMinimumSize(new java.awt.Dimension(120, 20));
|
||||
cbSortBy.setPreferredSize(new java.awt.Dimension(120, 20));
|
||||
cbSortBy.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbSortByActionPerformed(evt);
|
||||
|
|
@ -633,7 +644,12 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
jToggleListView.setSelected(true);
|
||||
jToggleListView.setText("ListView");
|
||||
jToggleListView.setFocusable(false);
|
||||
jToggleListView.setHorizontalAlignment(javax.swing.SwingConstants.LEADING);
|
||||
jToggleListView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
jToggleListView.setMargin(new java.awt.Insets(2, 4, 2, 4));
|
||||
jToggleListView.setMaximumSize(new java.awt.Dimension(51, 21));
|
||||
jToggleListView.setMinimumSize(new java.awt.Dimension(51, 21));
|
||||
jToggleListView.setPreferredSize(new java.awt.Dimension(51, 21));
|
||||
jToggleListView.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
jToggleListView.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
|
|
@ -644,6 +660,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
|
||||
jToggleCardView.setText("CardView");
|
||||
jToggleCardView.setFocusable(false);
|
||||
jToggleCardView.setHorizontalAlignment(javax.swing.SwingConstants.LEADING);
|
||||
jToggleCardView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
jToggleCardView.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
jToggleCardView.addActionListener(new java.awt.event.ActionListener() {
|
||||
|
|
@ -657,7 +674,11 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
cardSelectorBottomPanel.setPreferredSize(new java.awt.Dimension(897, 35));
|
||||
|
||||
jButtonAddToMain.setText("+");
|
||||
jButtonAddToMain.setToolTipText("Add to Main");
|
||||
jButtonAddToMain.setToolTipText("Add selected card to deck");
|
||||
jButtonAddToMain.setMargin(new java.awt.Insets(2, 10, 2, 10));
|
||||
jButtonAddToMain.setMaximumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonAddToMain.setMinimumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonAddToMain.setPreferredSize(new java.awt.Dimension(36, 23));
|
||||
jButtonAddToMain.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonAddToMainActionPerformed(evt);
|
||||
|
|
@ -666,6 +687,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
|
||||
jButtonAddToSideboard.setText("+S");
|
||||
jButtonAddToSideboard.setToolTipText("Add to Sideboard");
|
||||
jButtonAddToSideboard.setMargin(new java.awt.Insets(2, 4, 2, 4));
|
||||
jButtonAddToSideboard.setMaximumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonAddToSideboard.setMinimumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonAddToSideboard.setPreferredSize(new java.awt.Dimension(36, 23));
|
||||
jButtonAddToSideboard.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonAddToSideboardActionPerformed(evt);
|
||||
|
|
@ -693,7 +718,11 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
cardCount.setText("0");
|
||||
|
||||
jButtonRemoveFromMain.setText("-");
|
||||
jButtonRemoveFromMain.setToolTipText("Remove from Main");
|
||||
jButtonRemoveFromMain.setToolTipText("Remove selected card from deck");
|
||||
jButtonRemoveFromMain.setMargin(new java.awt.Insets(2, 10, 2, 10));
|
||||
jButtonRemoveFromMain.setMaximumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonRemoveFromMain.setMinimumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonRemoveFromMain.setPreferredSize(new java.awt.Dimension(36, 23));
|
||||
jButtonRemoveFromMain.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonRemoveFromMainActionPerformed(evt);
|
||||
|
|
@ -702,6 +731,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
|
||||
jButtonRemoveFromSideboard.setText("-S");
|
||||
jButtonRemoveFromSideboard.setToolTipText("Remove from Sideboard");
|
||||
jButtonRemoveFromSideboard.setMargin(new java.awt.Insets(2, 4, 2, 4));
|
||||
jButtonRemoveFromSideboard.setMaximumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonRemoveFromSideboard.setMinimumSize(new java.awt.Dimension(36, 23));
|
||||
jButtonRemoveFromSideboard.setPreferredSize(new java.awt.Dimension(36, 23));
|
||||
jButtonRemoveFromSideboard.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonRemoveFromSideboardActionPerformed(evt);
|
||||
|
|
@ -713,40 +746,44 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
cardSelectorBottomPanelLayout.setHorizontalGroup(
|
||||
cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(cardSelectorBottomPanelLayout.createSequentialGroup()
|
||||
.addComponent(jButtonAddToMain)
|
||||
.addGap(6, 6, 6)
|
||||
.addComponent(jButtonAddToMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButtonRemoveFromMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButtonAddToSideboard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.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(jButtonRemoveFromMain)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jButtonAddToSideboard)
|
||||
.addGap(5, 5, 5)
|
||||
.addComponent(jButtonRemoveFromSideboard)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabel1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jTextFieldSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jTextFieldSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(2, 2, 2)
|
||||
.addComponent(jButtonSearch)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButtonClean)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cardCountLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cardCount, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(121, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
cardSelectorBottomPanelLayout.setVerticalGroup(
|
||||
cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButtonAddToMain)
|
||||
.addComponent(jLabel1)
|
||||
.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(jButtonRemoveFromMain)
|
||||
.addComponent(jButtonAddToSideboard)
|
||||
.addComponent(jButtonRemoveFromSideboard))
|
||||
.addGroup(cardSelectorBottomPanelLayout.createSequentialGroup()
|
||||
.addGap(4, 4, 4)
|
||||
.addGroup(cardSelectorBottomPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButtonAddToMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.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(jTextFieldSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jButtonSearch)
|
||||
.addComponent(jButtonClean)
|
||||
.addComponent(cardCountLabel)
|
||||
.addComponent(cardCount))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
cardCountLabel.getAccessibleContext().setAccessibleName("cardCountLabel");
|
||||
|
|
@ -756,23 +793,20 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tbColor, javax.swing.GroupLayout.DEFAULT_SIZE, 917, Short.MAX_VALUE)
|
||||
.addComponent(tbTypes, javax.swing.GroupLayout.DEFAULT_SIZE, 917, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(cardSelectorBottomPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
.addComponent(cardSelectorScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 917, Short.MAX_VALUE)
|
||||
.addComponent(tbColor, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(tbTypes, javax.swing.GroupLayout.DEFAULT_SIZE, 897, Short.MAX_VALUE)
|
||||
.addComponent(cardSelectorScrollPane)
|
||||
.addComponent(cardSelectorBottomPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(tbColor, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.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)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(cardSelectorScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(tbTypes, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cardSelectorScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cardSelectorBottomPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
|
@ -970,7 +1004,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
}
|
||||
|
||||
public List<Integer> asList(final int[] is) {
|
||||
List<Integer> list = new ArrayList<Integer>();
|
||||
List<Integer> list = new ArrayList<>();
|
||||
for (int i : is) {
|
||||
list.add(i);
|
||||
}
|
||||
|
|
@ -997,8 +1031,8 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
private javax.swing.JLabel cardCountLabel;
|
||||
private javax.swing.JPanel cardSelectorBottomPanel;
|
||||
private javax.swing.JScrollPane cardSelectorScrollPane;
|
||||
private javax.swing.JComboBox cbExpansionSet;
|
||||
private javax.swing.JComboBox cbSortBy;
|
||||
private javax.swing.JComboBox<String> cbExpansionSet;
|
||||
private javax.swing.JComboBox<SortBy> cbSortBy;
|
||||
private javax.swing.JCheckBox chkPiles;
|
||||
private javax.swing.JButton jButtonAddToMain;
|
||||
private javax.swing.JButton jButtonAddToSideboard;
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@
|
|||
<Component class="javax.swing.JCheckBox" name="displayBigCardsInHand">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Use big images (for high resolution screens)"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Changes the size of the cards shown in hand. Switch this option off if you have a small screen size."/>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
|
@ -228,6 +229,7 @@
|
|||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Auto save game logs (to "../Mage.Client/gamelogs/" directory)"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="The logs of all your games will be saved to the mentioned folder if this option is switched on."/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbGameLogAutoSaveActionPerformed"/>
|
||||
|
|
@ -579,6 +581,9 @@
|
|||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtImageFolderPath">
|
||||
<Properties>
|
||||
<Property name="toolTipText" type="java.lang.String" value="The selected image will be used as background picture. You have to restart MAGE to view a changed background image."/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnBrowseImageLocation">
|
||||
<Properties>
|
||||
|
|
|
|||
|
|
@ -383,6 +383,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
main_card.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
displayBigCardsInHand.setText("Use big images (for high resolution screens)");
|
||||
displayBigCardsInHand.setToolTipText("Changes the size of the cards shown in hand. Switch this option off if you have a small screen size.");
|
||||
displayBigCardsInHand.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
displayBigCardsInHand.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
|
|
@ -442,6 +443,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
cbGameLogAutoSave.setSelected(true);
|
||||
cbGameLogAutoSave.setText("Auto save game logs (to \"../Mage.Client/gamelogs/\" directory)");
|
||||
cbGameLogAutoSave.setToolTipText("The logs of all your games will be saved to the mentioned folder if this option is switched on.");
|
||||
cbGameLogAutoSave.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbGameLogAutoSaveActionPerformed(evt);
|
||||
|
|
@ -614,6 +616,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}
|
||||
});
|
||||
|
||||
txtImageFolderPath.setToolTipText("The selected image will be used as background picture. You have to restart MAGE to view a changed background image.");
|
||||
|
||||
btnBrowseImageLocation.setText("Browse...");
|
||||
btnBrowseImageLocation.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue