Improve keybinding buttons, add information

This commit is contained in:
Campbell Suter 2016-10-20 12:30:42 +13:00
parent 5ea636126f
commit b4dc47fbc9
No known key found for this signature in database
GPG key ID: 754A66CCF3F73C0F
4 changed files with 177 additions and 133 deletions

View file

@ -1,44 +1,42 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.client.components; package mage.client.components;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.awt.event.KeyListener; import java.awt.event.KeyListener;
import javax.swing.JToggleButton; import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPopupMenu;
/** /**
* *
* @author Campbell Suter <znix@znix.xyz> * @author Campbell Suter <znix@znix.xyz>
*/ */
public class KeyBindButton extends JToggleButton implements KeyListener { public class KeyBindButton extends JButton implements ActionListener {
private final JPopupMenu menu;
private final PopupItem item;
private int keyCode; private int keyCode;
private String text; private String text;
public KeyBindButton() { public KeyBindButton() {
menu = new JPopupMenu();
menu.add(item = new PopupItem());
addActionListener(this);
fixText(); fixText();
addKeyListener(this);
} }
@Override private void applyNewKeycode(int code) {
public void keyTyped(KeyEvent e) { keyCode = code;
} switch (keyCode) {
case KeyEvent.VK_ESCAPE:
@Override case KeyEvent.VK_SPACE:
public void keyPressed(KeyEvent e) { keyCode = 0;
}
@Override
public void keyReleased(KeyEvent e) {
if (!isSelected()) {
return;
} }
keyCode = e.getKeyCode();
fixText(); fixText();
setSelected(false); menu.setVisible(false);
setSize(getPreferredSize());
System.out.println("text: " + text); System.out.println("text: " + text);
} }
@ -65,4 +63,32 @@ public class KeyBindButton extends JToggleButton implements KeyListener {
return text; return text;
} }
@Override
public void actionPerformed(ActionEvent e) {
menu.show(this, 0, 0);
item.requestFocusInWindow();
}
private class PopupItem extends JLabel implements KeyListener {
public PopupItem() {
super("Press a key");
addKeyListener(this);
setFocusable(true);
}
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
applyNewKeycode(e.getKeyCode());
}
@Override
public void keyReleased(KeyEvent e) {
}
}
} }

View file

@ -1,8 +1,3 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.client.components; package mage.client.components;
import java.awt.Color; import java.awt.Color;

View file

