From bf2861c309af24e75cb8487f0ad33cf1b461b0d0 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 17 Mar 2019 04:38:31 +0400 Subject: [PATCH] * UI: improved skip buttons and preferences: * added new setting for STACK skip button: stops on full empty stack (default) or on new objects added; * added new dynamic hints for skip buttons to see current settings and modes; * fixed that some skip buttons not de-activated after goal was achieved; * fixed wrong default render mode for cards, MTGO must be default (#4409); --- .../mage/client/dialog/PreferencesDialog.form | 51 +- .../mage/client/dialog/PreferencesDialog.java | 1489 ++++++++--------- .../main/java/mage/client/game/GamePanel.java | 264 ++- .../src/mage/player/human/HumanPlayer.java | 54 +- .../main/java/mage/players/PlayerImpl.java | 2 +- .../players/net/UserSkipPrioritySteps.java | 10 +- 6 files changed, 1030 insertions(+), 840 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form index 4d8fb9ea08..8da4c30a02 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.form @@ -4071,7 +4071,7 @@ - + @@ -4079,7 +4079,7 @@ - + @@ -4112,7 +4112,7 @@ - + @@ -4159,7 +4159,7 @@ - + @@ -4170,14 +4170,14 @@ - + - - + + @@ -4186,18 +4186,31 @@ - - + + + + + + + + + + + + + + + - - + + @@ -4206,8 +4219,8 @@ - - + + @@ -4302,7 +4315,7 @@ - + @@ -4469,7 +4482,7 @@ - + @@ -4610,7 +4623,7 @@ - + @@ -4648,7 +4661,7 @@ - + @@ -6043,7 +6056,7 @@ - + @@ -6249,7 +6262,7 @@ - + diff --git a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java index 266d9540e6..fd03d4403c 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/PreferencesDialog.java @@ -1,55 +1,13 @@ - - - /* - * PreferencesDialog.java - * - * Created on 26.06.2011, 16:35:40 - */ package mage.client.dialog; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Image; -import java.awt.Rectangle; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.image.BufferedImage; -import java.io.File; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.prefs.BackingStoreException; -import java.util.prefs.Preferences; -import javax.swing.BorderFactory; -import javax.swing.DefaultComboBoxModel; -import javax.swing.ImageIcon; -import javax.swing.JCheckBox; -import javax.swing.JComboBox; -import javax.swing.JFileChooser; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSlider; -import javax.swing.JTextField; -import javax.swing.KeyStroke; -import javax.swing.border.Border; -import javax.swing.filechooser.FileFilter; import mage.client.MageFrame; import mage.client.SessionHandler; import mage.client.components.KeyBindButton; -import static mage.client.constants.Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR; - import mage.client.util.CardLanguage; import mage.client.util.Config; import mage.client.util.GUISizeHelper; import mage.client.util.ImageHelper; import mage.client.util.gui.BufferedImageBuilder; -import static mage.constants.Constants.DEFAULT_AVATAR_ID; -import static mage.constants.Constants.MAX_AVATAR_ID; -import static mage.constants.Constants.MIN_AVATAR_ID; import mage.players.net.UserData; import mage.players.net.UserGroup; import mage.players.net.UserSkipPrioritySteps; @@ -59,6 +17,23 @@ import mage.remote.Session; import mage.view.UserRequestMessage; import org.apache.log4j.Logger; +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.filechooser.FileFilter; +import java.awt.*; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; +import java.io.File; +import java.util.List; +import java.util.*; +import java.util.prefs.BackingStoreException; +import java.util.prefs.Preferences; + +import static mage.client.constants.Constants.BATTLEFIELD_FEEDBACK_COLORIZING_MODE_ENABLE_BY_MULTICOLOR; +import static mage.constants.Constants.*; + /** * Preferences dialog. * @@ -149,6 +124,7 @@ public class PreferencesDialog extends javax.swing.JDialog { public static final String KEY_STOP_BLOCK = "stopDeclareBlockersStep"; public static final String KEY_STOP_ALL_MAIN_PHASES = "stopOnAllMainPhases"; public static final String KEY_STOP_ALL_END_PHASES = "stopOnAllEndPhases"; + public static final String KEY_STOP_NEW_STACK_OBJECTS = "stopOnNewStackObjects"; public static final String KEY_PASS_PRIORITY_CAST = "passPriorityCast"; public static final String KEY_PASS_PRIORITY_ACTIVATION = "passPriorityActivation"; public static final String KEY_AUTO_ORDER_TRIGGER = "autoOrderTrigger"; @@ -353,10 +329,8 @@ public class PreferencesDialog extends javax.swing.JDialog { return true; } if (filename != null) { - if (filename.endsWith(".jpg") || filename.endsWith(".jpeg") - || filename.endsWith(".png") || filename.endsWith(".bmp")) { - return true; - } + return filename.endsWith(".jpg") || filename.endsWith(".jpeg") + || filename.endsWith(".png") || filename.endsWith(".bmp"); } return false; } @@ -474,6 +448,7 @@ public class PreferencesDialog extends javax.swing.JDialog { phases_stopSettings = new javax.swing.JPanel(); cbStopAttack = new javax.swing.JCheckBox(); cbStopBlock = new javax.swing.JCheckBox(); + cbStopOnNewStackObjects = new javax.swing.JCheckBox(); cbStopOnAllMain = new javax.swing.JCheckBox(); cbStopOnAllEnd = new javax.swing.JCheckBox(); cbPassPriorityCast = new javax.swing.JCheckBox(); @@ -624,24 +599,24 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout main_gamelogLayout = new org.jdesktop.layout.GroupLayout(main_gamelog); main_gamelog.setLayout(main_gamelogLayout); main_gamelogLayout.setHorizontalGroup( - main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_gamelogLayout.createSequentialGroup() - .addContainerGap() - .add(main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(cbDraftLogAutoSave) - .add(cbGameJsonLogAutoSave) - .add(cbGameLogAutoSave, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 505, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_gamelogLayout.createSequentialGroup() + .addContainerGap() + .add(main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(cbDraftLogAutoSave) + .add(cbGameJsonLogAutoSave) + .add(cbGameLogAutoSave, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 505, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_gamelogLayout.setVerticalGroup( - main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_gamelogLayout.createSequentialGroup() - .add(cbGameLogAutoSave) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbDraftLogAutoSave) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbGameJsonLogAutoSave) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + main_gamelogLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_gamelogLayout.createSequentialGroup() + .add(cbGameLogAutoSave) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbDraftLogAutoSave) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbGameJsonLogAutoSave) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_card.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card")); @@ -673,7 +648,7 @@ public class PreferencesDialog extends javax.swing.JDialog { showFullImagePath.setSelected(true); showFullImagePath.setToolTipText("Show the path Xmage is expecting for this card's image (only displays if missing)"); showFullImagePath.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); - showFullImagePath.setLabel("Display image path for missing images"); + showFullImagePath.setText("Display image path for missing images"); showFullImagePath.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { showFullImagePathActionPerformed(evt); @@ -683,29 +658,29 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout main_cardLayout = new org.jdesktop.layout.GroupLayout(main_card); main_card.setLayout(main_cardLayout); main_cardLayout.setHorizontalGroup( - main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_cardLayout.createSequentialGroup() - .add(6, 6, 6) - .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .add(main_cardLayout.createSequentialGroup() - .add(showCardName) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(showFullImagePath))) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_cardLayout.createSequentialGroup() + .add(6, 6, 6) + .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(tooltipDelayLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .add(main_cardLayout.createSequentialGroup() + .add(showCardName) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(showFullImagePath))) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_cardLayout.setVerticalGroup( - main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_cardLayout.createSequentialGroup() - .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(showCardName) - .add(showFullImagePath)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tooltipDelayLabel) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_cardLayout.createSequentialGroup() + .add(main_cardLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(showCardName) + .add(showFullImagePath)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tooltipDelayLabel) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tooltipDelay, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_game.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Game")); @@ -792,48 +767,48 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout main_gameLayout = new org.jdesktop.layout.GroupLayout(main_game); main_game.setLayout(main_gameLayout); main_gameLayout.setHorizontalGroup( - main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_gameLayout.createSequentialGroup() - .addContainerGap() - .add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_gameLayout.createSequentialGroup() - .add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) - .add(showPlayerNamesPermanently, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(nonLandPermanentsInOnePile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(cbConfirmEmptyManaPool, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(cbShowStormCounter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(cbAskMoveToGraveOrder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(showAbilityPickerForced, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .add(0, 0, Short.MAX_VALUE)) - .add(displayLifeOnAvatar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) + main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_gameLayout.createSequentialGroup() + .addContainerGap() + .add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_gameLayout.createSequentialGroup() + .add(main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) + .add(showPlayerNamesPermanently, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(nonLandPermanentsInOnePile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(cbConfirmEmptyManaPool, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(cbAllowRequestToShowHandCards, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(cbShowStormCounter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(cbAskMoveToGraveOrder, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(showAbilityPickerForced, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .add(0, 0, Short.MAX_VALUE)) + .add(displayLifeOnAvatar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); main_gameLayout.setVerticalGroup( - main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_gameLayout.createSequentialGroup() - .add(nonLandPermanentsInOnePile) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(showPlayerNamesPermanently) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(displayLifeOnAvatar) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(showAbilityPickerForced) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbAllowRequestToShowHandCards) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbShowStormCounter) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbConfirmEmptyManaPool) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbAskMoveToGraveOrder)) + main_gameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_gameLayout.createSequentialGroup() + .add(nonLandPermanentsInOnePile) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(showPlayerNamesPermanently) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(displayLifeOnAvatar) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(showAbilityPickerForced) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbAllowRequestToShowHandCards) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbShowStormCounter) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbConfirmEmptyManaPool) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbAskMoveToGraveOrder)) ); - nonLandPermanentsInOnePile.getAccessibleContext().setAccessibleName(KEY_PERMANENTS_IN_ONE_PILE); + nonLandPermanentsInOnePile.getAccessibleContext().setAccessibleName("nonLandPermanentsInOnePile"); main_battlefield.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Battlefield")); - cbBattlefieldFeedbackColorizingMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Disable colorizing", "Enable one color for all phases", "Enable multicolor for different phases" })); + cbBattlefieldFeedbackColorizingMode.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Disable colorizing", "Enable one color for all phases", "Enable multicolor for different phases"})); cbBattlefieldFeedbackColorizingMode.setToolTipText("Battlefield feedback panel colorizing on your turn (e.g. use green color if you must select card or answer to request)"); cbBattlefieldFeedbackColorizingMode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -847,46 +822,46 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout main_battlefieldLayout = new org.jdesktop.layout.GroupLayout(main_battlefield); main_battlefield.setLayout(main_battlefieldLayout); main_battlefieldLayout.setHorizontalGroup( - main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_battlefieldLayout.createSequentialGroup() - .addContainerGap() - .add(lblBattlefieldFeedbackColorizingMode) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 278, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_battlefieldLayout.createSequentialGroup() + .addContainerGap() + .add(lblBattlefieldFeedbackColorizingMode) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 278, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_battlefieldLayout.setVerticalGroup( - main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(lblBattlefieldFeedbackColorizingMode) - .add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(main_battlefieldLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(lblBattlefieldFeedbackColorizingMode) + .add(cbBattlefieldFeedbackColorizingMode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) ); org.jdesktop.layout.GroupLayout tabMainLayout = new org.jdesktop.layout.GroupLayout(tabMain); tabMain.setLayout(tabMainLayout); tabMainLayout.setHorizontalGroup( - tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabMainLayout.createSequentialGroup() - .addContainerGap() - .add(tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, main_card, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.TRAILING, main_gamelog, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(main_game, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.TRAILING, main_battlefield, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) + tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabMainLayout.createSequentialGroup() + .addContainerGap() + .add(tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, main_card, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.TRAILING, main_gamelog, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(main_game, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.TRAILING, main_battlefield, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); tabMainLayout.setVerticalGroup( - tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabMainLayout.createSequentialGroup() - .addContainerGap() - .add(main_card, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(main_game, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(main_gamelog, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(main_battlefield, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + tabMainLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabMainLayout.createSequentialGroup() + .addContainerGap() + .add(main_card, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(main_game, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(main_gamelog, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(main_battlefield, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); main_card.getAccessibleContext().setAccessibleName("Game panel"); @@ -896,18 +871,18 @@ public class PreferencesDialog extends javax.swing.JDialog { tabGuiSize.setMaximumSize(new java.awt.Dimension(527, 423)); tabGuiSize.setMinimumSize(new java.awt.Dimension(527, 423)); java.awt.GridBagLayout tabGuiSizeLayout = new java.awt.GridBagLayout(); - tabGuiSizeLayout.columnWidths = new int[] {0}; - tabGuiSizeLayout.rowHeights = new int[] {0, 20, 0}; - tabGuiSizeLayout.columnWeights = new double[] {1.0}; - tabGuiSizeLayout.rowWeights = new double[] {1.0, 0.0, 1.0}; + tabGuiSizeLayout.columnWidths = new int[]{0}; + tabGuiSizeLayout.rowHeights = new int[]{0, 20, 0}; + tabGuiSizeLayout.columnWeights = new double[]{1.0}; + tabGuiSizeLayout.rowWeights = new double[]{1.0, 0.0, 1.0}; tabGuiSize.setLayout(tabGuiSizeLayout); guiSizeBasic.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Size basic elements")); guiSizeBasic.setMinimumSize(new java.awt.Dimension(600, 180)); guiSizeBasic.setPreferredSize(new java.awt.Dimension(600, 180)); java.awt.GridBagLayout guiSizeBasicLayout = new java.awt.GridBagLayout(); - guiSizeBasicLayout.columnWeights = new double[] {1.0, 1.0, 1.0}; - guiSizeBasicLayout.rowWeights = new double[] {1.0, 0.2, 1.0, 0.2}; + guiSizeBasicLayout.columnWeights = new double[]{1.0, 1.0, 1.0}; + guiSizeBasicLayout.rowWeights = new double[]{1.0, 0.2, 1.0, 0.2}; guiSizeBasic.setLayout(guiSizeBasicLayout); sliderFontSize.setMajorTickSpacing(5); @@ -1096,8 +1071,8 @@ public class PreferencesDialog extends javax.swing.JDialog { guiSizeGame.setMinimumSize(new java.awt.Dimension(600, 180)); guiSizeGame.setPreferredSize(new java.awt.Dimension(600, 180)); java.awt.GridBagLayout guiSizeGameLayout = new java.awt.GridBagLayout(); - guiSizeGameLayout.columnWeights = new double[] {1.0, 1.0, 1.0, 1.0}; - guiSizeGameLayout.rowWeights = new double[] {1.0, 0.2, 1.0, 0.2}; + guiSizeGameLayout.columnWeights = new double[]{1.0, 1.0, 1.0, 1.0}; + guiSizeGameLayout.rowWeights = new double[]{1.0, 0.2, 1.0, 0.2}; guiSizeGame.setLayout(guiSizeGameLayout); sliderCardSizeHand.setMajorTickSpacing(5); @@ -1318,7 +1293,7 @@ public class PreferencesDialog extends javax.swing.JDialog { tabsPanel.addTab("GUI Size", tabGuiSize); - jLabelHeadLine.setText("Choose phases your game will stop on if not skipped by a skip action (e.g. F6):"); + jLabelHeadLine.setText("Default stop steps if not skip buttons activated (e.g. F6):"); jLabelYourTurn.setText("Your turn"); @@ -1328,7 +1303,7 @@ public class PreferencesDialog extends javax.swing.JDialog { jLabelDraw.setText("Draw:"); - jLabelMain1.setText("Main:"); + jLabelMain1.setText("Main 1:"); jLabelBeforeCombat.setText("Before combat:"); @@ -1338,12 +1313,12 @@ public class PreferencesDialog extends javax.swing.JDialog { jLabelEndOfTurn.setText("End of turn:"); - phases_stopSettings.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Stop settings")); - phases_stopSettings.setLayout(new java.awt.GridLayout(7, 1)); + phases_stopSettings.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "SKIP settings")); + phases_stopSettings.setLayout(new java.awt.GridLayout(8, 1)); cbStopAttack.setSelected(true); - cbStopAttack.setText("Stop on declare attackers step if you skip steps (F4/F5/F7) and attackers are available"); - cbStopAttack.setToolTipText("If you use F4, F5 or F7 to skip steps, you stop on declare attackers step if attackers are available. If this option is not activated, you also skip the declare attackers step with this actions. F9 does always skip the declare attackers step."); + cbStopAttack.setText("STOP skips on declare attackers if attackers are available"); + cbStopAttack.setToolTipText(""); cbStopAttack.setActionCommand(""); cbStopAttack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1352,8 +1327,8 @@ public class PreferencesDialog extends javax.swing.JDialog { }); phases_stopSettings.add(cbStopAttack); - cbStopBlock.setText("Stop on your declare blockers step also if no blockers available"); - cbStopBlock.setToolTipText("Also if you have no blockers to declare, the game stops at the declare blockers step."); + cbStopBlock.setText("STOP skips on declare blockers if blockers are available"); + cbStopBlock.setToolTipText(""); cbStopBlock.setActionCommand(""); cbStopBlock.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1362,8 +1337,19 @@ public class PreferencesDialog extends javax.swing.JDialog { }); phases_stopSettings.add(cbStopBlock); - cbStopOnAllMain.setText("Skip with F7 to next main phase (if not activated skip always to your next main phase)"); - cbStopOnAllMain.setToolTipText("If activated F7 skips to next main phases (regardless of the active players)."); + cbStopOnNewStackObjects.setText("Skip to STACK resolved (F10): stop on new objects added (on) or stop until empty (off)"); + cbStopOnNewStackObjects.setToolTipText(""); + cbStopOnNewStackObjects.setActionCommand(""); + cbStopOnNewStackObjects.setPreferredSize(new java.awt.Dimension(300, 25)); + cbStopOnNewStackObjects.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cbStopOnNewStackObjectsActionPerformed(evt); + } + }); + phases_stopSettings.add(cbStopOnNewStackObjects); + + cbStopOnAllMain.setText("Skip to MAIN step (F7): stop on any main steps (on) or stop on your main step (off)"); + cbStopOnAllMain.setToolTipText(""); cbStopOnAllMain.setActionCommand(""); cbStopOnAllMain.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1372,8 +1358,8 @@ public class PreferencesDialog extends javax.swing.JDialog { }); phases_stopSettings.add(cbStopOnAllMain); - cbStopOnAllEnd.setText("Skip with F5 to next end step (if not activated only to end steps of opponents)"); - cbStopOnAllEnd.setToolTipText("If activated - F5 skips to the next end step (regardless of the current player)"); + cbStopOnAllEnd.setText("Skip to END step (F5): stop on any end steps (on) or stop on opponents end step (off)"); + cbStopOnAllEnd.setToolTipText(""); cbStopOnAllEnd.setActionCommand(""); cbStopOnAllEnd.setPreferredSize(new java.awt.Dimension(300, 25)); cbStopOnAllEnd.addActionListener(new java.awt.event.ActionListener() { @@ -1419,120 +1405,120 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout tabPhasesLayout = new org.jdesktop.layout.GroupLayout(tabPhases); tabPhases.setLayout(tabPhasesLayout); tabPhasesLayout.setHorizontalGroup( - tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .add(20, 20, 20) + tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabPhasesLayout.createSequentialGroup() .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabelUpkeep) - .add(jLabelBeforeCombat) - .add(jLabelEndofCombat) - .add(jLabelMain2) - .add(jLabelEndOfTurn)) - .add(77, 77, 77) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .add(2, 2, 2) - .add(jLabelYourTurn) - .add(32, 32, 32) - .add(jLabelOpponentsTurn)) - .add(tabPhasesLayout.createSequentialGroup() - .add(13, 13, 13) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(checkBoxDrawYou) - .add(checkBoxUpkeepYou) - .add(checkBoxMainYou) - .add(checkBoxBeforeCYou) - .add(checkBoxEndOfCYou) - .add(checkBoxMain2You) - .add(checkBoxEndTurnYou)) - .add(78, 78, 78) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(checkBoxUpkeepOthers) - .add(checkBoxBeforeCOthers) - .add(checkBoxMainOthers) - .add(checkBoxEndOfCOthers) - .add(checkBoxDrawOthers) - .add(checkBoxMain2Others) - .add(checkBoxEndTurnOthers))))) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, jLabelMain1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.LEADING, jLabelDraw, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) - .add(tabPhasesLayout.createSequentialGroup() - .addContainerGap() - .add(jLabelHeadLine))) - .add(0, 0, Short.MAX_VALUE)) - .add(tabPhasesLayout.createSequentialGroup() - .addContainerGap() - .add(phases_stopSettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addContainerGap()) + .add(tabPhasesLayout.createSequentialGroup() + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabPhasesLayout.createSequentialGroup() + .add(20, 20, 20) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabPhasesLayout.createSequentialGroup() + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jLabelUpkeep) + .add(jLabelBeforeCombat) + .add(jLabelEndofCombat) + .add(jLabelMain2) + .add(jLabelEndOfTurn)) + .add(77, 77, 77) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabPhasesLayout.createSequentialGroup() + .add(2, 2, 2) + .add(jLabelYourTurn) + .add(32, 32, 32) + .add(jLabelOpponentsTurn)) + .add(tabPhasesLayout.createSequentialGroup() + .add(13, 13, 13) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(checkBoxDrawYou) + .add(checkBoxUpkeepYou) + .add(checkBoxMainYou) + .add(checkBoxBeforeCYou) + .add(checkBoxEndOfCYou) + .add(checkBoxMain2You) + .add(checkBoxEndTurnYou)) + .add(78, 78, 78) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(checkBoxUpkeepOthers) + .add(checkBoxBeforeCOthers) + .add(checkBoxMainOthers) + .add(checkBoxEndOfCOthers) + .add(checkBoxDrawOthers) + .add(checkBoxMain2Others) + .add(checkBoxEndTurnOthers))))) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(org.jdesktop.layout.GroupLayout.LEADING, jLabelMain1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.LEADING, jLabelDraw, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .add(tabPhasesLayout.createSequentialGroup() + .addContainerGap() + .add(jLabelHeadLine))) + .add(0, 0, Short.MAX_VALUE)) + .add(tabPhasesLayout.createSequentialGroup() + .addContainerGap() + .add(phases_stopSettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addContainerGap()) ); tabPhasesLayout.setVerticalGroup( - tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .addContainerGap() - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(tabPhasesLayout.createSequentialGroup() - .add(jLabelOpponentsTurn) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(checkBoxUpkeepOthers)) - .add(tabPhasesLayout.createSequentialGroup() - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(tabPhasesLayout.createSequentialGroup() - .add(jLabelHeadLine) - .add(20, 20, 20)) - .add(jLabelYourTurn)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(checkBoxUpkeepYou) - .add(jLabelUpkeep)))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jLabelDraw) - .add(checkBoxDrawYou) - .add(checkBoxDrawOthers)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jLabelMain1) - .add(checkBoxMainYou) - .add(checkBoxMainOthers)) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabPhasesLayout.createSequentialGroup() - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabelBeforeCombat) - .add(org.jdesktop.layout.GroupLayout.TRAILING, checkBoxBeforeCYou))) - .add(tabPhasesLayout.createSequentialGroup() - .add(6, 6, 6) - .add(checkBoxBeforeCOthers))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jLabelEndofCombat) - .add(checkBoxEndOfCYou) - .add(checkBoxEndOfCOthers)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jLabelMain2) - .add(checkBoxMain2You) - .add(checkBoxMain2Others)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(checkBoxEndTurnYou) - .add(jLabelEndOfTurn) - .add(checkBoxEndTurnOthers)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(phases_stopSettings, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(170, Short.MAX_VALUE)) + tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabPhasesLayout.createSequentialGroup() + .addContainerGap() + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(tabPhasesLayout.createSequentialGroup() + .add(jLabelOpponentsTurn) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(checkBoxUpkeepOthers)) + .add(tabPhasesLayout.createSequentialGroup() + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(tabPhasesLayout.createSequentialGroup() + .add(jLabelHeadLine) + .add(20, 20, 20)) + .add(jLabelYourTurn)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(checkBoxUpkeepYou) + .add(jLabelUpkeep)))) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(jLabelDraw) + .add(checkBoxDrawYou) + .add(checkBoxDrawOthers)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(jLabelMain1) + .add(checkBoxMainYou) + .add(checkBoxMainOthers)) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabPhasesLayout.createSequentialGroup() + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabelBeforeCombat) + .add(org.jdesktop.layout.GroupLayout.TRAILING, checkBoxBeforeCYou))) + .add(tabPhasesLayout.createSequentialGroup() + .add(6, 6, 6) + .add(checkBoxBeforeCOthers))) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(jLabelEndofCombat) + .add(checkBoxEndOfCYou) + .add(checkBoxEndOfCOthers)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(jLabelMain2) + .add(checkBoxMain2You) + .add(checkBoxMain2Others)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabPhasesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(checkBoxEndTurnYou) + .add(jLabelEndOfTurn) + .add(checkBoxEndTurnOthers)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(phases_stopSettings, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(185, Short.MAX_VALUE)) ); tabsPanel.addTab("Phases & Priority", tabPhases); - panelCardImages.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card images:")); + panelCardImages.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card images")); cbUseDefaultImageFolder.setText("Use default location to save images"); cbUseDefaultImageFolder.addActionListener(new java.awt.event.ActionListener() { @@ -1565,7 +1551,7 @@ public class PreferencesDialog extends javax.swing.JDialog { }); cbPreferedImageLanguage.setMaximumRowCount(20); - cbPreferedImageLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + cbPreferedImageLanguage.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"})); labelPreferedImageLanguage.setText("Prefered image language:"); labelPreferedImageLanguage.setFocusable(false); @@ -1573,66 +1559,66 @@ public class PreferencesDialog extends javax.swing.JDialog { labelNumberOfDownloadThreads.setText("Number of download threads:"); cbNumberOfDownloadThreads.setMaximumRowCount(20); - cbNumberOfDownloadThreads.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); + cbNumberOfDownloadThreads.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"})); org.jdesktop.layout.GroupLayout panelCardImagesLayout = new org.jdesktop.layout.GroupLayout(panelCardImages); panelCardImages.setLayout(panelCardImagesLayout); panelCardImagesLayout.setHorizontalGroup( - panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelCardImagesLayout.createSequentialGroup() - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelCardImagesLayout.createSequentialGroup() - .addContainerGap() - .add(txtImageFolderPath) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(btnBrowseImageLocation)) - .add(panelCardImagesLayout.createSequentialGroup() - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(panelCardImagesLayout.createSequentialGroup() - .add(cbCheckForNewImages) - .add(147, 147, 147)) - .add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(panelCardImagesLayout.createSequentialGroup() - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createSequentialGroup() + panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelCardImagesLayout.createSequentialGroup() + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelCardImagesLayout.createSequentialGroup() .addContainerGap() - .add(labelPreferedImageLanguage)) - .add(org.jdesktop.layout.GroupLayout.LEADING, cbSaveToZipFiles)) - .add(20, 20, 20) - .add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(panelCardImagesLayout.createSequentialGroup() - .addContainerGap() - .add(labelNumberOfDownloadThreads) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) - .add(cbUseDefaultImageFolder)) - .add(0, 308, Short.MAX_VALUE))) - .addContainerGap()) + .add(txtImageFolderPath) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(btnBrowseImageLocation)) + .add(panelCardImagesLayout.createSequentialGroup() + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(panelCardImagesLayout.createSequentialGroup() + .add(cbCheckForNewImages) + .add(147, 147, 147)) + .add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(panelCardImagesLayout.createSequentialGroup() + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(org.jdesktop.layout.GroupLayout.LEADING, panelCardImagesLayout.createSequentialGroup() + .addContainerGap() + .add(labelPreferedImageLanguage)) + .add(org.jdesktop.layout.GroupLayout.LEADING, cbSaveToZipFiles)) + .add(20, 20, 20) + .add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(panelCardImagesLayout.createSequentialGroup() + .addContainerGap() + .add(labelNumberOfDownloadThreads) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) + .add(cbUseDefaultImageFolder)) + .add(0, 308, Short.MAX_VALUE))) + .addContainerGap()) ); panelCardImagesLayout.setVerticalGroup( - panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelCardImagesLayout.createSequentialGroup() - .add(cbUseDefaultImageFolder) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtImageFolderPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(btnBrowseImageLocation)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(cbCheckForNewImages) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbSaveToZipFiles) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelNumberOfDownloadThreads) - .add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(labelPreferedImageLanguage))) + panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelCardImagesLayout.createSequentialGroup() + .add(cbUseDefaultImageFolder) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtImageFolderPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(btnBrowseImageLocation)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(cbCheckForNewImages) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbSaveToZipFiles) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelNumberOfDownloadThreads) + .add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelCardImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(cbPreferedImageLanguage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(labelPreferedImageLanguage))) ); - panelBackgroundImages.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Background images setting:")); + panelBackgroundImages.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Background images")); cbUseDefaultBackground.setText("Use default image"); cbUseDefaultBackground.addActionListener(new java.awt.event.ActionListener() { @@ -1688,57 +1674,57 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout panelBackgroundImagesLayout = new org.jdesktop.layout.GroupLayout(panelBackgroundImages); panelBackgroundImages.setLayout(panelBackgroundImagesLayout); panelBackgroundImagesLayout.setHorizontalGroup( - panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelBackgroundImagesLayout.createSequentialGroup() - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelBackgroundImagesLayout.createSequentialGroup() - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelBackgroundImagesLayout.createSequentialGroup() - .add(19, 19, 19) - .add(jLabel14)) - .add(panelBackgroundImagesLayout.createSequentialGroup() - .add(25, 25, 25) - .add(jLabel15))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(txtBackgroundImagePath) - .add(txtBattlefieldImagePath)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, btnBrowseBackgroundImage) - .add(org.jdesktop.layout.GroupLayout.TRAILING, btnBrowseBattlefieldImage))) - .add(panelBackgroundImagesLayout.createSequentialGroup() - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(cbUseRandomBattleImage) - .add(cbUseDefaultBattleImage) - .add(cbUseDefaultBackground)) - .add(0, 0, Short.MAX_VALUE))) - .addContainerGap()) + panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelBackgroundImagesLayout.createSequentialGroup() + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelBackgroundImagesLayout.createSequentialGroup() + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelBackgroundImagesLayout.createSequentialGroup() + .add(19, 19, 19) + .add(jLabel14)) + .add(panelBackgroundImagesLayout.createSequentialGroup() + .add(25, 25, 25) + .add(jLabel15))) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(txtBackgroundImagePath) + .add(txtBattlefieldImagePath)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, btnBrowseBackgroundImage) + .add(org.jdesktop.layout.GroupLayout.TRAILING, btnBrowseBattlefieldImage))) + .add(panelBackgroundImagesLayout.createSequentialGroup() + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(cbUseRandomBattleImage) + .add(cbUseDefaultBattleImage) + .add(cbUseDefaultBackground)) + .add(0, 0, Short.MAX_VALUE))) + .addContainerGap()) ); panelBackgroundImagesLayout.setVerticalGroup( - panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelBackgroundImagesLayout.createSequentialGroup() - .addContainerGap() - .add(cbUseDefaultBackground) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtBackgroundImagePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(btnBrowseBackgroundImage) - .add(jLabel14)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(cbUseDefaultBattleImage) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(cbUseRandomBattleImage) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtBattlefieldImagePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(btnBrowseBattlefieldImage) - .add(jLabel15))) + panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelBackgroundImagesLayout.createSequentialGroup() + .addContainerGap() + .add(cbUseDefaultBackground) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtBackgroundImagePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(btnBrowseBackgroundImage) + .add(jLabel14)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(cbUseDefaultBattleImage) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(cbUseRandomBattleImage) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(panelBackgroundImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtBattlefieldImagePath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(btnBrowseBattlefieldImage) + .add(jLabel15))) ); - jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card rendering:")); + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Card styles (restart xmage to apply new settings)")); - cbCardRenderImageFallback.setText("Fall back to plain image based rendering"); + cbCardRenderImageFallback.setText("Render mode: MTGO style (off) or IMAGE style (on)"); cbCardRenderImageFallback.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbCardRenderImageFallbackActionPerformed(evt); @@ -1762,47 +1748,47 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createSequentialGroup() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(cbCardRenderImageFallback) - .add(cbCardRenderShowReminderText) - .add(cbCardRenderHideSetSymbol)) - .add(0, 0, Short.MAX_VALUE)) + jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jPanel1Layout.createSequentialGroup() + .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(cbCardRenderImageFallback) + .add(cbCardRenderShowReminderText) + .add(cbCardRenderHideSetSymbol)) + .add(0, 0, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createSequentialGroup() - .add(cbCardRenderImageFallback) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbCardRenderShowReminderText) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cbCardRenderHideSetSymbol) - .add(0, 0, Short.MAX_VALUE)) + jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jPanel1Layout.createSequentialGroup() + .add(cbCardRenderImageFallback) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbCardRenderShowReminderText) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(cbCardRenderHideSetSymbol) + .add(0, 0, Short.MAX_VALUE)) ); org.jdesktop.layout.GroupLayout tabImagesLayout = new org.jdesktop.layout.GroupLayout(tabImages); tabImages.setLayout(tabImagesLayout); tabImagesLayout.setHorizontalGroup( - tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabImagesLayout.createSequentialGroup() - .addContainerGap() - .add(tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(panelCardImages, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(panelBackgroundImages, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) + tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabImagesLayout.createSequentialGroup() + .addContainerGap() + .add(tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(panelCardImages, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(panelBackgroundImages, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); tabImagesLayout.setVerticalGroup( - tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabImagesLayout.createSequentialGroup() - .addContainerGap() - .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelCardImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(panelBackgroundImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(133, Short.MAX_VALUE)) + tabImagesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabImagesLayout.createSequentialGroup() + .addContainerGap() + .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelCardImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(panelBackgroundImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(133, Short.MAX_VALUE)) ); tabsPanel.addTab("Images", tabImages); @@ -1876,48 +1862,48 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout sounds_backgroundMusicLayout = new org.jdesktop.layout.GroupLayout(sounds_backgroundMusic); sounds_backgroundMusic.setLayout(sounds_backgroundMusicLayout); sounds_backgroundMusicLayout.setHorizontalGroup( - sounds_backgroundMusicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(sounds_backgroundMusicLayout.createSequentialGroup() - .addContainerGap() - .add(jLabel16) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(txtBattlefieldIBGMPath) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(btnBattlefieldBGMBrowse)) - .add(sounds_backgroundMusicLayout.createSequentialGroup() - .add(cbEnableBattlefieldBGM) - .add(0, 0, Short.MAX_VALUE)) + sounds_backgroundMusicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(sounds_backgroundMusicLayout.createSequentialGroup() + .addContainerGap() + .add(jLabel16) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(txtBattlefieldIBGMPath) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(btnBattlefieldBGMBrowse)) + .add(sounds_backgroundMusicLayout.createSequentialGroup() + .add(cbEnableBattlefieldBGM) + .add(0, 0, Short.MAX_VALUE)) ); sounds_backgroundMusicLayout.setVerticalGroup( - sounds_backgroundMusicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(sounds_backgroundMusicLayout.createSequentialGroup() - .add(cbEnableBattlefieldBGM) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(sounds_backgroundMusicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtBattlefieldIBGMPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(btnBattlefieldBGMBrowse) - .add(jLabel16))) + sounds_backgroundMusicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(sounds_backgroundMusicLayout.createSequentialGroup() + .add(cbEnableBattlefieldBGM) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(sounds_backgroundMusicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtBattlefieldIBGMPath, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(btnBattlefieldBGMBrowse) + .add(jLabel16))) ); org.jdesktop.layout.GroupLayout tabSoundsLayout = new org.jdesktop.layout.GroupLayout(tabSounds); tabSounds.setLayout(tabSoundsLayout); tabSoundsLayout.setHorizontalGroup( - tabSoundsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabSoundsLayout.createSequentialGroup() - .addContainerGap() - .add(tabSoundsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(sounds_clips, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.TRAILING, sounds_backgroundMusic, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) + tabSoundsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabSoundsLayout.createSequentialGroup() + .addContainerGap() + .add(tabSoundsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(sounds_clips, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.TRAILING, sounds_backgroundMusic, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); tabSoundsLayout.setVerticalGroup( - tabSoundsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabSoundsLayout.createSequentialGroup() - .addContainerGap() - .add(sounds_clips, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(sounds_backgroundMusic, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + tabSoundsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabSoundsLayout.createSequentialGroup() + .addContainerGap() + .add(sounds_clips, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(sounds_backgroundMusic, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); sounds_clips.getAccessibleContext().setAccessibleDescription(""); @@ -1941,12 +1927,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( - jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel10Layout.setVerticalGroup( - jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel10); @@ -1959,12 +1945,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup( - jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel11Layout.setVerticalGroup( - jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel11); @@ -1977,12 +1963,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel12Layout = new org.jdesktop.layout.GroupLayout(jPanel12); jPanel12.setLayout(jPanel12Layout); jPanel12Layout.setHorizontalGroup( - jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel12Layout.setVerticalGroup( - jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel12); @@ -1995,12 +1981,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel13Layout = new org.jdesktop.layout.GroupLayout(jPanel13); jPanel13.setLayout(jPanel13Layout); jPanel13Layout.setHorizontalGroup( - jPanel13Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel13Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel13Layout.setVerticalGroup( - jPanel13Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel13Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel13); @@ -2013,12 +1999,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel14Layout = new org.jdesktop.layout.GroupLayout(jPanel14); jPanel14.setLayout(jPanel14Layout); jPanel14Layout.setHorizontalGroup( - jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel14Layout.setVerticalGroup( - jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel14Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel14); @@ -2031,12 +2017,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel15Layout = new org.jdesktop.layout.GroupLayout(jPanel15); jPanel15.setLayout(jPanel15Layout); jPanel15Layout.setHorizontalGroup( - jPanel15Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel15Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel15Layout.setVerticalGroup( - jPanel15Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel15Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel15); @@ -2049,12 +2035,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel16Layout = new org.jdesktop.layout.GroupLayout(jPanel16); jPanel16.setLayout(jPanel16Layout); jPanel16Layout.setHorizontalGroup( - jPanel16Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel16Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel16Layout.setVerticalGroup( - jPanel16Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel16Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel16); @@ -2067,12 +2053,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel17Layout = new org.jdesktop.layout.GroupLayout(jPanel17); jPanel17.setLayout(jPanel17Layout); jPanel17Layout.setHorizontalGroup( - jPanel17Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel17Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel17Layout.setVerticalGroup( - jPanel17Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel17Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel17); @@ -2085,12 +2071,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel18Layout = new org.jdesktop.layout.GroupLayout(jPanel18); jPanel18.setLayout(jPanel18Layout); jPanel18Layout.setHorizontalGroup( - jPanel18Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel18Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel18Layout.setVerticalGroup( - jPanel18Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel18Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel18); @@ -2103,12 +2089,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel19Layout = new org.jdesktop.layout.GroupLayout(jPanel19); jPanel19.setLayout(jPanel19Layout); jPanel19Layout.setHorizontalGroup( - jPanel19Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel19Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel19Layout.setVerticalGroup( - jPanel19Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel19Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel19); @@ -2121,12 +2107,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel20Layout = new org.jdesktop.layout.GroupLayout(jPanel20); jPanel20.setLayout(jPanel20Layout); jPanel20Layout.setHorizontalGroup( - jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel20Layout.setVerticalGroup( - jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel20); @@ -2139,12 +2125,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel21Layout = new org.jdesktop.layout.GroupLayout(jPanel21); jPanel21.setLayout(jPanel21Layout); jPanel21Layout.setHorizontalGroup( - jPanel21Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel21Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel21Layout.setVerticalGroup( - jPanel21Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel21Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel21); @@ -2157,12 +2143,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel22Layout = new org.jdesktop.layout.GroupLayout(jPanel22); jPanel22.setLayout(jPanel22Layout); jPanel22Layout.setHorizontalGroup( - jPanel22Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel22Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel22Layout.setVerticalGroup( - jPanel22Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel22Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel22); @@ -2175,12 +2161,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel23Layout = new org.jdesktop.layout.GroupLayout(jPanel23); jPanel23.setLayout(jPanel23Layout); jPanel23Layout.setHorizontalGroup( - jPanel23Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel23Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel23Layout.setVerticalGroup( - jPanel23Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel23Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel23); @@ -2193,12 +2179,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel24Layout = new org.jdesktop.layout.GroupLayout(jPanel24); jPanel24.setLayout(jPanel24Layout); jPanel24Layout.setHorizontalGroup( - jPanel24Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel24Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel24Layout.setVerticalGroup( - jPanel24Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel24Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel24); @@ -2211,12 +2197,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel25Layout = new org.jdesktop.layout.GroupLayout(jPanel25); jPanel25.setLayout(jPanel25Layout); jPanel25Layout.setHorizontalGroup( - jPanel25Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel25Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel25Layout.setVerticalGroup( - jPanel25Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel25Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel25); @@ -2229,12 +2215,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel26Layout = new org.jdesktop.layout.GroupLayout(jPanel26); jPanel26.setLayout(jPanel26Layout); jPanel26Layout.setHorizontalGroup( - jPanel26Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel26Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel26Layout.setVerticalGroup( - jPanel26Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel26Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel26); @@ -2247,12 +2233,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel27Layout = new org.jdesktop.layout.GroupLayout(jPanel27); jPanel27.setLayout(jPanel27Layout); jPanel27Layout.setHorizontalGroup( - jPanel27Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel27Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel27Layout.setVerticalGroup( - jPanel27Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel27Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel27); @@ -2265,12 +2251,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel28Layout = new org.jdesktop.layout.GroupLayout(jPanel28); jPanel28.setLayout(jPanel28Layout); jPanel28Layout.setHorizontalGroup( - jPanel28Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel28Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel28Layout.setVerticalGroup( - jPanel28Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel28Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel28); @@ -2283,12 +2269,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel29Layout = new org.jdesktop.layout.GroupLayout(jPanel29); jPanel29.setLayout(jPanel29Layout); jPanel29Layout.setHorizontalGroup( - jPanel29Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel29Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel29Layout.setVerticalGroup( - jPanel29Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel29Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel29); @@ -2301,12 +2287,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel30Layout = new org.jdesktop.layout.GroupLayout(jPanel30); jPanel30.setLayout(jPanel30Layout); jPanel30Layout.setHorizontalGroup( - jPanel30Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel30Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel30Layout.setVerticalGroup( - jPanel30Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel30Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel30); @@ -2319,12 +2305,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel31Layout = new org.jdesktop.layout.GroupLayout(jPanel31); jPanel31.setLayout(jPanel31Layout); jPanel31Layout.setHorizontalGroup( - jPanel31Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel31Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel31Layout.setVerticalGroup( - jPanel31Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel31Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel31); @@ -2337,12 +2323,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel32Layout = new org.jdesktop.layout.GroupLayout(jPanel32); jPanel32.setLayout(jPanel32Layout); jPanel32Layout.setHorizontalGroup( - jPanel32Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel32Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel32Layout.setVerticalGroup( - jPanel32Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel32Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel32); @@ -2354,12 +2340,12 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout jPanel33Layout = new org.jdesktop.layout.GroupLayout(jPanel33); jPanel33.setLayout(jPanel33Layout); jPanel33Layout.setHorizontalGroup( - jPanel33Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel33Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); jPanel33Layout.setVerticalGroup( - jPanel33Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 0, Short.MAX_VALUE) + jPanel33Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(0, 0, Short.MAX_VALUE) ); avatarPanel.add(jPanel33); @@ -2369,16 +2355,16 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout tabAvatarsLayout = new org.jdesktop.layout.GroupLayout(tabAvatars); tabAvatars.setLayout(tabAvatarsLayout); tabAvatarsLayout.setHorizontalGroup( - tabAvatarsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabAvatarsLayout.createSequentialGroup() - .add(avatarPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 528, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(0, 0, Short.MAX_VALUE)) + tabAvatarsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabAvatarsLayout.createSequentialGroup() + .add(avatarPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 528, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(0, 0, Short.MAX_VALUE)) ); tabAvatarsLayout.setVerticalGroup( - tabAvatarsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabAvatarsLayout.createSequentialGroup() - .add(avatarPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 620, Short.MAX_VALUE) - .addContainerGap()) + tabAvatarsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabAvatarsLayout.createSequentialGroup() + .add(avatarPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 620, Short.MAX_VALUE) + .addContainerGap()) ); tabsPanel.addTab("Avatars", tabAvatars); @@ -2401,27 +2387,27 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout connection_serversLayout = new org.jdesktop.layout.GroupLayout(connection_servers); connection_servers.setLayout(connection_serversLayout); connection_serversLayout.setHorizontalGroup( - connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(connection_serversLayout.createSequentialGroup() - .add(connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(connection_serversLayout.createSequentialGroup() - .addContainerGap() - .add(lblURLServerList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 96, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(txtURLServerList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 370, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(connection_serversLayout.createSequentialGroup() - .add(141, 141, 141) - .add(jLabel17))) - .addContainerGap(201, Short.MAX_VALUE)) + connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(connection_serversLayout.createSequentialGroup() + .add(connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(connection_serversLayout.createSequentialGroup() + .addContainerGap() + .add(lblURLServerList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 96, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(txtURLServerList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 370, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(connection_serversLayout.createSequentialGroup() + .add(141, 141, 141) + .add(jLabel17))) + .addContainerGap(201, Short.MAX_VALUE)) ); connection_serversLayout.setVerticalGroup( - connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(connection_serversLayout.createSequentialGroup() - .add(connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) - .add(lblURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(txtURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jLabel17)) + connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(connection_serversLayout.createSequentialGroup() + .add(connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) + .add(lblURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(txtURLServerList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jLabel17)) ); lblProxyType.setText("Proxy:"); @@ -2467,99 +2453,99 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout pnlProxyLayout = new org.jdesktop.layout.GroupLayout(pnlProxy); pnlProxy.setLayout(pnlProxyLayout); pnlProxyLayout.setHorizontalGroup( - pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(pnlProxyLayout.createSequentialGroup() - .addContainerGap() - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(pnlProxyLayout.createSequentialGroup() - .add(rememberPswd) - .add(47, 47, 47) - .add(jLabel11) - .add(34, 34, 34)) - .add(pnlProxyLayout.createSequentialGroup() - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(lblProxyPort) - .add(lblProxyPassword) - .add(lblProxyServer) - .add(lblProxyUserName)) - .add(19, 19, 19) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(txtProxyPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 58, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, txtPasswordField) - .add(org.jdesktop.layout.GroupLayout.LEADING, txtProxyUserName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 148, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(txtProxyServer)) - .addContainerGap()))) + pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(pnlProxyLayout.createSequentialGroup() + .addContainerGap() + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(pnlProxyLayout.createSequentialGroup() + .add(rememberPswd) + .add(47, 47, 47) + .add(jLabel11) + .add(34, 34, 34)) + .add(pnlProxyLayout.createSequentialGroup() + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(lblProxyPort) + .add(lblProxyPassword) + .add(lblProxyServer) + .add(lblProxyUserName)) + .add(19, 19, 19) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(txtProxyPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 58, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(org.jdesktop.layout.GroupLayout.LEADING, txtPasswordField) + .add(org.jdesktop.layout.GroupLayout.LEADING, txtProxyUserName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 148, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(txtProxyServer)) + .addContainerGap()))) ); pnlProxyLayout.setVerticalGroup( - pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(pnlProxyLayout.createSequentialGroup() - .add(6, 6, 6) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtProxyServer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(lblProxyServer)) - .add(8, 8, 8) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(lblProxyPort) - .add(txtProxyPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtProxyUserName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(lblProxyUserName)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(txtPasswordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(lblProxyPassword)) - .add(18, 18, 18) - .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(rememberPswd) - .add(jLabel11)) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(pnlProxyLayout.createSequentialGroup() + .add(6, 6, 6) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtProxyServer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(lblProxyServer)) + .add(8, 8, 8) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(lblProxyPort) + .add(txtProxyPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtProxyUserName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(lblProxyUserName)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(txtPasswordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(lblProxyPassword)) + .add(18, 18, 18) + .add(pnlProxyLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(rememberPswd) + .add(jLabel11)) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); org.jdesktop.layout.GroupLayout pnlProxySettingsLayout = new org.jdesktop.layout.GroupLayout(pnlProxySettings); pnlProxySettings.setLayout(pnlProxySettingsLayout); pnlProxySettingsLayout.setHorizontalGroup( - pnlProxySettingsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(pnlProxySettingsLayout.createSequentialGroup() - .addContainerGap() - .add(pnlProxy, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addContainerGap()) + pnlProxySettingsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(pnlProxySettingsLayout.createSequentialGroup() + .addContainerGap() + .add(pnlProxy, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) ); pnlProxySettingsLayout.setVerticalGroup( - pnlProxySettingsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(pnlProxySettingsLayout.createSequentialGroup() - .add(pnlProxy, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addContainerGap()) + pnlProxySettingsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(pnlProxySettingsLayout.createSequentialGroup() + .add(pnlProxy, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) ); org.jdesktop.layout.GroupLayout tabConnectionLayout = new org.jdesktop.layout.GroupLayout(tabConnection); tabConnection.setLayout(tabConnectionLayout); tabConnectionLayout.setHorizontalGroup( - tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, tabConnectionLayout.createSequentialGroup() - .addContainerGap() - .add(tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(pnlProxySettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.LEADING, tabConnectionLayout.createSequentialGroup() - .add(lblProxyType) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(cbProxyType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(connection_servers, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) + tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, tabConnectionLayout.createSequentialGroup() + .addContainerGap() + .add(tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(pnlProxySettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.LEADING, tabConnectionLayout.createSequentialGroup() + .add(lblProxyType) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(cbProxyType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(connection_servers, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); tabConnectionLayout.setVerticalGroup( - tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabConnectionLayout.createSequentialGroup() - .addContainerGap() - .add(connection_servers, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(lblProxyType) - .add(cbProxyType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(18, 18, 18) - .add(pnlProxySettings, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabConnectionLayout.createSequentialGroup() + .addContainerGap() + .add(connection_servers, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(tabConnectionLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(lblProxyType) + .add(cbProxyType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(18, 18, 18) + .add(pnlProxySettings, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pnlProxySettings.getAccessibleContext().setAccessibleDescription(""); @@ -2612,102 +2598,102 @@ public class PreferencesDialog extends javax.swing.JDialog { } }); - labelToggleRecordMacro.setText("Toggle Record Macro"); + labelToggleRecordMacro.setText("Record Macro (unsupported)"); keyToggleRecordMacro.setText("keyBindButton1"); org.jdesktop.layout.GroupLayout tabControlsLayout = new org.jdesktop.layout.GroupLayout(tabControls); tabControls.setLayout(tabControlsLayout); tabControlsLayout.setHorizontalGroup( - tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabControlsLayout.createSequentialGroup() - .addContainerGap() - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabControlsLayout.createSequentialGroup() - .add(bttnResetControls) - .add(0, 0, Short.MAX_VALUE)) - .add(tabControlsLayout.createSequentialGroup() - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(labelCancel) - .add(labelNextTurn) - .add(labelEndStep) - .add(labelMainStep) - .add(labelYourTurn) - .add(lebelSkip) - .add(labelPriorEnd) - .add(labelSkipStep) - .add(labelConfirm) - .add(labelToggleRecordMacro)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(keyConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyCancelSkip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyNextTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keySkipStack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyYourTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyMainStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keySkipStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyEndStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(keyToggleRecordMacro, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(controlsDescriptionLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE))) - .addContainerGap()) + tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabControlsLayout.createSequentialGroup() + .addContainerGap() + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabControlsLayout.createSequentialGroup() + .add(bttnResetControls) + .add(0, 0, Short.MAX_VALUE)) + .add(tabControlsLayout.createSequentialGroup() + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(labelCancel) + .add(labelNextTurn) + .add(labelEndStep) + .add(labelMainStep) + .add(labelYourTurn) + .add(lebelSkip) + .add(labelPriorEnd) + .add(labelSkipStep) + .add(labelConfirm) + .add(labelToggleRecordMacro)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(keyConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyCancelSkip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyNextTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keySkipStack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyYourTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyMainStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keySkipStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyEndStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(keyToggleRecordMacro, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(controlsDescriptionLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE))) + .addContainerGap()) ); tabControlsLayout.setVerticalGroup( - tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(tabControlsLayout.createSequentialGroup() - .addContainerGap() - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, controlsDescriptionLabel) - .add(org.jdesktop.layout.GroupLayout.LEADING, tabControlsLayout.createSequentialGroup() - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelConfirm) - .add(keyConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelCancel) - .add(keyCancelSkip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelNextTurn) - .add(keyNextTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelEndStep) - .add(keyEndStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelSkipStep) - .add(keySkipStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelMainStep) - .add(keyMainStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelYourTurn) - .add(keyYourTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(lebelSkip) - .add(keySkipStack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelPriorEnd) - .add(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(labelToggleRecordMacro) - .add(keyToggleRecordMacro, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) - .add(bttnResetControls) - .addContainerGap()) + tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(tabControlsLayout.createSequentialGroup() + .addContainerGap() + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) + .add(org.jdesktop.layout.GroupLayout.LEADING, controlsDescriptionLabel) + .add(org.jdesktop.layout.GroupLayout.LEADING, tabControlsLayout.createSequentialGroup() + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelConfirm) + .add(keyConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelCancel) + .add(keyCancelSkip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelNextTurn) + .add(keyNextTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelEndStep) + .add(keyEndStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelSkipStep) + .add(keySkipStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelMainStep) + .add(keyMainStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelYourTurn) + .add(keyYourTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(lebelSkip) + .add(keySkipStack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelPriorEnd) + .add(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(labelToggleRecordMacro) + .add(keyToggleRecordMacro, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) + .add(bttnResetControls) + .addContainerGap()) ); tabsPanel.addTab("Controls", tabControls); - saveButton.setLabel("Save"); + saveButton.setText("Save"); saveButton.setMaximumSize(new java.awt.Dimension(100, 30)); saveButton.setMinimumSize(new java.awt.Dimension(100, 30)); saveButton.setPreferredSize(new java.awt.Dimension(100, 30)); @@ -2718,7 +2704,7 @@ public class PreferencesDialog extends javax.swing.JDialog { } }); - exitButton.setLabel("Exit"); + exitButton.setText("Exit"); exitButton.setMaximumSize(new java.awt.Dimension(100, 30)); exitButton.setMinimumSize(new java.awt.Dimension(100, 30)); exitButton.setPreferredSize(new java.awt.Dimension(100, 30)); @@ -2732,27 +2718,27 @@ public class PreferencesDialog extends javax.swing.JDialog { org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() - .addContainerGap() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(org.jdesktop.layout.GroupLayout.LEADING, tabsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(layout.createSequentialGroup() - .add(0, 0, Short.MAX_VALUE) - .add(saveButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(exitButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .add(6, 6, 6)) + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(org.jdesktop.layout.GroupLayout.LEADING, tabsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(layout.createSequentialGroup() + .add(0, 0, Short.MAX_VALUE) + .add(saveButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(exitButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) + .add(6, 6, 6)) ); layout.setVerticalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .add(tabsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(saveButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(exitButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .add(tabsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(saveButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(exitButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) ); pack(); @@ -2867,6 +2853,7 @@ public class PreferencesDialog extends javax.swing.JDialog { save(prefs, dialog.cbStopBlock, KEY_STOP_BLOCK, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbStopOnAllMain, KEY_STOP_ALL_MAIN_PHASES, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbStopOnAllEnd, KEY_STOP_ALL_END_PHASES, "true", "false", UPDATE_CACHE_POLICY); + save(prefs, dialog.cbStopOnNewStackObjects, KEY_STOP_NEW_STACK_OBJECTS, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbPassPriorityCast, KEY_PASS_PRIORITY_CAST, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbPassPriorityActivation, KEY_PASS_PRIORITY_ACTIVATION, "true", "false", UPDATE_CACHE_POLICY); save(prefs, dialog.cbAutoOrderTrigger, KEY_AUTO_ORDER_TRIGGER, "true", "false", UPDATE_CACHE_POLICY); @@ -2929,7 +2916,6 @@ public class PreferencesDialog extends javax.swing.JDialog { try { SessionHandler.updatePreferencesForServer(getUserData()); - prefs.flush(); } catch (BackingStoreException ex) { logger.error("Error: couldn't save preferences", ex); @@ -3235,6 +3221,10 @@ public class PreferencesDialog extends javax.swing.JDialog { // TODO add your handling code here: }//GEN-LAST:event_displayLifeOnAvatarActionPerformed + private void cbStopOnNewStackObjectsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbStopOnNewStackObjectsActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_cbStopOnNewStackObjectsActionPerformed + private void showProxySettings() { Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem(); switch (proxyType) { @@ -3285,7 +3275,7 @@ public class PreferencesDialog extends javax.swing.JDialog { /** * @param args the command line arguments */ - public static void main(String args[]) { + public static void main(String[] args) { int param = 0; if (args.length > 0) { String param1 = args[0]; @@ -3382,6 +3372,7 @@ public class PreferencesDialog extends javax.swing.JDialog { load(prefs, dialog.cbStopBlock, KEY_STOP_BLOCK, "true", "true"); load(prefs, dialog.cbStopOnAllMain, KEY_STOP_ALL_MAIN_PHASES, "true", "false"); load(prefs, dialog.cbStopOnAllEnd, KEY_STOP_ALL_END_PHASES, "true", "false"); + load(prefs, dialog.cbStopOnNewStackObjects, KEY_STOP_NEW_STACK_OBJECTS, "true", "false"); load(prefs, dialog.cbPassPriorityCast, KEY_PASS_PRIORITY_CAST, "true", "false"); load(prefs, dialog.cbPassPriorityActivation, KEY_PASS_PRIORITY_ACTIVATION, "true", "false"); load(prefs, dialog.cbAutoOrderTrigger, KEY_AUTO_ORDER_TRIGGER, "true", "true"); @@ -3422,7 +3413,7 @@ public class PreferencesDialog extends javax.swing.JDialog { dialog.cbPreferedImageLanguage.setSelectedItem(MageFrame.getPreferences().get(KEY_CARD_IMAGES_PREF_LANGUAGE, CardLanguage.ENGLISH.getCode())); // rendering settings - load(prefs, dialog.cbCardRenderImageFallback, KEY_CARD_RENDERING_FALLBACK, "true"); + load(prefs, dialog.cbCardRenderImageFallback, KEY_CARD_RENDERING_FALLBACK, "true", "false"); load(prefs, dialog.cbCardRenderHideSetSymbol, KEY_CARD_RENDERING_SET_SYMBOL, "true"); load(prefs, dialog.cbCardRenderShowReminderText, KEY_CARD_RENDERING_REMINDER_TEXT, "true"); @@ -3549,6 +3540,7 @@ public class PreferencesDialog extends javax.swing.JDialog { userSkipPrioritySteps.setStopOnDeclareBlockerIfNoneAvailable(dialog.cbStopBlock.isSelected()); userSkipPrioritySteps.setStopOnAllEndPhases(dialog.cbStopOnAllEnd.isSelected()); userSkipPrioritySteps.setStopOnAllMainPhases(dialog.cbStopOnAllMain.isSelected()); + userSkipPrioritySteps.setStopOnStackNewObjects(dialog.cbStopOnNewStackObjects.isSelected()); return userSkipPrioritySteps; } @@ -3804,7 +3796,7 @@ public class PreferencesDialog extends javax.swing.JDialog { } private void addAvatar(JPanel jPanel, final int id, boolean selected, boolean locked) { - String path = "/avatars/" + String.valueOf(id) + ".jpg"; + String path = "/avatars/" + id + ".jpg"; PANELS.put(id, jPanel); Image image = ImageHelper.getImageFromResources(path); @@ -3918,6 +3910,7 @@ public class PreferencesDialog extends javax.swing.JDialog { private javax.swing.JCheckBox cbStopBlock; private javax.swing.JCheckBox cbStopOnAllEnd; private javax.swing.JCheckBox cbStopOnAllMain; + private javax.swing.JCheckBox cbStopOnNewStackObjects; private javax.swing.JCheckBox cbUseDefaultBackground; private javax.swing.JCheckBox cbUseDefaultBattleImage; private javax.swing.JCheckBox cbUseDefaultImageFolder; diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index cfed615092..fb19b6707d 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -86,6 +86,7 @@ public final class GamePanel extends javax.swing.JPanel { private String chosenHandKey = "You"; private boolean smallMode = false; private boolean initialized = false; + private skipButtonsList skipButtons = new skipButtonsList(); private boolean menuNameSet = false; private boolean handCardsOfOpponentAvailable = false; @@ -102,7 +103,6 @@ public final class GamePanel extends javax.swing.JPanel { private Timer resizeTimer; private enum PopUpMenuType { - TRIGGER_ORDER } @@ -707,8 +707,7 @@ public final class GamePanel extends javax.swing.JPanel { } players.get(player.getPlayerId()).update(player); if (player.getPlayerId().equals(playerId)) { - updateSkipButtons(player.isPassedTurn(), player.isPassedUntilEndOfTurn(), player.isPassedUntilNextMain(), player.isPassedAllTurns(), player.isPassedUntilStackResolved(), - player.isPassedUntilEndStepBeforeMyTurn()); + skipButtons.updateFromPlayer(player); } // update open or remove closed graveyard windows graveyards.put(player.getName(), player.getGraveyard()); @@ -737,6 +736,8 @@ public final class GamePanel extends javax.swing.JPanel { // can happen at the game start before player list is initiated } } + updateSkipButtons(); + if (!menuNameSet) { StringBuilder sb = new StringBuilder(); if (playerId == null) { @@ -820,41 +821,169 @@ public final class GamePanel extends javax.swing.JPanel { this.repaint(); } + // skip buttons border private static final int BORDER_SIZE = 2; + private static final Border BORDER_ACTIVE = new LineBorder(Color.orange, BORDER_SIZE); + private static final Border BORDER_NON_ACTIVE = new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE); - private void updateSkipButtons(boolean turn, boolean endOfTurn, boolean nextMain, boolean allTurns, boolean stack, boolean endStepBeforeYourStep) { - if (turn) { //F4 - btnSkipToNextTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); - } else { - btnSkipToNextTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); - } - if (endOfTurn) { // F5 - btnSkipToEndTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); - } else { - btnSkipToEndTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); - } - if (nextMain) { // F7 - btnSkipToNextMain.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); - } else { - btnSkipToNextMain.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); - } - if (stack) { // F8 - btnSkipStack.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); - } else { - btnSkipStack.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); - } - if (allTurns) { // F9 - btnSkipToYourTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); - } else { - btnSkipToYourTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); + // skip buttons info + private class skipButton { + + private final String text; + private final String extraFalse; + private final String extraTrue; + private final String hotkeyName; + private boolean extraMode = false; // extra option enabled from preferences + private boolean pressState = false; // activated by user or not + + skipButton(String text, String extraFalse, String extraTrue, String hotkeyName) { + this.text = text; + this.extraFalse = extraFalse; + this.extraTrue = extraTrue; + this.hotkeyName = hotkeyName; } - if (endStepBeforeYourStep) { // F11 - btnSkipToEndStepBeforeYourTurn.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); - } else { - btnSkipToEndStepBeforeYourTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); + public void setExtraMode(boolean enable) { + this.extraMode = enable; } + public void setPressState(boolean enable) { + this.pressState = enable; + } + + public String getTooltip() { + // show hotkey and selects current button mode + + // text + String res = "" + + "" + getCachedKeyText(this.hotkeyName) + "" + + " - " + text; + + // mode + String mesTrue = this.extraTrue; + String mesFalse = this.extraFalse; + if (!this.extraTrue.isEmpty() || !this.extraFalse.isEmpty()) { + if (this.extraMode) { + mesTrue = "" + mesTrue + ""; + } else { + mesFalse = "" + mesFalse + ""; + } + res = res.replace("EXTRA_FALSE", mesFalse); + res = res.replace("EXTRA_TRUE", mesTrue); + res = res + " - adjust using preferences"; + } + return res; + } + + public Border getBorder() { + return this.pressState ? BORDER_ACTIVE : BORDER_NON_ACTIVE; + } + + } + + private class skipButtonsList { + + private final skipButton turn; + private final skipButton untilEndOfTurn; + private final skipButton untilNextMain; + private final skipButton allTurns; + private final skipButton untilStackResolved; + private final skipButton untilUntilEndStepBeforeMyTurn; + + skipButtonsList() { + this.turn = new skipButton("Skip to next turn", "", "", KEY_CONTROL_NEXT_TURN); + this.untilEndOfTurn = new skipButton("Skip to [EXTRA_TRUE / EXTRA_FALSE] END OF TURN step", "opponent", "next", KEY_CONTROL_END_STEP); + this.untilNextMain = new skipButton("Skip to [EXTRA_TRUE / EXTRA_FALSE] MAIN step", "opponent", "next", KEY_CONTROL_MAIN_STEP); + this.allTurns = new skipButton("Skip to YOUR turn", "", "", KEY_CONTROL_YOUR_TURN); + this.untilStackResolved = new skipButton("Skip until stack is resolved [EXTRA_TRUE]", "", "or stop on new objects added", KEY_CONTROL_SKIP_STACK); + this.untilUntilEndStepBeforeMyTurn = new skipButton("Skip to END OF TURN before YOUR", "", "", KEY_CONTROL_PRIOR_END); + } + + private void updateExtraMode(PlayerView player) { + this.turn.setExtraMode(false); // not used + this.untilEndOfTurn.setExtraMode(player.getUserData().getUserSkipPrioritySteps().isStopOnAllEndPhases()); + this.untilNextMain.setExtraMode(player.getUserData().getUserSkipPrioritySteps().isStopOnAllMainPhases()); + this.allTurns.setExtraMode(false); // not used + this.untilStackResolved.setExtraMode(player.getUserData().getUserSkipPrioritySteps().isStopOnStackNewObjects()); + this.untilUntilEndStepBeforeMyTurn.setExtraMode(false); // not used + } + + private void updatePressState(PlayerView player) { + this.turn.setPressState(player.isPassedTurn()); + this.untilEndOfTurn.setPressState(player.isPassedUntilEndOfTurn()); + this.untilNextMain.setPressState(player.isPassedUntilNextMain()); + this.allTurns.setPressState(player.isPassedAllTurns()); + this.untilStackResolved.setPressState(player.isPassedUntilStackResolved()); + this.untilUntilEndStepBeforeMyTurn.setPressState(player.isPassedUntilEndStepBeforeMyTurn()); + } + + public void updateFromPlayer(PlayerView player) { + updateExtraMode(player); + updatePressState(player); + } + + private skipButton findButton(String hotkey) { + switch (hotkey) { + case KEY_CONTROL_NEXT_TURN: + return this.turn; + case KEY_CONTROL_END_STEP: + return this.untilEndOfTurn; + case KEY_CONTROL_MAIN_STEP: + return this.untilNextMain; + case KEY_CONTROL_YOUR_TURN: + return this.allTurns; + case KEY_CONTROL_SKIP_STACK: + return this.untilStackResolved; + case KEY_CONTROL_PRIOR_END: + return this.untilUntilEndStepBeforeMyTurn; + default: + logger.error("Unknown hotkey name " + hotkey); + return null; + } + } + + public String getTooltip(String hotkey) { + skipButton butt = findButton(hotkey); + return butt != null ? butt.getTooltip() : ""; + } + + public Border getBorder(String hotkey) { + skipButton butt = findButton(hotkey); + return butt != null ? butt.getBorder() : BORDER_NON_ACTIVE; + } + + public void activateSkipButton(String hotkey) { + // enable ONE button and disable all other (no needs to wait server feedback) + this.turn.setPressState(false); + this.untilEndOfTurn.setPressState(false); + this.untilNextMain.setPressState(false); + this.allTurns.setPressState(false); + this.untilStackResolved.setPressState(false); + this.untilUntilEndStepBeforeMyTurn.setPressState(false); + + if (!hotkey.isEmpty()) { + skipButton butt = findButton(hotkey); + if (butt != null) butt.setPressState(true); + } + } + } + + private void updateSkipButtons() { + // hints + btnSkipToNextTurn.setToolTipText(skipButtons.turn.getTooltip()); + btnSkipToEndTurn.setToolTipText(skipButtons.untilEndOfTurn.getTooltip()); + btnSkipToNextMain.setToolTipText(skipButtons.untilNextMain.getTooltip()); + btnSkipStack.setToolTipText(skipButtons.untilStackResolved.getTooltip()); + btnSkipToYourTurn.setToolTipText(skipButtons.allTurns.getTooltip()); + btnSkipToEndStepBeforeYourTurn.setToolTipText(skipButtons.untilUntilEndStepBeforeMyTurn.getTooltip()); + + // border + btnSkipToNextTurn.setBorder(skipButtons.turn.getBorder()); + btnSkipToEndTurn.setBorder(skipButtons.untilEndOfTurn.getBorder()); + btnSkipToNextMain.setBorder(skipButtons.untilNextMain.getBorder()); + btnSkipStack.setBorder(skipButtons.untilStackResolved.getBorder()); + btnSkipToYourTurn.setBorder(skipButtons.allTurns.getBorder()); + btnSkipToEndStepBeforeYourTurn.setBorder(skipButtons.untilUntilEndStepBeforeMyTurn.getBorder()); } /** @@ -1485,11 +1614,12 @@ public final class GamePanel extends javax.swing.JPanel { } }); + // SKIP BUTTONS (button's hint/state is dynamic) + btnCancelSkip.setContentAreaFilled(false); btnCancelSkip.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnCancelSkip.setIcon(new ImageIcon(ImageManagerImpl.instance.getCancelSkipButtonImage())); - btnCancelSkip.setToolTipText("Cancel all skip actions (" - + getCachedKeyText(KEY_CONTROL_CANCEL_SKIP) + ")."); + btnCancelSkip.setToolTipText("CANCEL all skips"); btnCancelSkip.setFocusable(false); btnCancelSkip.addMouseListener(new FirstButtonMousePressedAction(e -> restorePriorityActionPerformed(null))); @@ -1497,8 +1627,7 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipToNextTurn.setContentAreaFilled(false); btnSkipToNextTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnSkipToNextTurn.setIcon(new ImageIcon(ImageManagerImpl.instance.getSkipNextTurnButtonImage())); - btnSkipToNextTurn.setToolTipText("Skip to next turn (" - + getCachedKeyText(KEY_CONTROL_NEXT_TURN) + ")."); + btnSkipToNextTurn.setToolTipText("dynamic"); btnSkipToNextTurn.setFocusable(false); btnSkipToNextTurn.addMouseListener(new FirstButtonMousePressedAction(e -> btnEndTurnActionPerformed(null))); @@ -1515,8 +1644,7 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipToEndTurn.setContentAreaFilled(false); btnSkipToEndTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnSkipToEndTurn.setIcon(new ImageIcon(ImageManagerImpl.instance.getSkipEndTurnButtonImage())); - btnSkipToEndTurn.setToolTipText("Skip to (opponents/next) end of turn step (" - + getCachedKeyText(KEY_CONTROL_END_STEP) + ") - adjust using preferences."); + btnSkipToEndTurn.setToolTipText("dynamic"); btnSkipToEndTurn.setFocusable(false); btnSkipToEndTurn.addMouseListener(new FirstButtonMousePressedAction(e -> btnUntilEndOfTurnActionPerformed(null))); @@ -1542,8 +1670,7 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipToNextMain.setContentAreaFilled(false); btnSkipToNextMain.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnSkipToNextMain.setIcon(new ImageIcon(ImageManagerImpl.instance.getSkipMainButtonImage())); - btnSkipToNextMain.setToolTipText("Skip to (your) next main phase (" - + getCachedKeyText(KEY_CONTROL_MAIN_STEP) + ") - adjust using preferences."); + btnSkipToNextMain.setToolTipText("dynamic"); btnSkipToNextMain.setFocusable(false); btnSkipToNextMain.addMouseListener(new FirstButtonMousePressedAction(e -> btnUntilNextMainPhaseActionPerformed(null))); @@ -1560,8 +1687,7 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipToYourTurn.setContentAreaFilled(false); btnSkipToYourTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnSkipToYourTurn.setIcon(new ImageIcon(ImageManagerImpl.instance.getSkipYourNextTurnButtonImage())); - btnSkipToYourTurn.setToolTipText("Skip to your next turn (" - + getCachedKeyText(KEY_CONTROL_YOUR_TURN) + ")."); + btnSkipToYourTurn.setToolTipText("dynamic"); btnSkipToYourTurn.setFocusable(false); btnSkipToYourTurn.addMouseListener(new FirstButtonMousePressedAction(e -> btnPassPriorityUntilNextYourTurnActionPerformed(null))); @@ -1578,8 +1704,7 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipToEndStepBeforeYourTurn.setContentAreaFilled(false); btnSkipToEndStepBeforeYourTurn.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnSkipToEndStepBeforeYourTurn.setIcon(new ImageIcon(ImageManagerImpl.instance.getSkipEndStepBeforeYourTurnButtonImage())); - btnSkipToEndStepBeforeYourTurn.setToolTipText("Skip to the end step before your turn (" - + getCachedKeyText(KEY_CONTROL_PRIOR_END) + ") - adjust using preferences."); + btnSkipToEndStepBeforeYourTurn.setToolTipText("dynamic"); btnSkipToEndStepBeforeYourTurn.setFocusable(false); btnSkipToEndStepBeforeYourTurn.addMouseListener(new FirstButtonMousePressedAction(e -> btnSkipToEndStepBeforeYourTurnActionPerformed(null))); @@ -1596,8 +1721,7 @@ public final class GamePanel extends javax.swing.JPanel { btnSkipStack.setContentAreaFilled(false); btnSkipStack.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnSkipStack.setIcon(new ImageIcon(ImageManagerImpl.instance.getSkipStackButtonImage())); - btnSkipStack.setToolTipText("Skip until stack is resolved (" - + getCachedKeyText(KEY_CONTROL_SKIP_STACK) + ")."); + btnSkipStack.setToolTipText("dynamic"); btnSkipStack.setFocusable(false); btnSkipStack.addMouseListener(new FirstButtonMousePressedAction(e -> btnPassPriorityUntilStackResolvedActionPerformed(null))); @@ -1614,11 +1738,16 @@ public final class GamePanel extends javax.swing.JPanel { btnConcede.setContentAreaFilled(false); btnConcede.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); btnConcede.setIcon(new ImageIcon(ImageManagerImpl.instance.getConcedeButtonImage())); - btnConcede.setToolTipText("Concede the current game."); + btnConcede.setToolTipText("CONCEDE current game"); btnConcede.setFocusable(false); btnConcede.addMouseListener(new FirstButtonMousePressedAction(e -> btnConcedeActionPerformed(null))); + // update button hint/states to default values + updateSkipButtons(); + + // HOTKEYS + KeyStroke ks2 = getCachedKeystroke(KEY_CONTROL_CONFIRM); this.getInputMap(c).put(ks2, "F2_PRESS"); this.getActionMap().put("F2_PRESS", new AbstractAction() { @@ -2057,66 +2186,85 @@ public final class GamePanel extends javax.swing.JPanel { private void btnToggleMacroActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.TOGGLE_RECORD_MACRO, gameId, null); + skipButtons.activateSkipButton(""); + AudioManager.playOnSkipButton(); - updateSkipButtons(false, false, false, false, false, false); - if (btnToggleMacro.getBorder() instanceof EmptyBorder) { - btnToggleMacro.setBorder(new LineBorder(Color.orange, BORDER_SIZE)); + if (btnToggleMacro.getBorder().equals(BORDER_ACTIVE)) { + btnToggleMacro.setBorder(BORDER_NON_ACTIVE); } else { - btnToggleMacro.setBorder(new EmptyBorder(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, BORDER_SIZE)); + btnToggleMacro.setBorder(BORDER_ACTIVE); } } private void btnEndTurnActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_NEXT_TURN, gameId, null); + skipButtons.activateSkipButton(KEY_CONTROL_NEXT_TURN); + AudioManager.playOnSkipButton(); - updateSkipButtons(true, false, false, false, false, false); + updateSkipButtons(); } private void btnUntilEndOfTurnActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_TURN_END_STEP, gameId, null); + skipButtons.activateSkipButton(KEY_CONTROL_END_STEP); + AudioManager.playOnSkipButton(); - updateSkipButtons(false, true, false, false, false, false); + updateSkipButtons(); } private void btnEndTurnSkipStackActionPerformed(java.awt.event.ActionEvent evt) { + logger.error("Skip action don't used", new Throwable()); + /* SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_NEXT_TURN_SKIP_STACK, gameId, null); AudioManager.playOnSkipButton(); updateSkipButtons(true, false, false, false, true, false); + */ } private void btnUntilNextMainPhaseActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_NEXT_MAIN_PHASE, gameId, null); + skipButtons.activateSkipButton(KEY_CONTROL_MAIN_STEP); + AudioManager.playOnSkipButton(); - updateSkipButtons(false, false, true, false, false, false); + updateSkipButtons(); } private void btnPassPriorityUntilNextYourTurnActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_MY_NEXT_TURN, gameId, null); + skipButtons.activateSkipButton(KEY_CONTROL_YOUR_TURN); + AudioManager.playOnSkipButton(); - updateSkipButtons(false, false, false, true, false, false); + updateSkipButtons(); } private void btnPassPriorityUntilStackResolvedActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_STACK_RESOLVED, gameId, null); + skipButtons.activateSkipButton(KEY_CONTROL_SKIP_STACK); + AudioManager.playOnSkipButton(); - updateSkipButtons(false, false, false, false, true, false); + updateSkipButtons(); } private void btnSkipToEndStepBeforeYourTurnActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_UNTIL_END_STEP_BEFORE_MY_NEXT_TURN, gameId, null); + skipButtons.activateSkipButton(KEY_CONTROL_PRIOR_END); + AudioManager.playOnSkipButton(); - updateSkipButtons(false, false, false, false, false, true); + updateSkipButtons(); } private void restorePriorityActionPerformed(java.awt.event.ActionEvent evt) { SessionHandler.sendPlayerAction(PlayerAction.PASS_PRIORITY_CANCEL_ALL_ACTIONS, gameId, null); + skipButtons.activateSkipButton(""); + AudioManager.playOnSkipButtonCancel(); - updateSkipButtons(false, false, false, false, false, false); + updateSkipButtons(); } private void mouseClickPhaseBar(MouseEvent evt) { if (evt.getButton() == MouseEvent.BUTTON1) { // Left button PreferencesDialog.main(new String[]{PreferencesDialog.OPEN_PHASES_TAB}); + // TODO: add event handler on preferences closed and refresh game data from server } } diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 8543ca37d4..5ef099ba82 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -728,6 +728,7 @@ public class HumanPlayer extends PlayerImpl { controllingPlayer = (HumanPlayer) player; } } + if (getJustActivatedType() != null && !holdingPriority) { if (controllingPlayer.getUserData().isPassPriorityCast() && getJustActivatedType() == AbilityType.SPELL) { @@ -742,43 +743,55 @@ public class HumanPlayer extends PlayerImpl { return false; } } - if (isGameUnderControl()) { // Use the skip actions only if the player itself controls its turn - if (passedAllTurns - || passedTurnSkipStack) { + + // SKIP buttons - use the skip actions only if the player itself controls its turn + if (isGameUnderControl()) { + if (passedAllTurns || passedTurnSkipStack) { if (passWithManaPoolCheck(game)) { return false; } } - if (passedUntilEndStepBeforeMyTurn) { + if (passedUntilEndStepBeforeMyTurn) { if (game.getTurn().getStepType() != PhaseStep.END_TURN) { + // other step if (passWithManaPoolCheck(game)) { return false; } } else { + // end step - search yourself PlayerList playerList = game.getState().getPlayerList(playerId); if (!playerList.getPrevious().equals(game.getActivePlayerId())) { if (passWithManaPoolCheck(game)) { return false; } + } else { + // stop + passedUntilEndStepBeforeMyTurn = false; } } } + if (game.getStack().isEmpty()) { + // empty stack + boolean dontCheckPassStep = false; if (passedUntilStackResolved) { // Don't skip to next step with this action. It always only resolves a stack. If stack is empty it does nothing. + passedUntilStackResolved = false; dontCheckPassStep = true; } + if (passedTurn || passedTurnSkipStack) { if (passWithManaPoolCheck(game)) { return false; } } + if (passedUntilNextMain) { if (game.getTurn().getStepType() == PhaseStep.POSTCOMBAT_MAIN || game.getTurn().getStepType() == PhaseStep.PRECOMBAT_MAIN) { - // it's a main phase + // it's main step if (!skippedAtLeastOnce || (!playerId.equals(game.getActivePlayerId()) && !controllingPlayer.getUserData().getUserSkipPrioritySteps().isStopOnAllMainPhases())) { @@ -797,9 +810,10 @@ public class HumanPlayer extends PlayerImpl { } } } + if (passedUntilEndOfTurn) { if (game.getTurn().getStepType() == PhaseStep.END_TURN) { - // It's end of turn phase + // it's end of turn step if (!skippedAtLeastOnce || (playerId.equals(game.getActivePlayerId()) && !controllingPlayer @@ -812,7 +826,7 @@ public class HumanPlayer extends PlayerImpl { } } else { dontCheckPassStep = true; - passedUntilEndOfTurn = false; + passedUntilEndOfTurn = false; // reset skip action } } else { skippedAtLeastOnce = true; @@ -821,23 +835,39 @@ public class HumanPlayer extends PlayerImpl { } } } + if (!dontCheckPassStep && checkPassStep(game, controllingPlayer)) { if (passWithManaPoolCheck(game)) { return false; } } - } else if (passedUntilStackResolved) { - if (Objects.equals(dateLastAddedToStack, game.getStack().getDateLastAdded())) { - dateLastAddedToStack = game.getStack().getDateLastAdded(); + + } else { + // non empty stack + boolean haveNewObjectsOnStack = Objects.equals(dateLastAddedToStack, game.getStack().getDateLastAdded()); + dateLastAddedToStack = game.getStack().getDateLastAdded(); + if (passedUntilStackResolved) { + if (haveNewObjectsOnStack + && (playerId.equals(game.getActivePlayerId()) + && controllingPlayer + .getUserData() + .getUserSkipPrioritySteps() + .isStopOnStackNewObjects())) { + // new objects on stack -- disable "pass until stack resolved" + passedUntilStackResolved = false; + } else { + // no new objects on stack -- go to next priority + } + } + if (passedUntilStackResolved) { if (passWithManaPoolCheck(game)) { return false; } - } else { - passedUntilStackResolved = false; } } } + while (canRespond()) { updateGameStatePriority("priority", game); holdingPriority = false; diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index a50b9e353c..9e248bf627 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -104,7 +104,7 @@ public abstract class PlayerImpl implements Player, Serializable { // priority control protected boolean passed; // player passed priority protected boolean passedTurn; // F4 - protected boolean passedTurnSkipStack; // F6 + protected boolean passedTurnSkipStack; // F6 // TODO: research protected boolean passedUntilEndOfTurn; // F5 protected boolean passedUntilNextMain; // F7 protected boolean passedUntilStackResolved; // F10 diff --git a/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java b/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java index 1db6d8cfa9..9c5a2fbd3d 100644 --- a/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java +++ b/Mage/src/main/java/mage/players/net/UserSkipPrioritySteps.java @@ -1,10 +1,8 @@ - package mage.players.net; import java.io.Serializable; /** - * * @author LevelX2 */ public class UserSkipPrioritySteps implements Serializable { @@ -16,6 +14,7 @@ public class UserSkipPrioritySteps implements Serializable { boolean stopOnDeclareBlockerIfNoneAvailable = true; boolean stopOnAllMainPhases = true; boolean stopOnAllEndPhases = true; + boolean stopOnStackNewObjects = true; public UserSkipPrioritySteps() { yourTurn = new SkipPrioritySteps(); @@ -62,4 +61,11 @@ public class UserSkipPrioritySteps implements Serializable { this.stopOnAllEndPhases = stopOnAllEndPhases; } + public boolean isStopOnStackNewObjects() { + return stopOnStackNewObjects; + } + + public void setStopOnStackNewObjects(boolean stopOnStackNewObjects) { + this.stopOnStackNewObjects = stopOnStackNewObjects; + } }