Update to table filtering.

This commit is contained in:
LevelX2 2015-04-25 02:20:54 +02:00
parent f94497fac8
commit b096379881
16 changed files with 388 additions and 256 deletions

View file

@ -110,11 +110,13 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
setOpaque(false);
cardGrid.setOpaque(false);
cardSelectorScrollPane.setOpaque(false);
cardSelectorScrollPane.getViewport().setOpaque(false);
cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values()));
cbSortBy.setSelectedItem(sortSetting.getSortBy());
jTextFieldSearch.addActionListener(searchAction);
// make the components more readable
tbColor.setBackground(new Color(250, 250, 250, 150));
tbColor.setOpaque(true); // false = transparent

View file

@ -16,7 +16,7 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="1" max="32767" attributes="0"/>
<Component id="topPanel" alignment="1" max="32767" attributes="0"/>
<Component id="jSplitPane1" alignment="0" pref="908" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Component id="jPanel2" alignment="1" pref="908" max="32767" attributes="0"/>
@ -26,7 +26,7 @@
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="jPanel1" max="-2" attributes="0"/>
<Component id="topPanel" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="jSplitPane1" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
@ -39,7 +39,13 @@
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Container class="javax.swing.JPanel" name="topPanel">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="ff" id="white" palette="1" red="ff" type="palette"/>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout>
<DimensionLayout dim="0">
@ -51,16 +57,13 @@
<Component id="btnNewTournament" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="filterStateBar" max="32767" attributes="0"/>
<Component id="filterTypeBar" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="filterBar1" min="-2" pref="170" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="223" max="-2" attributes="0"/>
<Component id="btnQuickStart" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="filterBar2" max="32767" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="filterFormatBar2" max="-2" attributes="0"/>
<Component id="filterFormatBar1" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="btnQuickStart" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
@ -74,20 +77,13 @@
<Component id="btnNewTable" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnNewTournament" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="filterStateBar" min="-2" pref="25" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="filterTypeBar" min="-2" pref="25" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="filterFormatBar1" min="-2" pref="25" max="-2" attributes="0"/>
<Component id="btnQuickStart" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Component id="filterFormatBar2" min="-2" pref="25" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="filterBar1" min="-2" pref="25" max="-2" attributes="0"/>
<Component id="btnQuickStart" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="filterBar2" min="-2" pref="25" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
@ -103,7 +99,7 @@
</Property>
<Property name="toolTipText" type="java.lang.String" value="Creates a new match table."/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[10, 10, 10, 10]"/>
<Insets value="[2, 2, 2, 2]"/>
</Property>
</Properties>
<Events>
@ -117,20 +113,21 @@
</Property>
<Property name="toolTipText" type="java.lang.String" value="Creates a new tourney table."/>
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
<Insets value="[10, 10, 10, 10]"/>
<Insets value="[2, 2, 2, 2]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewTournamentActionPerformed"/>
</Events>
</Component>
<Container class="javax.swing.JToolBar" name="filterStateBar">
<Container class="javax.swing.JToolBar" name="filterBar1">
<Properties>
<Property name="floatable" type="boolean" value="false"/>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="66" red="66" type="rgb"/>
</Property>
<Property name="focusable" type="boolean" value="false"/>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
@ -138,16 +135,11 @@
<Component class="javax.swing.JToggleButton" name="btnStateWaiting">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_waiting_off.png"/>
<Image iconType="3" name="/buttons/state_waiting.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Show tables waiting for players."/>
<Property name="toolTipText" type="java.lang.String" value="Shows all tables waiting for players."/>
<Property name="actionCommand" type="java.lang.String" value="stateWait"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder/>
</Border>
</Property>
<Property name="focusPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
@ -161,14 +153,10 @@
<Dimension value="[23, 23]"/>
</Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
<Property name="rolloverEnabled" type="boolean" value="false"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_waiting.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="btnStateWaitingActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnStateActive">
@ -177,13 +165,8 @@
<Image iconType="3" name="/buttons/state_active.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Show tables with active matches."/>
<Property name="toolTipText" type="java.lang.String" value="Shows all tables with active matches."/>
<Property name="actionCommand" type="java.lang.String" value="stateActive"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder/>
</Border>
</Property>
<Property name="focusPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
@ -197,14 +180,10 @@
<Dimension value="[23, 23]"/>
</Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
<Property name="rolloverEnabled" type="boolean" value="false"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_active.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="btnStateActiveActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnStateFinished">
@ -215,11 +194,6 @@
<Property name="selected" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="&lt;HTML&gt;Toggles the visibility of the table of completed &lt;br&gt;matches and tournaments in the lower area.&#xa;&lt;br&gt;Showing the last 50 finished matches."/>
<Property name="actionCommand" type="java.lang.String" value="stateFinished"/>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder/>
</Border>
</Property>
<Property name="focusPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
@ -233,37 +207,35 @@
<Dimension value="[23, 23]"/>
</Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
<Property name="rolloverEnabled" type="boolean" value="false"/>
<Property name="selectedIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/state_finished.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="btnStateFinishedActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JToolBar" name="filterTypeBar">
<Properties>
<Property name="floatable" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator1">
</Component>
<Component class="javax.swing.JToggleButton" name="btnTypeMatch">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/type_match.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Shows all non tournament tables."/>
<Property name="actionCommand" type="java.lang.String" value="typeMatch"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 27]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 27]"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnTypeTourneyConstructed">
<Properties>
@ -271,11 +243,21 @@
<Image iconType="3" name="/buttons/type_tourney_construced.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Shows all constructed tournament tables."/>
<Property name="actionCommand" type="java.lang.String" value="typeTourneyConstructed"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 27]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 27]"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnTypeTourneyLimited">
<Properties>
@ -283,111 +265,134 @@
<Image iconType="3" name="/buttons/type_tourney_limited.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="toolTipText" type="java.lang.String" value="Shows all limited tournament tables."/>
<Property name="actionCommand" type="java.lang.String" value="typeTourneyLimited"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 27]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[27, 27]"/>
</Property>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JToolBar" name="filterFormatBar1">
<Container class="javax.swing.JToolBar" name="filterBar2">
<Properties>
<Property name="floatable" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Component class="javax.swing.JToggleButton" name="btnFormatBlock">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_block.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Block"/>
<Property name="toolTipText" type="java.lang.String" value="Block constructed formats."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatStandard">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_standard.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Standard"/>
<Property name="toolTipText" type="java.lang.String" value="Standard format."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatModern">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_modern.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Modern"/>
<Property name="toolTipText" type="java.lang.String" value="Modern format."/>
<Property name="focusable" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator3">
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatCommander">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_commander.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Commander"/>
<Property name="toolTipText" type="java.lang.String" value="Commander format."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JToolBar" name="filterFormatBar2">
<Properties>
<Property name="floatable" type="boolean" value="false"/>
<Property name="toolTipText" type="java.lang.String" value="All tables with active matches"/>
<Property name="focusable" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents>
<Component class="javax.swing.JToggleButton" name="btnFormatLegacy">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_legacy.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatVintage">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_vintage.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatOther">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_other.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatTinyLeader">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/format_tiny_leader.png"/>
</Property>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Tiny Leader"/>
<Property name="toolTipText" type="java.lang.String" value="Tiny Leader format."/>
<Property name="focusable" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="jSeparator2">
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatLegacy">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Legacy"/>
<Property name="toolTipText" type="java.lang.String" value="Legacy format."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatVintage">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Vintage"/>
<Property name="toolTipText" type="java.lang.String" value="Vintage format."/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="btnFormatOther">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Other"/>
<Property name="toolTipText" type="java.lang.String" value="Other formats (Pauper, Extended, etc.)"/>
<Property name="focusable" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
@ -517,7 +522,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jSplitPane2" alignment="0" pref="494" max="32767" attributes="0"/>
<Component id="jSplitPane2" alignment="0" pref="526" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>