@ -3949,7 +3949,7 @@
<Component id="checkBoxEndTurnOthers" min="-2" max="-2" attributes="0"/> <Component id="checkBoxEndTurnOthers" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="phases_stopSettings" pref="266" max="32767" attributes="0"/> <Component id="phases_stopSettings" pref="356" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
@ -4171,7 +4171,7 @@
<Component id="panelCardImages" min="-2" max="-2" attributes="0"/> <Component id="panelCardImages" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="panelBackgroundImages" min="-2" max="-2" attributes="0"/> <Component id="panelBackgroundImages" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="53" max="32767" attributes="0"/> <EmptySpace pref="125" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -4230,7 +4230,7 @@
</Group> </Group>
<Component id="cbUseDefaultImageFolder" min="-2" max="-2" attributes="0"/> <Component id="cbUseDefaultImageFolder" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="0" pref="231" max="32767" attributes="0"/> <EmptySpace min="0" pref="270" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
@ -4744,7 +4744,7 @@
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<Component id="avatarPane" pref="484" max="32767" attributes="0"/> <Component id="avatarPane" pref="584" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
@ -5655,7 +5655,7 @@
<Component id="jLabel17" min="-2" max="-2" attributes="0"/> <Component id="jLabel17" min="-2" max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
<EmptySpace pref="91" max="32767" attributes="0"/> <EmptySpace pref="198" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -5901,17 +5901,19 @@
</Group> </Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="keyConfirm" min="-2" max="-2" attributes="0"/> <Component id="keyConfirm" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keySkipStep" min="-2" max="-2" attributes="0"/> <Component id="keyCancelSkip" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keySkipStack" min="-2" max="-2" attributes="0"/> <Component id="keyNextTurn" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keyYourTurn" min="-2" max="-2" attributes="0"/> <Component id="keySkipStack" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keyNextTurn" min="-2" max="-2" attributes="0"/> <Component id="keyYourTurn" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keyCancelSkip" min="-2" max="-2" attributes="0"/> <Component id="keyMainStep" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keyEndStep" min="-2" max="-2" attributes="0"/> <Component id="keyPriorEnd" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keyMainStep" min="-2" max="-2" attributes="0"/> <Component id="keySkipStep" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="keyPriorEnd" min="-2" max="-2" attributes="0"/> <Component id="keyEndStep" alignment="0" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace pref="483" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="controlsDescriptionLabel" pref="498" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -5919,51 +5921,56 @@
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="labelConfirm" alignment="3" min="-2" max="-2" attributes="0"/> <Group type="102" attributes="0">
<Component id="keyConfirm" alignment="3" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0">
<Component id="labelConfirm" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyConfirm" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelCancel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyCancelSkip" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelNextTurn" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyNextTurn" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelEndStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyEndStep" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelSkipStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keySkipStep" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelMainStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyMainStep" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelYourTurn" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyYourTurn" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lebelSkip" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keySkipStack" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelPriorEnd" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyPriorEnd" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="controlsDescriptionLabel" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace min="-2" pref="263" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelCancel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyCancelSkip" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelNextTurn" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyNextTurn" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelEndStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyEndStep" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelSkipStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keySkipStep" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelMainStep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyMainStep" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelYourTurn" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyYourTurn" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="lebelSkip" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keySkipStack" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelPriorEnd" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="keyPriorEnd" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="263" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -6059,6 +6066,12 @@
<Property name="text" type="java.lang.String" value="Confirm"/> <Property name="text" type="java.lang.String" value="Confirm"/>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="controlsDescriptionLabel">
<Properties>
<Property name="text" type="java.lang.String" value="&lt;html&gt;Click on a button and press a key to change a keybind.&lt;br&gt;Space and ESC are not available, and will set the keybind to nothing.&lt;br&gt;If you are currently playing a game, the changes will not take effect until you start a new game."/>
<Property name="verticalAlignment" type="int" value="1"/>
</Properties>
</Component>
</SubComponents> </SubComponents>
</Container> </Container>
</SubComponents> </SubComponents>

View file

