From 26b88d3b488bea2f3995d8f4bb86f95008bf0028 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 24 Apr 2015 16:34:50 +0200 Subject: [PATCH] Update table selection. --- .../java/mage/client/table/TablesPanel.form | 364 +++++++++++++++--- .../java/mage/client/table/TablesPanel.java | 327 +++++++++++++--- .../main/resources/buttons/format_block.png | Bin 0 -> 233 bytes .../resources/buttons/format_commander.png | Bin 0 -> 224 bytes .../main/resources/buttons/format_legacy.png | Bin 0 -> 239 bytes .../main/resources/buttons/format_modern.png | Bin 0 -> 268 bytes .../main/resources/buttons/format_other.png | Bin 0 -> 253 bytes .../resources/buttons/format_standard.png | Bin 0 -> 259 bytes .../resources/buttons/format_tiny_leader.png | Bin 0 -> 252 bytes .../main/resources/buttons/format_vintage.png | Bin 0 -> 241 bytes .../src/main/resources/buttons/match_new.png | Bin 0 -> 669 bytes .../main/resources/buttons/state_active.png | Bin 0 -> 244 bytes .../main/resources/buttons/state_finished.png | Bin 0 -> 241 bytes .../main/resources/buttons/state_waiting.png | Bin 0 -> 377 bytes .../resources/buttons/state_waiting_off.png | Bin 0 -> 377 bytes .../main/resources/buttons/tourney_new.png | Bin 0 -> 679 bytes .../src/main/resources/buttons/type_match.png | Bin 0 -> 271 bytes .../buttons/type_tourney_construced.png | Bin 0 -> 262 bytes .../buttons/type_tourney_limited.png | Bin 0 -> 252 bytes 19 files changed, 588 insertions(+), 103 deletions(-) create mode 100644 Mage.Client/src/main/resources/buttons/format_block.png create mode 100644 Mage.Client/src/main/resources/buttons/format_commander.png create mode 100644 Mage.Client/src/main/resources/buttons/format_legacy.png create mode 100644 Mage.Client/src/main/resources/buttons/format_modern.png create mode 100644 Mage.Client/src/main/resources/buttons/format_other.png create mode 100644 Mage.Client/src/main/resources/buttons/format_standard.png create mode 100644 Mage.Client/src/main/resources/buttons/format_tiny_leader.png create mode 100644 Mage.Client/src/main/resources/buttons/format_vintage.png create mode 100644 Mage.Client/src/main/resources/buttons/match_new.png create mode 100644 Mage.Client/src/main/resources/buttons/state_active.png create mode 100644 Mage.Client/src/main/resources/buttons/state_finished.png create mode 100644 Mage.Client/src/main/resources/buttons/state_waiting.png create mode 100644 Mage.Client/src/main/resources/buttons/state_waiting_off.png create mode 100644 Mage.Client/src/main/resources/buttons/tourney_new.png create mode 100644 Mage.Client/src/main/resources/buttons/type_match.png create mode 100644 Mage.Client/src/main/resources/buttons/type_tourney_construced.png create mode 100644 Mage.Client/src/main/resources/buttons/type_tourney_limited.png diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.form b/Mage.Client/src/main/java/mage/client/table/TablesPanel.form index 372e4e0fd23..a0928fb15b5 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.form +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.form @@ -26,14 +26,14 @@ - + - + @@ -50,11 +50,17 @@ + + + + + + + + + + - - - - @@ -63,14 +69,28 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + - + @@ -78,53 +98,309 @@ - + + + + + + + - - - - - - - - - + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - @@ -241,7 +517,7 @@ - + diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java index fdca4071b95..523438c3bf7 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java @@ -121,8 +121,19 @@ public class TablesPanel extends javax.swing.JPanel { initComponents(); tableModel.setSession(session); - chkShowCompleted.setVisible(true); - + + 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); @@ -279,8 +290,8 @@ public class TablesPanel extends javax.swing.JPanel { if (location != null && jSplitPane1 != null) { jSplitPane1.setDividerLocation(Integer.parseInt(location)); } - this.chkShowCompleted.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_SHOW_COMPLETED, "Yes").equals("Yes")); - if (this.chkShowCompleted.isSelected()) { + this.btnStateFinished.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_SHOW_COMPLETED, "Yes").equals("Yes")); + if (this.btnStateFinished.isSelected()) { this.jSplitPane2.setDividerLocation(-1); } else { @@ -336,7 +347,7 @@ public class TablesPanel extends javax.swing.JPanel { updatePlayersTask = new UpdatePlayersTask(session, roomId, this.chatPanel); updatePlayersTask.execute(); } - if (this.chkShowCompleted.isSelected()) { + if (this.btnStateFinished.isSelected()) { if (updateMatchesTask == null || updateMatchesTask.isDone()) { updateMatchesTask = new UpdateMatchesTask(session, roomId, this); updateMatchesTask.execute(); @@ -447,12 +458,19 @@ public class TablesPanel extends javax.swing.JPanel { } private void activeTablesFilter() { - if (cbStatusFilter.getSelectedItem().toString().equals("All tables")) { - activeTablesSorter.setRowFilter(null); - } else { - activeTablesSorter.setRowFilter(RowFilter.regexFilter("Waiting for players", 4)); + // state + StringBuilder stateFilter = new StringBuilder(); + if (btnStateWaiting.isSelected()) { + stateFilter.append("Waiting"); } - + if (btnStateActive.isSelected()) { + if (stateFilter.length() > 0) { + stateFilter.append("|"); + } + stateFilter.append("Dueling|Constructing|Drafting|Sideboard"); + } + RowFilter rf = RowFilter.regexFilter(stateFilter.toString(), 4); + activeTablesSorter.setRowFilter(rf); } /** This method is called from within the constructor to @@ -466,10 +484,26 @@ public class TablesPanel extends javax.swing.JPanel { jPanel1 = new javax.swing.JPanel(); btnNewTable = new javax.swing.JButton(); - btnQuickStart = new javax.swing.JButton(); btnNewTournament = new javax.swing.JButton(); - chkShowCompleted = new javax.swing.JCheckBox(); - cbStatusFilter = new javax.swing.JComboBox(); + filterStateBar = new javax.swing.JToolBar(); + btnStateWaiting = new javax.swing.JToggleButton(); + btnStateActive = new javax.swing.JToggleButton(); + btnStateFinished = new javax.swing.JToggleButton(); + filterTypeBar = new javax.swing.JToolBar(); + btnTypeMatch = new javax.swing.JToggleButton(); + btnTypeTourneyConstructed = new javax.swing.JToggleButton(); + btnTypeTourneyLimited = new javax.swing.JToggleButton(); + filterFormatBar1 = new javax.swing.JToolBar(); + btnFormatBlock = new javax.swing.JToggleButton(); + btnFormatStandard = new javax.swing.JToggleButton(); + btnFormatModern = new javax.swing.JToggleButton(); + btnFormatCommander = new javax.swing.JToggleButton(); + filterFormatBar2 = new javax.swing.JToolBar(); + 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(); jLabel2 = new javax.swing.JLabel(); @@ -483,40 +517,182 @@ public class TablesPanel extends javax.swing.JPanel { jScrollPane2 = new javax.swing.JScrollPane(); tableCompleted = new javax.swing.JTable(); - btnNewTable.setText("New Match"); + 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.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNewTableActionPerformed(evt); } }); - btnQuickStart.setText("Quick Start"); - btnQuickStart.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - btnQuickStartActionPerformed(evt); - } - }); - - btnNewTournament.setText("New Tournament"); + 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.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNewTournamentActionPerformed(evt); } }); - chkShowCompleted.setSelected(true); - chkShowCompleted.setText("Show Completed"); - chkShowCompleted.setToolTipText("Toggles the visibility of the table of completed\n
matches and tournaments in the lower area"); - chkShowCompleted.addActionListener(new java.awt.event.ActionListener() { + filterStateBar.setFloatable(false); + filterStateBar.setForeground(new java.awt.Color(102, 102, 255)); + filterStateBar.setFocusable(false); + + btnStateWaiting.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_waiting_off.png"))); // NOI18N + btnStateWaiting.setSelected(true); + btnStateWaiting.setToolTipText("Show 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); + btnStateWaiting.setMaximumSize(new java.awt.Dimension(27, 27)); + 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) { - chkShowCompletedActionPerformed(evt); + btnStateWaitingActionPerformed(evt); } }); + filterStateBar.add(btnStateWaiting); - cbStatusFilter.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All tables", "Waiting for players" })); - cbStatusFilter.addActionListener(new java.awt.event.ActionListener() { + btnStateActive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"))); // NOI18N + btnStateActive.setSelected(true); + btnStateActive.setToolTipText("Show 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); + btnStateActive.setMaximumSize(new java.awt.Dimension(27, 27)); + 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) { - cbStatusFilterActionPerformed(evt); + btnStateActiveActionPerformed(evt); + } + }); + filterStateBar.add(btnStateActive); + + btnStateFinished.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N + btnStateFinished.setSelected(true); + btnStateFinished.setToolTipText("Toggles the visibility of the table of completed
matches and tournaments in the lower area.\n
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); + btnStateFinished.setMaximumSize(new java.awt.Dimension(27, 27)); + 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); + + btnTypeMatch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_match.png"))); // NOI18N + btnTypeMatch.setSelected(true); + btnTypeMatch.setActionCommand("typeMatch"); + btnTypeMatch.setFocusable(false); + btnTypeMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnTypeMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterTypeBar.add(btnTypeMatch); + + btnTypeTourneyConstructed.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_tourney_construced.png"))); // NOI18N + btnTypeTourneyConstructed.setSelected(true); + btnTypeTourneyConstructed.setActionCommand("typeTourneyConstructed"); + btnTypeTourneyConstructed.setFocusable(false); + btnTypeTourneyConstructed.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnTypeTourneyConstructed.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterTypeBar.add(btnTypeTourneyConstructed); + + btnTypeTourneyLimited.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_tourney_limited.png"))); // NOI18N + btnTypeTourneyLimited.setSelected(true); + btnTypeTourneyLimited.setActionCommand("typeTourneyLimited"); + btnTypeTourneyLimited.setFocusable(false); + btnTypeTourneyLimited.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnTypeTourneyLimited.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterTypeBar.add(btnTypeTourneyLimited); + + filterFormatBar1.setFloatable(false); + filterFormatBar1.setFocusable(false); + + btnFormatBlock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_block.png"))); // NOI18N + btnFormatBlock.setSelected(true); + btnFormatBlock.setFocusable(false); + btnFormatBlock.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnFormatBlock.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterFormatBar1.add(btnFormatBlock); + + btnFormatStandard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_standard.png"))); // NOI18N + btnFormatStandard.setSelected(true); + btnFormatStandard.setFocusable(false); + btnFormatStandard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnFormatStandard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterFormatBar1.add(btnFormatStandard); + + btnFormatModern.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_modern.png"))); // NOI18N + btnFormatModern.setSelected(true); + filterFormatBar1.add(btnFormatModern); + + btnFormatCommander.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_commander.png"))); // NOI18N + btnFormatCommander.setSelected(true); + btnFormatCommander.setFocusable(false); + btnFormatCommander.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnFormatCommander.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterFormatBar1.add(btnFormatCommander); + + filterFormatBar2.setFloatable(false); + filterFormatBar2.setToolTipText("All tables with active matches"); + filterFormatBar2.setFocusable(false); + + btnFormatLegacy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_legacy.png"))); // NOI18N + btnFormatLegacy.setSelected(true); + btnFormatLegacy.setFocusable(false); + btnFormatLegacy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnFormatLegacy.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterFormatBar2.add(btnFormatLegacy); + + btnFormatVintage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/format_vintage.png"))); // NOI18N + btnFormatVintage.setSelected(true); + btnFormatVintage.setFocusable(false); + btnFormatVintage.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnFormatVintage.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + filterFormatBar2.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); + + btnQuickStart.setText("Quick Start"); + btnQuickStart.setFocusable(false); + btnQuickStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + btnQuickStart.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + btnQuickStart.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnQuickStartActionPerformed(evt); } }); @@ -530,24 +706,37 @@ public class TablesPanel extends javax.swing.JPanel { .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) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(chkShowCompleted) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cbStatusFilter, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(btnNewTable) - .addComponent(btnQuickStart) - .addComponent(btnNewTournament) - .addComponent(chkShowCompleted) - .addComponent(cbStatusFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(16, Short.MAX_VALUE)) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.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)))) + .addContainerGap()) ); jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); @@ -626,7 +815,7 @@ public class TablesPanel extends javax.swing.JPanel { ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE) + .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 494, Short.MAX_VALUE) ); jSplitPane1.setLeftComponent(jPanel3); @@ -643,13 +832,13 @@ public class TablesPanel extends javax.swing.JPanel { layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jPanel1, 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) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 584, Short.MAX_VALUE)) + .addGap(0, 598, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -701,20 +890,24 @@ public class TablesPanel extends javax.swing.JPanel { } }//GEN-LAST:event_jButton1ActionPerformed -private void chkShowCompletedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkShowCompletedActionPerformed - if (this.chkShowCompleted.isSelected()) { - this.jSplitPane2.setDividerLocation(-1); - } - else { - this.jSplitPane2.setDividerLocation(this.jPanel3.getHeight()); - } - PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_SHOW_COMPLETED, (chkShowCompleted.isSelected()?"Yes":"No")); - this.startTasks(); -}//GEN-LAST:event_chkShowCompletedActionPerformed - - private void cbStatusFilterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbStatusFilterActionPerformed + private void btnStateWaitingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateWaitingActionPerformed activeTablesFilter(); - }//GEN-LAST:event_cbStatusFilterActionPerformed + }//GEN-LAST:event_btnStateWaitingActionPerformed + + 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 + if (this.btnStateFinished.isSelected()) { + this.jSplitPane2.setDividerLocation(-1); + } + else { + this.jSplitPane2.setDividerLocation(this.jPanel3.getHeight()); + } + PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_SHOW_COMPLETED, (btnStateFinished.isSelected()?"Yes":"No")); + this.startTasks(); + }//GEN-LAST:event_btnStateFinishedActionPerformed private void handleError(Exception ex) { logger.fatal("Error loading deck: ", ex); @@ -723,12 +916,28 @@ private void chkShowCompletedActionPerformed(java.awt.event.ActionEvent evt) {// // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JToggleButton btnFormatBlock; + private javax.swing.JToggleButton btnFormatCommander; + private javax.swing.JToggleButton btnFormatLegacy; + private javax.swing.JToggleButton btnFormatModern; + private javax.swing.JToggleButton btnFormatOther; + private javax.swing.JToggleButton btnFormatStandard; + private javax.swing.JToggleButton btnFormatTinyLeader; + private javax.swing.JToggleButton btnFormatVintage; private javax.swing.JButton btnNewTable; private javax.swing.JButton btnNewTournament; private javax.swing.JButton btnQuickStart; - private javax.swing.JComboBox cbStatusFilter; + private javax.swing.JToggleButton btnStateActive; + private javax.swing.JToggleButton btnStateFinished; + private javax.swing.JToggleButton btnStateWaiting; + private javax.swing.JToggleButton btnTypeMatch; + private javax.swing.JToggleButton btnTypeTourneyConstructed; + private javax.swing.JToggleButton btnTypeTourneyLimited; private mage.client.chat.ChatPanel chatPanel; - private javax.swing.JCheckBox chkShowCompleted; + private javax.swing.JToolBar filterFormatBar1; + private javax.swing.JToolBar filterFormatBar2; + private javax.swing.JToolBar filterStateBar; + private javax.swing.JToolBar filterTypeBar; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; diff --git a/Mage.Client/src/main/resources/buttons/format_block.png b/Mage.Client/src/main/resources/buttons/format_block.png new file mode 100644 index 0000000000000000000000000000000000000000..ab872da5f0ba903c442cacaec566a1a7a1604ed7 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;j=V zi(`nz>Er|n)(}=Lhdt~a@(dq&73>&}L^teU(8^~zVj55=AJg`Q;bXnRJBCL*8qzJI z4Levm*EgSTU|G@h+~JR87x#rH4l|giGpYr!UT^$iGv%*zM{t7$)5(H44h*X}Qf}v{ zNIU*3YuMB;z;))i$F~3OMgnOEgkq#D7yR4Hb40zNf>&U>!``Eesm(m|8ILI4;CUdq c@T53HT%^9&Nv7N+pfedfUHx3vIVCg!08wsEF#rGn literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/format_commander.png b/Mage.Client/src/main/resources/buttons/format_commander.png new file mode 100644 index 0000000000000000000000000000000000000000..1dfb8376558d38de870a92f608a1b3f49c40ca9f GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;io` zi(`nz>Er|n)(}=5hZyD~-y46}3*2XWB)7sMFo7*Znd3j(BTVLke?aZtu%o9F}X#ABr zJC*Onx`-y%&!q}}4ZAoZ|JVv}FOWXK%zNT|fDQX94>l<_^$9#%C4IMWFfbg6G4Wcx S*A?hE1_n=8KbLh*2~7a3Iz_(# literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/format_legacy.png b/Mage.Client/src/main/resources/buttons/format_legacy.png new file mode 100644 index 0000000000000000000000000000000000000000..177c0b2ab6163021e0f6a01d3c859f55319eedf8 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;jBA zi(`nz>Er|n)(~bJhc^sI3>{(^k1#%w5Mny=zww9V&UGIer5Fw|WfX}y>|ySB&+w5= z;o5;T2c}7kd;x|NoCFp2@g6a9sFBmEZ=1l#>Y&4TD9sWpXT}W4$$9#nC2-`Y_pb%{a hL+&Z(jeI5Er|n)(}P^hZyD~+zl1{0{M(dq6+hvkMIWMIGzxg@a(_CAK8w2XWl>jN5wk| zkMgZ}WE$|xR6xFQ(|qTv8yE`t1>)Hsop-Qd)?#B5U(i+D@WWQXzRgPZ8P|kEA_{SQ zN0TrhH^o!x79lTez{m-yq zTylZAgP-9e^NRltUC9fU={HDOF-k=nFZlPL=c`f}LlNU~4zFVjAEfLIw=Dmj0rUxj Mr>mdKI;Vst09K}40RR91 literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/format_other.png b/Mage.Client/src/main/resources/buttons/format_other.png new file mode 100644 index 0000000000000000000000000000000000000000..5b29e6ed23af13a8649ce83a86fde6cf7bdf356a GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;kAc zi(`nz>Er|n)(}=5hZu$<>J2{_1@ak^m{lzKSNzCTC_Aw1r-8u#_D38F_jr%YZ;W8< zU~Ra;s%6gJq1q6^e6xW^<*dRQrXxxYe`Gt<89tUO?BkzW&3{zw1e=b7@dIO#<{Rt{ z72F}0>sOdNuAAs+wt(?0L&_e8S1B_Z4gPa0NHYX|km`PR-lMKnl7VZssY6VY+ypC! wJ?tIz&Z6rZ+gOV%4(_?ed_-|Er#KUX?+$C7@0V6r1D(#`>FVdQ&MBb@0Hu#pH~;_u literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/format_standard.png b/Mage.Client/src/main/resources/buttons/format_standard.png new file mode 100644 index 0000000000000000000000000000000000000000..67466a36bad0611ecc43eba347f7cad1d4f59bd7 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;jfK zi(`nz>Er|n))x*;9j+WJ7*C#Fz`cs$W2(YG{-etqEf_j{7ktujc*8t(H-Bh9Q<_31 z+ry_0HjEw83qBbIFgq3nH$*UZ@J`_Ea4>#gAaI*uBU8vfOM(6F!O0EpxY!lq7?0ea zC=$z_B(4z0aAf_$B*6fE4~6WohF_BzPp&kmVeVj^z*FYEr|n)(~bp2OGu?afXk43U&-f${T(#3dl1);!((JTorgQ&4E#1KHH=J9zV&(B%xCu6{1-oD!MEr|n)(}=hhdm4(EasZBmSJjk z!zc9z-0bWtlqPIm?;Oj-Y&;>RUEIcvi(6jhqiDcJ=^rNE3?DgFn0*#JTHvsohqu|< j<52}8_oV;r#taPQGqpbpx!(;3I+wxI)z4*}Q$iB}*0f1u literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/match_new.png b/Mage.Client/src/main/resources/buttons/match_new.png new file mode 100644 index 0000000000000000000000000000000000000000..da127a0c20231a95e6b88e4696973b4f0d35aee8 GIT binary patch literal 669 zcmV;O0%HA%P)Wv8fNlyE8&D8&2;$J8Li`{64n7|B<)!Zh zR6O{R@9w_)zW?33?@}lXZnGj1)1oSFLj=yghJ8US8vkkLGPNh7FMfzs@fP~A|n?eq)&Q2Nxb~}E7 z?T&Z`zZEmz!H)6}a7A>n=lHfw5`3fY+C|3PrG1E9%|pPXsKokZ5kiUaBK;yh;X#u5 z@~RLdGRHWFJwwtcMwK;nPUwz_H_J&z{QkE2Z`UAzvwN{Q_x*#|#dOSzEz{pL2%q}n|6zXtW-V};r9RbF00000NkvXXu0mjf Dj~+cB literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/state_active.png b/Mage.Client/src/main/resources/buttons/state_active.png new file mode 100644 index 0000000000000000000000000000000000000000..455958b2486f1988308e654c2297fce1105c80f2 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;i;2 zi(`nz>Er|n)(}=9hZ>fS^9&yu72+6=uq~1LB-8Pq`D3<19sdy~iz^!wgs(JYu|4F_ zh;2}@XYJU}{4rVK-N7^m#*oX!E1LcX996iTG=YbGXCAXa_X6n+jGh-o754F`Hk+Jx zoHUyu^n7F9f$9}awgGl$q^CDla86>}-}uAkN`i$)Lz|69BDcV2hL2J!_Qx)0+{v~| n^2u5rg>47KrFE1weljsUVlv2eskHb3bTNactDnm{r-UW|Cd^YJ literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/state_finished.png b/Mage.Client/src/main/resources/buttons/state_finished.png new file mode 100644 index 0000000000000000000000000000000000000000..dc1337f98d6ceed4f6b9c2c177af9c953e2ba95b GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;jxQ zi(`nz>Er|n)(}=XhdT^MxEm_C1?Dq6Vt1&K@2Fgm#J}JX+YO!v4O##Aud*b4XZTpB zAjbGeXhj6OfcJwU)-w&-4m!-Gf*pN~k9Y&beHfEiW7uRGq!-|Ox#*XO>8~H-=*hBKT?3n*4C-N$!IdW|f4)`d$!z7*IqpU(5Pw0(im2?JC_MIPi it`symFueNykdNV7uFg%B%UK}jGI+ZBxvX46EZn%a~bBbB=iH#ZwJM!a? ze~^AsGeP3QhtCS83cd>acF7->*(=fZR-xG;F4`RU*G(KeL z;4fl5Qy|FO#;}1gNR3C*;CU01V2ahI&yHCp%@WfN9C46X!j>YyEX>W^K8M$t^+eiV zi#A(@qYDfeG?^;hJz5VoPwZ@DO_@+BcQ`kop*emdh*2yBvwvj_%c6*~Q z({ja7o^A7`C1n1&8@|Y6{CHDhMkR}cg@{9v!kZ%tZZusNmE=(qci?hdHzD!CW{$)Q zQH?nb0?f;~#FoO=Q@>sKyf{Y4E&>NifA~(`U!5CJB@22aY&MEMZF#VCH5PZs%=|VLkE8 zg6*%Z!qEi=44O=p?yZg|nmZdOvZe&cHUG>FXaK61#9S$vy`X6kk4T2HiYhb1EUPpT UOTBg$0AbU@$C9G>8}t z3JVJt7ZweIh6RIRVZopvGEh)ZFlrDyFbo-Z!C+W8-zUFs{CKFFc)Rn#kN57o?|t`s z-@kXpI3x1Sq{Wm;YuJxBEu#NGz_+NS?Eyax0u75GH3H5^#RKaS1}5OhlFxxeE5oS* zIkkVgVXh&oLN2Hz)(5`vfKTrW(!k;(P_$SZCUXb`iRB25j)vp4YQoqEe3kL`xn$ux zcf@!+K=GbZyzG27r|5LWlu6D6mL*Ja6Ofp=IK!gl(5kqIZ*>HEV?in z5u{DOVZBN666Bdt34B*tkpmyI7(cS`EDj+%COv6h2fz6tF(VSFVSdL)B!|lM{)yJ} zaimHYr@n#FMa&{!KyFB=`V;kb(DPp6v02^2Y$ zS_RJrNu}>R?3srb^nS=dXNJ}u+4YdrC6r-Kll;+f-!fv!8Q!5X>L3IUq|-+)(DgRr z%@uHlo}o!uLofL(ix4kvNhzecMFgZbTob7?XI2EzmGzxP9j8{i&+zo%=R&VwEh!JT zVV?{sfe!6igwg5`1WphtJ#ggq167=$jFxh`!iTmfJW8NVF294F9!}bWj(St}&qAk0 zp&g6{80)B`Z0?aTS)3vSnzW~a4=$nPBti4Au?3v~&jyDG$Rp{N;Rp8IUSj#zsa*g7 N002ovPDHLkV1n(4Bw+vm literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/type_match.png b/Mage.Client/src/main/resources/buttons/type_match.png new file mode 100644 index 0000000000000000000000000000000000000000..15ea06ef9d414e45659a9c7ffd461f2c137d9e7e GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAQ1GCq zi(`nz>Er|n)(}Q5hdWG1xEp>j2%Kk3;#Qc)c!W1#jpGS{3CI3B{E_XL&-{@^L%zja z;Bl99z|rglU$PbKm{R9AtP*5=bUDD=YJu3%13VS{p>r6H>|e;0?r>Dj`D%&7PX+zF zcBv-}lO8w}<#7q)983i=|SAO_Dp!opH ziT(TyKP&`hGZgZfgo!yEW)%@;bEuK-uxBph6}aEN>M#S7!x^KdNrnt^SM5uR8RiKA PJ;UJX>gTe~DWM4fHvd|i literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/type_tourney_construced.png b/Mage.Client/src/main/resources/buttons/type_tourney_construced.png new file mode 100644 index 0000000000000000000000000000000000000000..ba0f0401411b6742b5f1563c6c91879392bcbdb8 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;iH* zi(`nz>Er|n)|LhafzJvbQyU^!PNg++Hi_skJYsgJVd{`)_?WHmkN?R1#t5d4$E7(c4XF3_Safi@lO{*u(65hNYu^ zappgs&~7G`1&qavuWAHUETuCd8un~v=?J~>#NC8}A#aA|w-ubJ_CP-{c)I$ztaD0e F0sy95Q=I?+ literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/buttons/type_tourney_limited.png b/Mage.Client/src/main/resources/buttons/type_tourney_limited.png new file mode 100644 index 0000000000000000000000000000000000000000..48b26b87204f43e98690b09499c41cc54e1bbe42 GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAP;i~6 zi(`nz>Er|n))oeC0dIlD8yGsaGkj!J*vEW?zu||yh(5z3K7}~OBf$ldH<*u9PcUix zP^nPIcSI(j*)hp-M~ndD5l)9cva3E=U3tc|;*aQxA2Km)FBmp53%qa8n!|WRGvK!5 zggqr}nmIBTcqcMG5?XPHL*?uVwwm@;vzd9tc@{8+cE|m*YabDM~% wF>K@vk$G~(^nwB7%{vT7ZLfGJA7*4=u-a|FRXwA5JJ96}p00i_>zopr01!1)jQ{`u literal 0 HcmV?d00001