View file

@ -44,6 +44,7 @@ import java.beans.PropertyVetoException;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@ -68,7 +69,6 @@ import mage.cards.decks.importer.DeckImporterUtil;
import mage.client.MageFrame;
import mage.client.chat.ChatPanel;
import mage.client.components.MageComponents;
import mage.client.deckeditor.table.TableModel;
import mage.client.dialog.JoinTableDialog;
import mage.client.dialog.NewTableDialog;
import mage.client.dialog.NewTournamentDialog;
@ -121,19 +121,6 @@ public class TablesPanel extends javax.swing.JPanel {
initComponents();
tableModel.setSession(session);
filterStateBar.setBackground(new Color(250, 250, 250, 150));
filterStateBar.setOpaque(true); // false = transparent
filterTypeBar.setBackground(new Color(250, 250, 250, 150));
filterTypeBar.setOpaque(true); // false = transparent
filterFormatBar1.setBackground(new Color(250, 250, 250, 150));
filterFormatBar1.setOpaque(true); // false = transparent
filterFormatBar2.setBackground(new Color(250, 250, 250, 150));
filterFormatBar2.setOpaque(true); // false = transparent
tableTables.createDefaultColumnsFromModel();
activeTablesSorter = new MageTableRowSorter(tableModel);
tableTables.setRowSorter(activeTablesSorter);
@ -144,14 +131,15 @@ public class TablesPanel extends javax.swing.JPanel {
chatPanel.setBorder(null);
chatPanel.setChatType(ChatPanel.ChatType.TABLES);
JComponent[] components = new JComponent[] {chatPanel, jSplitPane1, jScrollPane1, jScrollPane2, jPanel1, jPanel3};
JComponent[] components = new JComponent[] {chatPanel, jSplitPane1, jScrollPane1, jScrollPane2, topPanel, jPanel3};
for (JComponent component : components) {
component.setOpaque(false);
}
jScrollPane1.getViewport().setBackground(new Color(255,255,255,50));
jScrollPane2.getViewport().setBackground(new Color(255,255,255,50));
topPanel.setBackground(new Color(255,255,255,50));
Action openTableAction;
openTableAction = new AbstractAction()
{
@ -261,7 +249,22 @@ public class TablesPanel extends javax.swing.JPanel {
}
};
// filterBar1.setBackground(new Color(250, 250, 250, 150));
// filterBar1.setOpaque(true); // false = transparent
//
// filterBar2.setBackground(new Color(250, 250, 250, 150));
// filterBar2.setOpaque(true); // false = transparent
//
// JComponent container = filterBar1;
// while (container.getParent() != null) {
// if (container.getParent() instanceof JComponent) {
// container = (JComponent) container.getParent();
// container.setBackground(new Color(250, 250, 250, 150));
// container.setOpaque(true);
// }
//
// }
// !!!! adds action buttons to the table panel (don't delete this)
new ButtonColumn(tableTables, openTableAction, TableTableModel.ACTION_COLUMN);
new ButtonColumn(tableCompleted, closedTableAction, MatchesTableModel.ACTION_COLUMN);
@ -313,7 +316,7 @@ public class TablesPanel extends javax.swing.JPanel {
components.put("jScrollPane1", jScrollPane1);
components.put("jScrollPane1ViewPort", jScrollPane1.getViewport());
components.put("jPanel1", jPanel1);
components.put("jPanel1", topPanel);
components.put("tablesPanel", this);
return components;
@ -459,20 +462,84 @@ public class TablesPanel extends javax.swing.JPanel {
private void activeTablesFilter() {
// state
StringBuilder stateFilter = new StringBuilder();
List<RowFilter<Object, Object>> stateFilterList = new ArrayList<>();
if (btnStateWaiting.isSelected()) {
stateFilter.append("Waiting");
stateFilterList.add(RowFilter.regexFilter("Waiting", TableTableModel.COLUMN_STATUS));
}
if (btnStateActive.isSelected()) {
if (stateFilter.length() > 0) {
stateFilter.append("|");
}
stateFilter.append("Dueling|Constructing|Drafting|Sideboard");
stateFilterList.add(RowFilter.regexFilter("Dueling|Constructing|Drafting|Sideboard", TableTableModel.COLUMN_STATUS));
}
// type
List<RowFilter<Object, Object>> typeFilterList = new ArrayList<>();
if (btnTypeMatch.isSelected()) {
typeFilterList.add(RowFilter.regexFilter("Two|Commander|Free|Tiny", TableTableModel.COLUMN_GAME_TYPE));
}
if (btnTypeTourneyConstructed.isSelected()) {
typeFilterList.add(RowFilter.regexFilter("Constructed", TableTableModel.COLUMN_GAME_TYPE));
}
if (btnTypeTourneyLimited.isSelected()) {
typeFilterList.add(RowFilter.regexFilter("Booster|Sealed", TableTableModel.COLUMN_GAME_TYPE));
}
// format
List<RowFilter<Object, Object>> formatFilterList = new ArrayList<>();
if (btnFormatBlock.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Block", TableTableModel.COLUMN_DECK_TYPE));
}
if (btnFormatStandard.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Standard", TableTableModel.COLUMN_DECK_TYPE));
}
if (btnFormatModern.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Modern", TableTableModel.COLUMN_DECK_TYPE));
}
if (btnFormatCommander.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Commander", TableTableModel.COLUMN_DECK_TYPE));
}
if (btnFormatTinyLeader.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Tiny", TableTableModel.COLUMN_DECK_TYPE));
}
if (btnFormatLegacy.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Legacy", TableTableModel.COLUMN_DECK_TYPE));
}
if (btnFormatVintage.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Vintage", TableTableModel.COLUMN_DECK_TYPE));
}
RowFilter rf = RowFilter.regexFilter(stateFilter.toString(), 4);
activeTablesSorter.setRowFilter(rf);
if (btnFormatOther.isSelected()) {
formatFilterList.add(RowFilter.regexFilter("Pauper|Extended|Limited", TableTableModel.COLUMN_DECK_TYPE));
}
if (stateFilterList.isEmpty() || typeFilterList.isEmpty() || formatFilterList.isEmpty()) { // no selection
activeTablesSorter.setRowFilter(RowFilter.regexFilter("Nothing", TableTableModel.COLUMN_GAME_TYPE));
} else {
List<RowFilter<Object, Object>> filterList = new ArrayList<>();
if (stateFilterList.size() > 1) {
filterList.add(RowFilter.orFilter(stateFilterList));
} else if (stateFilterList.size() == 1) {
filterList.addAll(stateFilterList);
}
if (typeFilterList.size() > 1) {
filterList.add(RowFilter.orFilter(typeFilterList));
} else if (typeFilterList.size() == 1) {
filterList.addAll(typeFilterList);
}
if (formatFilterList.size() > 1) {
filterList.add(RowFilter.orFilter(formatFilterList));
} else if (formatFilterList.size() == 1) {
filterList.addAll(formatFilterList);
}
if (filterList.size() == 1) {
activeTablesSorter.setRowFilter(filterList.get(0));
} else {
activeTablesSorter.setRowFilter(RowFilter.andFilter(filterList));
}
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@ -482,27 +549,28 @@ public class TablesPanel extends javax.swing.JPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
topPanel = new javax.swing.JPanel();
btnNewTable = new javax.swing.JButton();
btnNewTournament = new javax.swing.JButton();
filterStateBar = new javax.swing.JToolBar();
filterBar1 = new javax.swing.JToolBar();
btnStateWaiting = new javax.swing.JToggleButton();
btnStateActive = new javax.swing.JToggleButton();
btnStateFinished = new javax.swing.JToggleButton();
filterTypeBar = new javax.swing.JToolBar();
jSeparator1 = new javax.swing.JToolBar.Separator();
btnTypeMatch = new javax.swing.JToggleButton();
btnTypeTourneyConstructed = new javax.swing.JToggleButton();
btnTypeTourneyLimited = new javax.swing.JToggleButton();
filterFormatBar1 = new javax.swing.JToolBar();
filterBar2 = new javax.swing.JToolBar();
btnFormatBlock = new javax.swing.JToggleButton();
btnFormatStandard = new javax.swing.JToggleButton();
btnFormatModern = new javax.swing.JToggleButton();
jSeparator3 = new javax.swing.JToolBar.Separator();
btnFormatCommander = new javax.swing.JToggleButton();
filterFormatBar2 = new javax.swing.JToolBar();
btnFormatTinyLeader = new javax.swing.JToggleButton();
jSeparator2 = new javax.swing.JToolBar.Separator();
btnFormatLegacy = new javax.swing.JToggleButton();
btnFormatVintage = new javax.swing.JToggleButton();
btnFormatOther = new javax.swing.JToggleButton();
btnFormatTinyLeader = new javax.swing.JToggleButton();
btnQuickStart = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
@ -517,9 +585,12 @@ public class TablesPanel extends javax.swing.JPanel {
jScrollPane2 = new javax.swing.JScrollPane();
tableCompleted = new javax.swing.JTable();
topPanel.setBackground(java.awt.Color.white);
topPanel.setOpaque(false);
btnNewTable.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/match_new.png"))); // NOI18N
btnNewTable.setToolTipText("Creates a new match table.");
btnNewTable.setMargin(new java.awt.Insets(10, 10, 10, 10));
btnNewTable.setMargin(new java.awt.Insets(2, 2, 2, 2));
btnNewTable.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNewTableActionPerformed(evt);
@ -528,22 +599,22 @@ public class TablesPanel extends javax.swing.JPanel {
btnNewTournament.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/tourney_new.png"))); // NOI18N
btnNewTournament.setToolTipText("Creates a new tourney table.");
btnNewTournament.setMargin(new java.awt.Insets(10, 10, 10, 10));
btnNewTournament.setMargin(new java.awt.Insets(2, 2, 2, 2));
btnNewTournament.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNewTournamentActionPerformed(evt);
}
});
filterStateBar.setFloatable(false);
filterStateBar.setForeground(new java.awt.Color(102, 102, 255));
filterStateBar.setFocusable(false);
filterBar1.setFloatable(false);
filterBar1.setForeground(new java.awt.Color(102, 102, 255));
filterBar1.setFocusable(false);
filterBar1.setOpaque(false);
btnStateWaiting.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_waiting_off.png"))); // NOI18N
btnStateWaiting.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_waiting.png"))); // NOI18N
btnStateWaiting.setSelected(true);
btnStateWaiting.setToolTipText("Show tables waiting for players.");
btnStateWaiting.setToolTipText("Shows all tables waiting for players.");
btnStateWaiting.setActionCommand("stateWait");
btnStateWaiting.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
btnStateWaiting.setFocusPainted(false);
btnStateWaiting.setFocusable(false);
btnStateWaiting.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@ -551,21 +622,18 @@ public class TablesPanel extends javax.swing.JPanel {
btnStateWaiting.setMinimumSize(new java.awt.Dimension(27, 27));
btnStateWaiting.setPreferredSize(new java.awt.Dimension(23, 23));
btnStateWaiting.setRequestFocusEnabled(false);
btnStateWaiting.setRolloverEnabled(false);
btnStateWaiting.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_waiting.png"))); // NOI18N
btnStateWaiting.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateWaiting.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStateWaitingActionPerformed(evt);
btnFilterActionPerformed(evt);
}
});
filterStateBar.add(btnStateWaiting);
filterBar1.add(btnStateWaiting);
btnStateActive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"))); // NOI18N
btnStateActive.setSelected(true);
btnStateActive.setToolTipText("Show tables with active matches.");
btnStateActive.setToolTipText("Shows all tables with active matches.");
btnStateActive.setActionCommand("stateActive");
btnStateActive.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
btnStateActive.setFocusPainted(false);
btnStateActive.setFocusable(false);
btnStateActive.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@ -573,21 +641,18 @@ public class TablesPanel extends javax.swing.JPanel {
btnStateActive.setMinimumSize(new java.awt.Dimension(27, 27));
btnStateActive.setPreferredSize(new java.awt.Dimension(23, 23));
btnStateActive.setRequestFocusEnabled(false);
btnStateActive.setRolloverEnabled(false);
btnStateActive.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"))); // NOI18N
btnStateActive.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateActive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStateActiveActionPerformed(evt);
btnFilterActionPerformed(evt);
}
});
filterStateBar.add(btnStateActive);
filterBar1.add(btnStateActive);
btnStateFinished.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N
btnStateFinished.setSelected(true);
btnStateFinished.setToolTipText("<HTML>Toggles the visibility of the table of completed <br>matches and tournaments in the lower area.\n<br>Showing the last 50 finished matches.");
btnStateFinished.setActionCommand("stateFinished");
btnStateFinished.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
btnStateFinished.setFocusPainted(false);
btnStateFinished.setFocusable(false);
btnStateFinished.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@ -595,96 +660,166 @@ public class TablesPanel extends javax.swing.JPanel {
btnStateFinished.setMinimumSize(new java.awt.Dimension(27, 27));
btnStateFinished.setPreferredSize(new java.awt.Dimension(23, 23));
btnStateFinished.setRequestFocusEnabled(false);
btnStateFinished.setRolloverEnabled(false);
btnStateFinished.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N
btnStateFinished.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateFinished.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStateFinishedActionPerformed(evt);
}
});
filterStateBar.add(btnStateFinished);
filterTypeBar.setFloatable(false);
filterTypeBar.setFocusable(false);
filterBar1.add(btnStateFinished);
filterBar1.add(jSeparator1);
btnTypeMatch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_match.png"))); // NOI18N
btnTypeMatch.setSelected(true);
btnTypeMatch.setToolTipText("Shows all non tournament tables.");
btnTypeMatch.setActionCommand("typeMatch");
btnTypeMatch.setFocusable(false);
btnTypeMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnTypeMatch.setMaximumSize(new java.awt.Dimension(27, 27));
btnTypeMatch.setMinimumSize(new java.awt.Dimension(27, 27));
btnTypeMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterTypeBar.add(btnTypeMatch);
btnTypeMatch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar1.add(btnTypeMatch);
btnTypeTourneyConstructed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_tourney_construced.png"))); // NOI18N
btnTypeTourneyConstructed.setSelected(true);
btnTypeTourneyConstructed.setToolTipText("Shows all constructed tournament tables.");
btnTypeTourneyConstructed.setActionCommand("typeTourneyConstructed");
btnTypeTourneyConstructed.setFocusable(false);
btnTypeTourneyConstructed.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnTypeTourneyConstructed.setMaximumSize(new java.awt.Dimension(27, 27));
btnTypeTourneyConstructed.setMinimumSize(new java.awt.Dimension(27, 27));
btnTypeTourneyConstructed.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterTypeBar.add(btnTypeTourneyConstructed);
btnTypeTourneyConstructed.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar1.add(btnTypeTourneyConstructed);
btnTypeTourneyLimited.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_tourney_limited.png"))); // NOI18N
btnTypeTourneyLimited.setSelected(true);
btnTypeTourneyLimited.setToolTipText("Shows all limited tournament tables.");
btnTypeTourneyLimited.setActionCommand("typeTourneyLimited");
btnTypeTourneyLimited.setFocusable(false);
btnTypeTourneyLimited.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnTypeTourneyLimited.setMaximumSize(new java.awt.Dimension(27, 27));
btnTypeTourneyLimited.setMinimumSize(new java.awt.Dimension(27, 27));
btnTypeTourneyLimited.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterTypeBar.add(btnTypeTourneyLimited);
btnTypeTourneyLimited.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar1.add(btnTypeTourneyLimited);
filterFormatBar1.setFloatable(false);
filterFormatBar1.setFocusable(false);
filterBar2.setFloatable(false);
filterBar2.setFocusable(false);
filterBar2.setOpaque(false);
btnFormatBlock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_block.png"))); // NOI18N
btnFormatBlock.setSelected(true);
btnFormatBlock.setText("Block");
btnFormatBlock.setToolTipText("Block constructed formats.");
btnFormatBlock.setFocusable(false);
btnFormatBlock.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatBlock.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterFormatBar1.add(btnFormatBlock);
btnFormatBlock.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatBlock);
btnFormatStandard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_standard.png"))); // NOI18N
btnFormatStandard.setSelected(true);
btnFormatStandard.setText("Standard");
btnFormatStandard.setToolTipText("Standard format.");
btnFormatStandard.setFocusable(false);
btnFormatStandard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatStandard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterFormatBar1.add(btnFormatStandard);
btnFormatStandard.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatStandard);
btnFormatModern.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_modern.png"))); // NOI18N
btnFormatModern.setSelected(true);
filterFormatBar1.add(btnFormatModern);
btnFormatModern.setText("Modern");
btnFormatModern.setToolTipText("Modern format.");
btnFormatModern.setFocusable(false);
btnFormatModern.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatModern);
filterBar2.add(jSeparator3);
btnFormatCommander.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_commander.png"))); // NOI18N
btnFormatCommander.setSelected(true);
btnFormatCommander.setText("Commander");
btnFormatCommander.setToolTipText("Commander format.");
btnFormatCommander.setFocusable(false);
btnFormatCommander.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatCommander.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterFormatBar1.add(btnFormatCommander);
btnFormatCommander.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatCommander);
filterFormatBar2.setFloatable(false);
filterFormatBar2.setToolTipText("All tables with active matches");
filterFormatBar2.setFocusable(false);
btnFormatTinyLeader.setSelected(true);
btnFormatTinyLeader.setText("Tiny Leader");
btnFormatTinyLeader.setToolTipText("Tiny Leader format.");
btnFormatTinyLeader.setFocusable(false);
btnFormatTinyLeader.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatTinyLeader);
filterBar2.add(jSeparator2);
btnFormatLegacy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_legacy.png"))); // NOI18N
btnFormatLegacy.setSelected(true);
btnFormatLegacy.setText("Legacy");
btnFormatLegacy.setToolTipText("Legacy format.");
btnFormatLegacy.setFocusable(false);
btnFormatLegacy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatLegacy.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterFormatBar2.add(btnFormatLegacy);
btnFormatLegacy.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatLegacy);
btnFormatVintage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_vintage.png"))); // NOI18N
btnFormatVintage.setSelected(true);
btnFormatVintage.setText("Vintage");
btnFormatVintage.setToolTipText("Vintage format.");
btnFormatVintage.setFocusable(false);
btnFormatVintage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatVintage.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
filterFormatBar2.add(btnFormatVintage);
btnFormatVintage.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatVintage);
btnFormatOther.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_other.png"))); // NOI18N
btnFormatOther.setSelected(true);
filterFormatBar2.add(btnFormatOther);
btnFormatTinyLeader.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_tiny_leader.png"))); // NOI18N
btnFormatTinyLeader.setSelected(true);
filterFormatBar2.add(btnFormatTinyLeader);
btnFormatOther.setText("Other");
btnFormatOther.setToolTipText("Other formats (Pauper, Extended, etc.)");
btnFormatOther.setFocusable(false);
btnFormatOther.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatOther);
btnQuickStart.setText("Quick Start");
btnQuickStart.setFocusable(false);
@ -696,46 +831,38 @@ public class TablesPanel extends javax.swing.JPanel {
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel);
topPanel.setLayout(topPanelLayout);
topPanelLayout.setHorizontalGroup(
topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(topPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(btnNewTable)
.addGap(6, 6, 6)
.addComponent(btnNewTournament)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(filterStateBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(filterTypeBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(filterFormatBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(filterFormatBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnQuickStart)
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(topPanelLayout.createSequentialGroup()
.addComponent(filterBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(223, 223, 223)
.addComponent(btnQuickStart))
.addComponent(filterBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
topPanelLayout.setVerticalGroup(
topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(topPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnNewTable)
.addComponent(btnNewTournament))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(filterStateBar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(filterTypeBar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(filterFormatBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnQuickStart))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(filterFormatBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(topPanelLayout.createSequentialGroup()
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(filterBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnQuickStart))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(filterBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
@ -815,7 +942,7 @@ public class TablesPanel extends javax.swing.JPanel {
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 494, Short.MAX_VALUE)
.addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)
);
jSplitPane1.setLeftComponent(jPanel3);
@ -824,7 +951,7 @@ public class TablesPanel extends javax.swing.JPanel {
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(topPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE))
@ -832,7 +959,7 @@ public class TablesPanel extends javax.swing.JPanel {
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(topPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(jSplitPane1)
.addGap(0, 0, 0)
@ -890,13 +1017,9 @@ public class TablesPanel extends javax.swing.JPanel {
}
}//GEN-LAST:event_jButton1ActionPerformed
private void btnStateWaitingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateWaitingActionPerformed
private void btnFilterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFilterActionPerformed
activeTablesFilter();
}//GEN-LAST:event_btnStateWaitingActionPerformed
private void btnStateActiveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateActiveActionPerformed
activeTablesFilter();
}//GEN-LAST:event_btnStateActiveActionPerformed
}//GEN-LAST:event_btnFilterActionPerformed
private void btnStateFinishedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateFinishedActionPerformed
if (this.btnStateFinished.isSelected()) {
@ -934,22 +1057,23 @@ public class TablesPanel extends javax.swing.JPanel {
private javax.swing.JToggleButton btnTypeTourneyConstructed;
private javax.swing.JToggleButton btnTypeTourneyLimited;
private mage.client.chat.ChatPanel chatPanel;
private javax.swing.JToolBar filterFormatBar1;
private javax.swing.JToolBar filterFormatBar2;
private javax.swing.JToolBar filterStateBar;
private javax.swing.JToolBar filterTypeBar;
private javax.swing.JToolBar filterBar1;
private javax.swing.JToolBar filterBar2;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JToolBar.Separator jSeparator1;
private javax.swing.JToolBar.Separator jSeparator2;
private javax.swing.JToolBar.Separator jSeparator3;
private javax.swing.JSplitPane jSplitPane1;
private javax.swing.JSplitPane jSplitPane2;
private javax.swing.JTable tableCompleted;
private javax.swing.JTable tableTables;
private javax.swing.JPanel topPanel;
// End of variables declaration//GEN-END:variables
}
@ -957,6 +1081,7 @@ public class TablesPanel extends javax.swing.JPanel {
class TableTableModel extends AbstractTableModel {
public static final int COLUMN_DECK_TYPE = 0; // column the deck type is located (starting with 0) Start string is used to check for Limited
public static final int COLUMN_GAME_TYPE = 2;
public static final int COLUMN_INFO = 3;
public static final int COLUMN_STATUS = 4;
public static final int ACTION_COLUMN = 6; // column the action is located (starting with 0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

After

Width:  |  Height:  |  Size: 745 B