@ -571,6 +571,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
labelSkipStep = new javax.swing.JLabel(); labelSkipStep = new javax.swing.JLabel();
keyConfirm = new mage.client.components.KeyBindButton(); keyConfirm = new mage.client.components.KeyBindButton();
labelConfirm = new javax.swing.JLabel(); labelConfirm = new javax.swing.JLabel();
controlsDescriptionLabel = new javax.swing.JLabel();
saveButton = new javax.swing.JButton(); saveButton = new javax.swing.JButton();
exitButton = new javax.swing.JButton(); exitButton = new javax.swing.JButton();
@ -1435,7 +1436,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(jLabelEndOfTurn) .add(jLabelEndOfTurn)
.add(checkBoxEndTurnOthers)) .add(checkBoxEndTurnOthers))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(phases_stopSettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE) .add(phases_stopSettings, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE)
.addContainerGap()) .addContainerGap())
); );
@ -1514,7 +1515,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(cbNumberOfDownloadThreads, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
.add(cbUseDefaultImageFolder)) .add(cbUseDefaultImageFolder))
.add(0, 231, Short.MAX_VALUE))) .add(0, 270, Short.MAX_VALUE)))
.addContainerGap()) .addContainerGap())
); );
panelCardImagesLayout.setVerticalGroup( panelCardImagesLayout.setVerticalGroup(
@ -1709,7 +1710,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(panelCardImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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) .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) .add(panelBackgroundImages, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(53, Short.MAX_VALUE)) .addContainerGap(125, Short.MAX_VALUE))
); );
tabsPanel.addTab("Images", tabImages); tabsPanel.addTab("Images", tabImages);
@ -2284,7 +2285,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
tabAvatarsLayout.setVerticalGroup( tabAvatarsLayout.setVerticalGroup(
tabAvatarsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) tabAvatarsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(tabAvatarsLayout.createSequentialGroup() .add(tabAvatarsLayout.createSequentialGroup()
.add(avatarPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 484, Short.MAX_VALUE) .add(avatarPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 584, Short.MAX_VALUE)
.addContainerGap()) .addContainerGap())
); );
@ -2319,7 +2320,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
.add(connection_serversLayout.createSequentialGroup() .add(connection_serversLayout.createSequentialGroup()
.add(141, 141, 141) .add(141, 141, 141)
.add(jLabel17))) .add(jLabel17)))
.addContainerGap(91, Short.MAX_VALUE)) .addContainerGap(198, Short.MAX_VALUE))
); );
connection_serversLayout.setVerticalGroup( connection_serversLayout.setVerticalGroup(
connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) connection_serversLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@ -2509,6 +2510,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
labelConfirm.setText("Confirm"); labelConfirm.setText("Confirm");
controlsDescriptionLabel.setText("<html>Click on a button and press a key to change a keybind.<br>Space and ESC are not available, and will set the keybind to nothing.<br>If you are currently playing a game, the changes will not take effect until you start a new game.");
controlsDescriptionLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
org.jdesktop.layout.GroupLayout tabControlsLayout = new org.jdesktop.layout.GroupLayout(tabControls); org.jdesktop.layout.GroupLayout tabControlsLayout = new org.jdesktop.layout.GroupLayout(tabControls);
tabControls.setLayout(tabControlsLayout); tabControls.setLayout(tabControlsLayout);
tabControlsLayout.setHorizontalGroup( tabControlsLayout.setHorizontalGroup(
@ -2528,56 +2532,61 @@ public class PreferencesDialog extends javax.swing.JDialog {
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .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(keyConfirm, 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(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(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(keyYourTurn, 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(keyCancelSkip, 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(keyMainStep, 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(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(483, Short.MAX_VALUE)) .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))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(controlsDescriptionLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 498, Short.MAX_VALUE)
.addContainerGap())
); );
tabControlsLayout.setVerticalGroup( tabControlsLayout.setVerticalGroup(
tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(tabControlsLayout.createSequentialGroup() .add(tabControlsLayout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(labelConfirm) .add(tabControlsLayout.createSequentialGroup()
.add(keyConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelConfirm)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keyConfirm, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelCancel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keyCancelSkip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelCancel)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keyCancelSkip, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelNextTurn) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keyNextTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelNextTurn)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keyNextTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelEndStep) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keyEndStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelEndStep)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keyEndStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelSkipStep) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keySkipStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelSkipStep)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keySkipStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelMainStep) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keyMainStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelMainStep)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keyMainStep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelYourTurn) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keyYourTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(labelYourTurn)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keyYourTurn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(lebelSkip) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keySkipStack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(lebelSkip)
.add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(keySkipStack, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(labelPriorEnd) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(tabControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.addContainerGap(263, Short.MAX_VALUE)) .add(labelPriorEnd)
.add(keyPriorEnd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(controlsDescriptionLabel))
.add(263, 263, 263))
); );
tabsPanel.addTab("Controls", tabControls); tabsPanel.addTab("Controls", tabControls);
@ -3732,6 +3741,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
private javax.swing.JCheckBox checkBoxUpkeepOthers; private javax.swing.JCheckBox checkBoxUpkeepOthers;
private javax.swing.JCheckBox checkBoxUpkeepYou; private javax.swing.JCheckBox checkBoxUpkeepYou;
private javax.swing.JPanel connection_servers; private javax.swing.JPanel connection_servers;
private javax.swing.JLabel controlsDescriptionLabel;
private javax.swing.JButton exitButton; private javax.swing.JButton exitButton;
private javax.swing.JLabel fontSizeLabel; private javax.swing.JLabel fontSizeLabel;
private javax.swing.JPanel guiSizeBasic; private javax.swing.JPanel guiSizeBasic;