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); setOpaque(false);
cardGrid.setOpaque(false); cardGrid.setOpaque(false);
cardSelectorScrollPane.setOpaque(false); cardSelectorScrollPane.setOpaque(false);
cardSelectorScrollPane.getViewport().setOpaque(false); cardSelectorScrollPane.getViewport().setOpaque(false);
cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values())); cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values()));
cbSortBy.setSelectedItem(sortSetting.getSortBy()); cbSortBy.setSelectedItem(sortSetting.getSortBy());
jTextFieldSearch.addActionListener(searchAction); jTextFieldSearch.addActionListener(searchAction);
// make the components more readable // make the components more readable
tbColor.setBackground(new Color(250, 250, 250, 150)); tbColor.setBackground(new Color(250, 250, 250, 150));
tbColor.setOpaque(true); // false = transparent tbColor.setOpaque(true); // false = transparent

View file

@ -16,7 +16,7 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="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"/> <Component id="jSplitPane1" alignment="0" pref="908" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Component id="jPanel2" alignment="1" pref="908" max="32767" attributes="0"/> <Component id="jPanel2" alignment="1" pref="908" max="32767" attributes="0"/>
@ -26,7 +26,7 @@
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="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"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="jSplitPane1" max="32767" attributes="0"/> <Component id="jSplitPane1" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
@ -39,7 +39,13 @@
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <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> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
@ -51,16 +57,13 @@
<Component id="btnNewTournament" min="-2" max="-2" attributes="0"/> <Component id="btnNewTournament" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="filterStateBar" max="32767" attributes="0"/> <Group type="102" attributes="0">
<Component id="filterTypeBar" max="32767" 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> </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"/> <EmptySpace max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
@ -74,20 +77,13 @@
<Component id="btnNewTable" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="btnNewTable" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnNewTournament" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="btnNewTournament" alignment="3" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="103" groupAlignment="1" attributes="0">
<Component id="filterStateBar" min="-2" pref="25" max="-2" attributes="0"/> <Component id="filterBar1" min="-2" pref="25" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <Component id="btnQuickStart" min="-2" 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> </Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="filterBar2" min="-2" pref="25" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
@ -103,7 +99,7 @@
</Property> </Property>
<Property name="toolTipText" type="java.lang.String" value="Creates a new match table."/> <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"> <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> </Property>
</Properties> </Properties>
<Events> <Events>
@ -117,20 +113,21 @@
</Property> </Property>
<Property name="toolTipText" type="java.lang.String" value="Creates a new tourney table."/> <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"> <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> </Property>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewTournamentActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewTournamentActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Container class="javax.swing.JToolBar" name="filterStateBar"> <Container class="javax.swing.JToolBar" name="filterBar1">
<Properties> <Properties>
<Property name="floatable" type="boolean" value="false"/> <Property name="floatable" type="boolean" value="false"/>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="66" red="66" type="rgb"/> <Color blue="ff" green="66" red="66" type="rgb"/>
</Property> </Property>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="opaque" type="boolean" value="false"/>
</Properties> </Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
@ -138,16 +135,11 @@
<Component class="javax.swing.JToggleButton" name="btnStateWaiting"> <Component class="javax.swing.JToggleButton" name="btnStateWaiting">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <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>
<Property name="selected" type="boolean" value="true"/> <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="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="focusPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="horizontalTextPosition" type="int" value="0"/>
@ -161,14 +153,10 @@
<Dimension value="[23, 23]"/> <Dimension value="[23, 23]"/>
</Property> </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/> <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"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events> <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> </Events>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnStateActive"> <Component class="javax.swing.JToggleButton" name="btnStateActive">
@ -177,13 +165,8 @@
<Image iconType="3" name="/buttons/state_active.png"/> <Image iconType="3" name="/buttons/state_active.png"/>
</Property> </Property>
<Property name="selected" type="boolean" value="true"/> <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="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="focusPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="horizontalTextPosition" type="int" value="0"/>
@ -197,14 +180,10 @@
<Dimension value="[23, 23]"/> <Dimension value="[23, 23]"/>
</Property> </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/> <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"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events> <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> </Events>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnStateFinished"> <Component class="javax.swing.JToggleButton" name="btnStateFinished">
@ -215,11 +194,6 @@
<Property name="selected" type="boolean" value="true"/> <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="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="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="focusPainted" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="horizontalTextPosition" type="int" value="0"/>
@ -233,37 +207,35 @@
<Dimension value="[23, 23]"/> <Dimension value="[23, 23]"/>
</Property> </Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/> <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"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnStateFinishedActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnStateFinishedActionPerformed"/>
</Events> </Events>
</Component> </Component>
</SubComponents> <Component class="javax.swing.JToolBar$Separator" name="jSeparator1">
</Container> </Component>
<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.JToggleButton" name="btnTypeMatch"> <Component class="javax.swing.JToggleButton" name="btnTypeMatch">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/buttons/type_match.png"/> <Image iconType="3" name="/buttons/type_match.png"/>
</Property> </Property>
<Property name="selected" type="boolean" value="true"/> <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="actionCommand" type="java.lang.String" value="typeMatch"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <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"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnTypeTourneyConstructed"> <Component class="javax.swing.JToggleButton" name="btnTypeTourneyConstructed">
<Properties> <Properties>
@ -271,11 +243,21 @@
<Image iconType="3" name="/buttons/type_tourney_construced.png"/> <Image iconType="3" name="/buttons/type_tourney_construced.png"/>
</Property> </Property>
<Property name="selected" type="boolean" value="true"/> <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="actionCommand" type="java.lang.String" value="typeTourneyConstructed"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <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"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnTypeTourneyLimited"> <Component class="javax.swing.JToggleButton" name="btnTypeTourneyLimited">
<Properties> <Properties>
@ -283,111 +265,134 @@
<Image iconType="3" name="/buttons/type_tourney_limited.png"/> <Image iconType="3" name="/buttons/type_tourney_limited.png"/>
</Property> </Property>
<Property name="selected" type="boolean" value="true"/> <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="actionCommand" type="java.lang.String" value="typeTourneyLimited"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <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"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JToolBar" name="filterFormatBar1"> <Container class="javax.swing.JToolBar" name="filterBar2">
<Properties> <Properties>
<Property name="floatable" type="boolean" value="false"/> <Property name="floatable" type="boolean" value="false"/>
<Property name="focusable" type="boolean" value="false"/> <Property name="focusable" type="boolean" value="false"/>
<Property name="opaque" type="boolean" value="false"/>
</Properties> </Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
<SubComponents> <SubComponents>
<Component class="javax.swing.JToggleButton" name="btnFormatBlock"> <Component class="javax.swing.JToggleButton" name="btnFormatBlock">
<Properties> <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="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="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnFormatStandard"> <Component class="javax.swing.JToggleButton" name="btnFormatStandard">
<Properties> <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="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="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Events>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnFormatModern"> <Component class="javax.swing.JToggleButton" name="btnFormatModern">
<Properties> <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="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> </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>
<Component class="javax.swing.JToggleButton" name="btnFormatCommander"> <Component class="javax.swing.JToggleButton" name="btnFormatCommander">
<Properties> <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="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="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/> <Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/> <Property name="verticalTextPosition" type="int" value="3"/>
</Properties> </Properties>
</Component> <Events>
</SubComponents> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnFilterActionPerformed"/>
</Container> </Events>
<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>
</Component> </Component>
<Component class="javax.swing.JToggleButton" name="btnFormatTinyLeader"> <Component class="javax.swing.JToggleButton" name="btnFormatTinyLeader">
<Properties> <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="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> </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> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
@ -517,7 +522,7 @@
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <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> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>

View file

@ -44,6 +44,7 @@ import java.beans.PropertyVetoException;
import java.io.File; import java.io.File;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -68,7 +69,6 @@ import mage.cards.decks.importer.DeckImporterUtil;
import mage.client.MageFrame; import mage.client.MageFrame;
import mage.client.chat.ChatPanel; import mage.client.chat.ChatPanel;
import mage.client.components.MageComponents; import mage.client.components.MageComponents;
import mage.client.deckeditor.table.TableModel;
import mage.client.dialog.JoinTableDialog; import mage.client.dialog.JoinTableDialog;
import mage.client.dialog.NewTableDialog; import mage.client.dialog.NewTableDialog;
import mage.client.dialog.NewTournamentDialog; import mage.client.dialog.NewTournamentDialog;
@ -121,19 +121,6 @@ public class TablesPanel extends javax.swing.JPanel {
initComponents(); initComponents();
tableModel.setSession(session); 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(); tableTables.createDefaultColumnsFromModel();
activeTablesSorter = new MageTableRowSorter(tableModel); activeTablesSorter = new MageTableRowSorter(tableModel);
tableTables.setRowSorter(activeTablesSorter); tableTables.setRowSorter(activeTablesSorter);
@ -144,14 +131,15 @@ public class TablesPanel extends javax.swing.JPanel {
chatPanel.setBorder(null); chatPanel.setBorder(null);
chatPanel.setChatType(ChatPanel.ChatType.TABLES); 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) { for (JComponent component : components) {
component.setOpaque(false); component.setOpaque(false);
} }
jScrollPane1.getViewport().setBackground(new Color(255,255,255,50)); jScrollPane1.getViewport().setBackground(new Color(255,255,255,50));
jScrollPane2.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; Action openTableAction;
openTableAction = new AbstractAction() 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) // !!!! adds action buttons to the table panel (don't delete this)
new ButtonColumn(tableTables, openTableAction, TableTableModel.ACTION_COLUMN); new ButtonColumn(tableTables, openTableAction, TableTableModel.ACTION_COLUMN);
new ButtonColumn(tableCompleted, closedTableAction, MatchesTableModel.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("jScrollPane1", jScrollPane1);
components.put("jScrollPane1ViewPort", jScrollPane1.getViewport()); components.put("jScrollPane1ViewPort", jScrollPane1.getViewport());
components.put("jPanel1", jPanel1); components.put("jPanel1", topPanel);
components.put("tablesPanel", this); components.put("tablesPanel", this);
return components; return components;
@ -459,20 +462,84 @@ public class TablesPanel extends javax.swing.JPanel {
private void activeTablesFilter() { private void activeTablesFilter() {
// state // state
StringBuilder stateFilter = new StringBuilder(); List<RowFilter<Object, Object>> stateFilterList = new ArrayList<>();
if (btnStateWaiting.isSelected()) { if (btnStateWaiting.isSelected()) {
stateFilter.append("Waiting"); stateFilterList.add(RowFilter.regexFilter("Waiting", TableTableModel.COLUMN_STATUS));
} }
if (btnStateActive.isSelected()) { if (btnStateActive.isSelected()) {
if (stateFilter.length() > 0) { stateFilterList.add(RowFilter.regexFilter("Dueling|Constructing|Drafting|Sideboard", TableTableModel.COLUMN_STATUS));
stateFilter.append("|"); }
}
stateFilter.append("Dueling|Constructing|Drafting|Sideboard"); // 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); if (btnFormatOther.isSelected()) {
activeTablesSorter.setRowFilter(rf); 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 /** This method is called from within the constructor to
* initialize the form. * initialize the form.
* WARNING: Do NOT modify this code. The content of this method is * 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 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jPanel1 = new javax.swing.JPanel(); topPanel = new javax.swing.JPanel();
btnNewTable = new javax.swing.JButton(); btnNewTable = new javax.swing.JButton();
btnNewTournament = new javax.swing.JButton(); btnNewTournament = new javax.swing.JButton();
filterStateBar = new javax.swing.JToolBar(); filterBar1 = new javax.swing.JToolBar();
btnStateWaiting = new javax.swing.JToggleButton(); btnStateWaiting = new javax.swing.JToggleButton();
btnStateActive = new javax.swing.JToggleButton(); btnStateActive = new javax.swing.JToggleButton();
btnStateFinished = 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(); btnTypeMatch = new javax.swing.JToggleButton();
btnTypeTourneyConstructed = new javax.swing.JToggleButton(); btnTypeTourneyConstructed = new javax.swing.JToggleButton();
btnTypeTourneyLimited = new javax.swing.JToggleButton(); btnTypeTourneyLimited = new javax.swing.JToggleButton();
filterFormatBar1 = new javax.swing.JToolBar(); filterBar2 = new javax.swing.JToolBar();
btnFormatBlock = new javax.swing.JToggleButton(); btnFormatBlock = new javax.swing.JToggleButton();
btnFormatStandard = new javax.swing.JToggleButton(); btnFormatStandard = new javax.swing.JToggleButton();
btnFormatModern = new javax.swing.JToggleButton(); btnFormatModern = new javax.swing.JToggleButton();
jSeparator3 = new javax.swing.JToolBar.Separator();
btnFormatCommander = new javax.swing.JToggleButton(); 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(); btnFormatLegacy = new javax.swing.JToggleButton();
btnFormatVintage = new javax.swing.JToggleButton(); btnFormatVintage = new javax.swing.JToggleButton();
btnFormatOther = new javax.swing.JToggleButton(); btnFormatOther = new javax.swing.JToggleButton();
btnFormatTinyLeader = new javax.swing.JToggleButton();
btnQuickStart = new javax.swing.JButton(); btnQuickStart = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel();
@ -517,9 +585,12 @@ public class TablesPanel extends javax.swing.JPanel {
jScrollPane2 = new javax.swing.JScrollPane(); jScrollPane2 = new javax.swing.JScrollPane();
tableCompleted = new javax.swing.JTable(); 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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/match_new.png"))); // NOI18N
btnNewTable.setToolTipText("Creates a new match table."); 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() { btnNewTable.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNewTableActionPerformed(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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/tourney_new.png"))); // NOI18N
btnNewTournament.setToolTipText("Creates a new tourney table."); 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() { btnNewTournament.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNewTournamentActionPerformed(evt); btnNewTournamentActionPerformed(evt);
} }
}); });
filterStateBar.setFloatable(false); filterBar1.setFloatable(false);
filterStateBar.setForeground(new java.awt.Color(102, 102, 255)); filterBar1.setForeground(new java.awt.Color(102, 102, 255));
filterStateBar.setFocusable(false); 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.setSelected(true);
btnStateWaiting.setToolTipText("Show tables waiting for players."); btnStateWaiting.setToolTipText("Shows all tables waiting for players.");
btnStateWaiting.setActionCommand("stateWait"); btnStateWaiting.setActionCommand("stateWait");
btnStateWaiting.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
btnStateWaiting.setFocusPainted(false); btnStateWaiting.setFocusPainted(false);
btnStateWaiting.setFocusable(false); btnStateWaiting.setFocusable(false);
btnStateWaiting.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 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.setMinimumSize(new java.awt.Dimension(27, 27));
btnStateWaiting.setPreferredSize(new java.awt.Dimension(23, 23)); btnStateWaiting.setPreferredSize(new java.awt.Dimension(23, 23));
btnStateWaiting.setRequestFocusEnabled(false); 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.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateWaiting.addActionListener(new java.awt.event.ActionListener() { btnStateWaiting.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { 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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"))); // NOI18N
btnStateActive.setSelected(true); btnStateActive.setSelected(true);
btnStateActive.setToolTipText("Show tables with active matches."); btnStateActive.setToolTipText("Shows all tables with active matches.");
btnStateActive.setActionCommand("stateActive"); btnStateActive.setActionCommand("stateActive");
btnStateActive.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
btnStateActive.setFocusPainted(false); btnStateActive.setFocusPainted(false);
btnStateActive.setFocusable(false); btnStateActive.setFocusable(false);
btnStateActive.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 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.setMinimumSize(new java.awt.Dimension(27, 27));
btnStateActive.setPreferredSize(new java.awt.Dimension(23, 23)); btnStateActive.setPreferredSize(new java.awt.Dimension(23, 23));
btnStateActive.setRequestFocusEnabled(false); 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.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateActive.addActionListener(new java.awt.event.ActionListener() { btnStateActive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { 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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N
btnStateFinished.setSelected(true); 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.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.setActionCommand("stateFinished");
btnStateFinished.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
btnStateFinished.setFocusPainted(false); btnStateFinished.setFocusPainted(false);
btnStateFinished.setFocusable(false); btnStateFinished.setFocusable(false);
btnStateFinished.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 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.setMinimumSize(new java.awt.Dimension(27, 27));
btnStateFinished.setPreferredSize(new java.awt.Dimension(23, 23)); btnStateFinished.setPreferredSize(new java.awt.Dimension(23, 23));
btnStateFinished.setRequestFocusEnabled(false); 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.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnStateFinished.addActionListener(new java.awt.event.ActionListener() { btnStateFinished.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStateFinishedActionPerformed(evt); btnStateFinishedActionPerformed(evt);
} }
}); });
filterStateBar.add(btnStateFinished); filterBar1.add(btnStateFinished);
filterBar1.add(jSeparator1);
filterTypeBar.setFloatable(false);
filterTypeBar.setFocusable(false);
btnTypeMatch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_match.png"))); // NOI18N btnTypeMatch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_match.png"))); // NOI18N
btnTypeMatch.setSelected(true); btnTypeMatch.setSelected(true);
btnTypeMatch.setToolTipText("Shows all non tournament tables.");
btnTypeMatch.setActionCommand("typeMatch"); btnTypeMatch.setActionCommand("typeMatch");
btnTypeMatch.setFocusable(false); btnTypeMatch.setFocusable(false);
btnTypeMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 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); 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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_tourney_construced.png"))); // NOI18N
btnTypeTourneyConstructed.setSelected(true); btnTypeTourneyConstructed.setSelected(true);
btnTypeTourneyConstructed.setToolTipText("Shows all constructed tournament tables.");
btnTypeTourneyConstructed.setActionCommand("typeTourneyConstructed"); btnTypeTourneyConstructed.setActionCommand("typeTourneyConstructed");
btnTypeTourneyConstructed.setFocusable(false); btnTypeTourneyConstructed.setFocusable(false);
btnTypeTourneyConstructed.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 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); 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.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_tourney_limited.png"))); // NOI18N
btnTypeTourneyLimited.setSelected(true); btnTypeTourneyLimited.setSelected(true);
btnTypeTourneyLimited.setToolTipText("Shows all limited tournament tables.");
btnTypeTourneyLimited.setActionCommand("typeTourneyLimited"); btnTypeTourneyLimited.setActionCommand("typeTourneyLimited");
btnTypeTourneyLimited.setFocusable(false); btnTypeTourneyLimited.setFocusable(false);
btnTypeTourneyLimited.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 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); 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); filterBar2.setFloatable(false);
filterFormatBar1.setFocusable(false); filterBar2.setFocusable(false);
filterBar2.setOpaque(false);
btnFormatBlock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_block.png"))); // NOI18N
btnFormatBlock.setSelected(true); btnFormatBlock.setSelected(true);
btnFormatBlock.setText("Block");
btnFormatBlock.setToolTipText("Block constructed formats.");
btnFormatBlock.setFocusable(false); btnFormatBlock.setFocusable(false);
btnFormatBlock.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnFormatBlock.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatBlock.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); 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.setSelected(true);
btnFormatStandard.setText("Standard");
btnFormatStandard.setToolTipText("Standard format.");
btnFormatStandard.setFocusable(false); btnFormatStandard.setFocusable(false);
btnFormatStandard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnFormatStandard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatStandard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); 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); 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.setSelected(true);
btnFormatCommander.setText("Commander");
btnFormatCommander.setToolTipText("Commander format.");
btnFormatCommander.setFocusable(false); btnFormatCommander.setFocusable(false);
btnFormatCommander.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnFormatCommander.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatCommander.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); 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); btnFormatTinyLeader.setSelected(true);
filterFormatBar2.setToolTipText("All tables with active matches"); btnFormatTinyLeader.setText("Tiny Leader");
filterFormatBar2.setFocusable(false); 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.setSelected(true);
btnFormatLegacy.setText("Legacy");
btnFormatLegacy.setToolTipText("Legacy format.");
btnFormatLegacy.setFocusable(false); btnFormatLegacy.setFocusable(false);
btnFormatLegacy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnFormatLegacy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatLegacy.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); 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.setSelected(true);
btnFormatVintage.setText("Vintage");
btnFormatVintage.setToolTipText("Vintage format.");
btnFormatVintage.setFocusable(false); btnFormatVintage.setFocusable(false);
btnFormatVintage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnFormatVintage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnFormatVintage.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); 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); btnFormatOther.setSelected(true);
filterFormatBar2.add(btnFormatOther); btnFormatOther.setText("Other");
btnFormatOther.setToolTipText("Other formats (Pauper, Extended, etc.)");
btnFormatTinyLeader.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_tiny_leader.png"))); // NOI18N btnFormatOther.setFocusable(false);
btnFormatTinyLeader.setSelected(true); btnFormatOther.addActionListener(new java.awt.event.ActionListener() {
filterFormatBar2.add(btnFormatTinyLeader); public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFilterActionPerformed(evt);
}
});
filterBar2.add(btnFormatOther);
btnQuickStart.setText("Quick Start"); btnQuickStart.setText("Quick Start");
btnQuickStart.setFocusable(false); btnQuickStart.setFocusable(false);
@ -696,46 +831,38 @@ public class TablesPanel extends javax.swing.JPanel {
} }
}); });
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel);
jPanel1.setLayout(jPanel1Layout); topPanel.setLayout(topPanelLayout);
jPanel1Layout.setHorizontalGroup( topPanelLayout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(topPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(btnNewTable) .addComponent(btnNewTable)
.addGap(6, 6, 6) .addGap(6, 6, 6)
.addComponent(btnNewTournament) .addComponent(btnNewTournament)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(filterStateBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(topPanelLayout.createSequentialGroup()
.addComponent(filterTypeBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(filterBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGap(223, 223, 223)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnQuickStart))
.addComponent(filterFormatBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(filterBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.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)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); );
jPanel1Layout.setVerticalGroup( topPanelLayout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(topPanelLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnNewTable) .addComponent(btnNewTable)
.addComponent(btnNewTournament)) .addComponent(btnNewTournament))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(topPanelLayout.createSequentialGroup()
.addGroup(jPanel1Layout.createSequentialGroup() .addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(filterStateBar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(filterBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnQuickStart))
.addComponent(filterTypeBar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createSequentialGroup() .addComponent(filterBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
.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))))
.addContainerGap()) .addContainerGap())
); );
@ -815,7 +942,7 @@ public class TablesPanel extends javax.swing.JPanel {
); );
jPanel3Layout.setVerticalGroup( jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 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); jSplitPane1.setLeftComponent(jPanel3);
@ -824,7 +951,7 @@ public class TablesPanel extends javax.swing.JPanel {
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 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) .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE)) .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.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .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) .addGap(0, 0, 0)
.addComponent(jSplitPane1) .addComponent(jSplitPane1)
.addGap(0, 0, 0) .addGap(0, 0, 0)
@ -890,13 +1017,9 @@ public class TablesPanel extends javax.swing.JPanel {
} }
}//GEN-LAST:event_jButton1ActionPerformed }//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(); activeTablesFilter();
}//GEN-LAST:event_btnStateWaitingActionPerformed }//GEN-LAST:event_btnFilterActionPerformed
private void btnStateActiveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateActiveActionPerformed
activeTablesFilter();
}//GEN-LAST:event_btnStateActiveActionPerformed
private void btnStateFinishedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateFinishedActionPerformed private void btnStateFinishedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateFinishedActionPerformed
if (this.btnStateFinished.isSelected()) { if (this.btnStateFinished.isSelected()) {
@ -934,22 +1057,23 @@ public class TablesPanel extends javax.swing.JPanel {
private javax.swing.JToggleButton btnTypeTourneyConstructed; private javax.swing.JToggleButton btnTypeTourneyConstructed;
private javax.swing.JToggleButton btnTypeTourneyLimited; private javax.swing.JToggleButton btnTypeTourneyLimited;
private mage.client.chat.ChatPanel chatPanel; private mage.client.chat.ChatPanel chatPanel;
private javax.swing.JToolBar filterFormatBar1; private javax.swing.JToolBar filterBar1;
private javax.swing.JToolBar filterFormatBar2; private javax.swing.JToolBar filterBar2;
private javax.swing.JToolBar filterStateBar;
private javax.swing.JToolBar filterTypeBar;
private javax.swing.JButton jButton1; private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3; private javax.swing.JPanel jPanel3;
private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2; 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 jSplitPane1;
private javax.swing.JSplitPane jSplitPane2; private javax.swing.JSplitPane jSplitPane2;
private javax.swing.JTable tableCompleted; private javax.swing.JTable tableCompleted;
private javax.swing.JTable tableTables; private javax.swing.JTable tableTables;
private javax.swing.JPanel topPanel;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }
@ -957,6 +1081,7 @@ public class TablesPanel extends javax.swing.JPanel {
class TableTableModel extends AbstractTableModel { 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_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_INFO = 3;
public static final int COLUMN_STATUS = 4; public static final int COLUMN_STATUS = 4;
public static final int ACTION_COLUMN = 6; // column the action is located (starting with 0) 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