mirror of
https://github.com/correl/mage.git
synced 2025-04-12 17:00:08 -09:00
* Added scrolling to the game dialog area. Some more GUI resizing. Removed some unwanted borders of viewports.
This commit is contained in:
parent
d2ff6e3783
commit
dd9431c8ea
10 changed files with 388 additions and 406 deletions
Mage.Client/src/main/java/mage/client
|
@ -126,6 +126,7 @@ public class ChatPanelBasic extends javax.swing.JPanel {
|
|||
if (jScrollPaneTxt != null) {
|
||||
jScrollPaneTxt.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
|
||||
jScrollPaneTxt.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA));
|
||||
jScrollPaneTxt.setViewportBorder(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ public class MageTextArea extends JEditorPane {
|
|||
setEditable(false);
|
||||
setBackground(new Color(0, 0, 0, 0)); // transparent background
|
||||
setFocusable(false);
|
||||
// setBorder(BorderFactory.createLineBorder(Color.red));
|
||||
// setSelectionColor(new Color(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,6 @@ import java.util.concurrent.ScheduledExecutorService;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import mage.client.MageFrame;
|
||||
import mage.client.chat.ChatPanelBasic;
|
||||
import mage.client.components.MageTextArea;
|
||||
import mage.client.dialog.MageDialog;
|
||||
import mage.client.util.GUISizeHelper;
|
||||
import mage.client.util.audio.AudioManager;
|
||||
|
@ -94,10 +93,10 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
|
||||
public void changeGUISize() {
|
||||
setGUISize();
|
||||
helper.changeGUISize();
|
||||
}
|
||||
|
||||
private void setGUISize() {
|
||||
helper.changeGUISize();
|
||||
}
|
||||
|
||||
public void getFeedback(FeedbackMode mode, String message, boolean special, Map<String, Serializable> options, int messageId) {
|
||||
|
@ -112,7 +111,7 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
this.helper.setOriginalId(null); // reference to the feedback causing ability
|
||||
String lblText = addAdditionalText(message, options);
|
||||
this.helper.setTextArea(lblText);
|
||||
this.lblMessage.setText(lblText);
|
||||
//this.lblMessage.setText(lblText);
|
||||
this.mode = mode;
|
||||
switch (this.mode) {
|
||||
case INFORM:
|
||||
|
@ -239,14 +238,11 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
this.btnLeft.setVisible(false);
|
||||
this.btnRight.setVisible(false);
|
||||
this.btnSpecial.setVisible(false);
|
||||
this.lblMessage.setText("");
|
||||
}
|
||||
|
||||
private void customInitComponents() {
|
||||
btnRight = new javax.swing.JButton();
|
||||
btnLeft = new javax.swing.JButton();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
lblMessage = new MageTextArea();
|
||||
btnSpecial = new javax.swing.JButton();
|
||||
btnUndo = new javax.swing.JButton();
|
||||
btnUndo.setVisible(true);
|
||||
|
@ -269,13 +265,6 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
}
|
||||
});
|
||||
|
||||
jScrollPane1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
|
||||
lblMessage.setBorder(null);
|
||||
jScrollPane1.setViewportView(lblMessage);
|
||||
jScrollPane1.setBorder(null);
|
||||
|
||||
btnSpecial.setText("Special");
|
||||
btnSpecial.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
|
@ -357,7 +346,5 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
private javax.swing.JButton btnRight;
|
||||
private javax.swing.JButton btnSpecial;
|
||||
private javax.swing.JButton btnUndo;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private MageTextArea lblMessage;
|
||||
private HelperPanel helper;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ import javax.swing.JPopupMenu;
|
|||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import javax.swing.Timer;
|
||||
import javax.swing.border.Border;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.border.LineBorder;
|
||||
|
@ -194,9 +195,10 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
|
||||
private MageDialogState choiceWindowState;
|
||||
|
||||
private int feedbackAreaHeight;
|
||||
private boolean initComponents;
|
||||
|
||||
private Timer resizeTimer;
|
||||
|
||||
private enum PopUpMenuType {
|
||||
|
||||
TRIGGER_ORDER
|
||||
|
@ -210,9 +212,6 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
public GamePanel() {
|
||||
initComponents = true;
|
||||
initComponents();
|
||||
initPopupMenuTriggerOrder();
|
||||
|
||||
setGUISize();
|
||||
|
||||
pickNumber = new PickNumberDialog();
|
||||
MageFrame.getDesktop().add(pickNumber, JLayeredPane.MODAL_LAYER);
|
||||
|
@ -257,27 +256,35 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
|
||||
}
|
||||
});
|
||||
// Resize the width of the stack area if the size of the play area is chnaged
|
||||
// Resize the width of the stack area if the size of the play area is changed
|
||||
ComponentAdapter componentAdapterPlayField = new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
Thread worker = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!initComponents) {
|
||||
setGUISize();
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!initComponents) {
|
||||
if (resizeTimer.isRunning()) {
|
||||
resizeTimer.restart();
|
||||
} else {
|
||||
resizeTimer.start();
|
||||
}
|
||||
};
|
||||
worker.start();
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
resizeTimer = new Timer(1000, new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
resizeTimer.stop();
|
||||
setGUISize();
|
||||
feedbackPanel.changeGUISize();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
jPanel3.addComponentListener(componentAdapterPlayField);
|
||||
initComponents = false;
|
||||
}
|
||||
|
@ -387,9 +394,6 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
jSplitPane0.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
jSplitPane1.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
jSplitPane2.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
|
||||
feedbackAreaHeight = GUISizeHelper.gameDialogAreaFontSizeBig + GUISizeHelper.gameDialogAreaFontSizeSmall + GUISizeHelper.gameDialogAreaButtonHigh + 60;
|
||||
helper.setPreferredSize(new Dimension(100, feedbackAreaHeight));
|
||||
stackObjects.setCardDimension(GUISizeHelper.handCardDimension);
|
||||
int newStackWidth = jPanel3.getWidth() * GUISizeHelper.stackWidth / 100;
|
||||
if (newStackWidth < 360) {
|
||||
|
@ -398,10 +402,12 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
Dimension newDimension = new Dimension(jPanel3.getWidth() - newStackWidth, GUISizeHelper.handCardDimension.height + GUISizeHelper.scrollBarSize);
|
||||
handContainer.setPreferredSize(newDimension);
|
||||
handContainer.setMaximumSize(newDimension);
|
||||
|
||||
newDimension = new Dimension(newStackWidth, STACK_MIN_CARDS_OFFSET_Y + GUISizeHelper.handCardDimension.height + GUISizeHelper.scrollBarSize);
|
||||
stackObjects.setPreferredSize(newDimension);
|
||||
stackObjects.setMinimumSize(newDimension);
|
||||
stackObjects.setMaximumSize(newDimension);
|
||||
|
||||
newDimension = new Dimension(newStackWidth, (int) pnlShortCuts.getPreferredSize().getHeight());
|
||||
pnlShortCuts.setPreferredSize(newDimension);
|
||||
pnlShortCuts.setMinimumSize(newDimension);
|
||||
|
@ -1347,10 +1353,6 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
lblPriority.setLabelFor(txtPriority);
|
||||
lblPriority.setText("Priority Player:");
|
||||
|
||||
// feedbackPanel.setBorder(javax.swing.BorderFactory.createLineBorder(Color.MAGENTA, 5));
|
||||
// feedbackPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(150, 50, 50), 2));
|
||||
// feedbackPanel.setMaximumSize(new java.awt.Dimension(208, 121));
|
||||
// feedbackPanel.setMinimumSize(new java.awt.Dimension(208, 121));
|
||||
bigCard.setBorder(new LineBorder(Color.black, 1, true));
|
||||
|
||||
int c = JComponent.WHEN_IN_FOCUSED_WINDOW;
|
||||
|
@ -1653,6 +1655,10 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
}
|
||||
});
|
||||
|
||||
initPopupMenuTriggerOrder();
|
||||
|
||||
setGUISize();
|
||||
|
||||
// Replay panel to control replay of games
|
||||
javax.swing.GroupLayout gl_pnlReplay = new javax.swing.GroupLayout(pnlReplay);
|
||||
pnlReplay.setLayout(gl_pnlReplay);
|
||||
|
@ -1762,9 +1768,8 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
jPhases.addMouseListener(phasesMouseAdapter);
|
||||
|
||||
pnlReplay.setOpaque(false);
|
||||
|
||||
helper = new HelperPanel();
|
||||
// helper.setBorder(new LineBorder(Color.MAGENTA, 2));
|
||||
helper.setPreferredSize(new Dimension(100, 90));
|
||||
feedbackPanel.setHelperPanel(helper);
|
||||
|
||||
jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.awt.Color;
|
|||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Point;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
@ -38,11 +39,12 @@ import java.awt.event.MouseAdapter;
|
|||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.util.UUID;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.ToolTipManager;
|
||||
import javax.swing.UIManager;
|
||||
|
@ -69,10 +71,10 @@ public class HelperPanel extends JPanel {
|
|||
private javax.swing.JButton btnRight;
|
||||
private javax.swing.JButton btnSpecial;
|
||||
private javax.swing.JButton btnUndo;
|
||||
|
||||
//private javax.swing.JButton btnEndTurn;
|
||||
//private javax.swing.JButton btnStopTimer;
|
||||
private MageTextArea textArea;
|
||||
private JScrollPane textAreaScrollPane;
|
||||
private MageTextArea dialogTextArea;
|
||||
JPanel buttonContainer;
|
||||
|
||||
private javax.swing.JButton linkLeft;
|
||||
|
@ -114,11 +116,15 @@ public class HelperPanel extends JPanel {
|
|||
}
|
||||
|
||||
private void setGUISize() {
|
||||
buttonContainer.setPreferredSize(new Dimension(getWidth(), GUISizeHelper.gameDialogButtonHeight + 20));
|
||||
buttonContainer.setMinimumSize(new Dimension(160, GUISizeHelper.gameDialogButtonHeight + 20));
|
||||
buttonContainer.setMaximumSize(new Dimension(Integer.MAX_VALUE, GUISizeHelper.gameDialogButtonHeight + 20));
|
||||
//this.setMaximumSize(new Dimension(getParent().getWidth(), Integer.MAX_VALUE));
|
||||
textAreaScrollPane.setMaximumSize(new Dimension(getParent().getWidth(), GUISizeHelper.gameDialogAreaTextHeight));
|
||||
textAreaScrollPane.setPreferredSize(new Dimension(getParent().getWidth(), GUISizeHelper.gameDialogAreaTextHeight));
|
||||
|
||||
Dimension buttonDimension = new Dimension(GUISizeHelper.gameDialogButtonWidth, GUISizeHelper.gameDialogButtonHeight);
|
||||
// dialogTextArea.setMaximumSize(new Dimension(getParent().getWidth(), Integer.MAX_VALUE));
|
||||
// dialogTextArea.setPreferredSize(new Dimension(getParent().getWidth(), GUISizeHelper.gameDialogAreaTextHeight));
|
||||
// buttonContainer.setPreferredSize(new Dimension(getParent().getWidth(), GUISizeHelper.gameDialogButtonHeight + 4));
|
||||
// buttonContainer.setMinimumSize(new Dimension(160, GUISizeHelper.gameDialogButtonHeight + 20));
|
||||
// buttonContainer.setMaximumSize(new Dimension(Integer.MAX_VALUE, GUISizeHelper.gameDialogButtonHeight + 4));
|
||||
btnLeft.setFont(GUISizeHelper.gameDialogAreaFont);
|
||||
btnRight.setFont(GUISizeHelper.gameDialogAreaFont);
|
||||
btnSpecial.setFont(GUISizeHelper.gameDialogAreaFont);
|
||||
|
@ -145,23 +151,26 @@ public class HelperPanel extends JPanel {
|
|||
private void initComponents() {
|
||||
initPopupMenuTriggerOrder();
|
||||
setBackground(new Color(0, 0, 0, 100));
|
||||
// setBorder(new LineBorder(Color.WHITE, 1));
|
||||
|
||||
setLayout(new GridLayout(0, 1));
|
||||
setOpaque(false);
|
||||
|
||||
textArea = new MageTextArea();
|
||||
// textArea.setBorder(new LineBorder(Color.GREEN, 1));
|
||||
textArea.setText("<Empty>");
|
||||
add(textArea);
|
||||
dialogTextArea = new MageTextArea();
|
||||
dialogTextArea.setText("<Empty>");
|
||||
dialogTextArea.setOpaque(false);
|
||||
|
||||
textAreaScrollPane = new JScrollPane(dialogTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
textAreaScrollPane.setOpaque(false);
|
||||
textAreaScrollPane.setBackground(new Color(0, 0, 0, 0));
|
||||
textAreaScrollPane.getViewport().setOpaque(false);
|
||||
textAreaScrollPane.setBorder(null);
|
||||
textAreaScrollPane.setViewportBorder(null);
|
||||
add(textAreaScrollPane);
|
||||
|
||||
buttonContainer = new JPanel();
|
||||
// buttonContainer.setBorder(new LineBorder(Color.RED, 1));
|
||||
buttonContainer.setLayout(new FlowLayout(FlowLayout.CENTER, 15, 0));
|
||||
buttonContainer.setOpaque(false);
|
||||
add(buttonContainer);
|
||||
|
||||
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
||||
|
||||
btnSpecial = new JButton("Special");
|
||||
btnSpecial.setVisible(false);
|
||||
buttonContainer.add(btnSpecial);
|
||||
|
@ -243,7 +252,7 @@ public class HelperPanel extends JPanel {
|
|||
});
|
||||
|
||||
// sets a darker background and higher simiss time fur tooltip in the feedback / helper panel
|
||||
textArea.addMouseListener(new MouseAdapter() {
|
||||
dialogTextArea.addMouseListener(new MouseAdapter() {
|
||||
|
||||
@Override
|
||||
public void mouseEntered(MouseEvent me) {
|
||||
|
@ -334,11 +343,11 @@ public class HelperPanel extends JPanel {
|
|||
|
||||
public void setBasicMessage(String message) {
|
||||
this.message = message;
|
||||
this.textArea.setText(message, this.getWidth());
|
||||
this.dialogTextArea.setText(message, this.getWidth());
|
||||
}
|
||||
|
||||
public void setTextArea(String message) {
|
||||
this.textArea.setText(message, this.getWidth());
|
||||
this.dialogTextArea.setText(message, this.getWidth());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -99,11 +99,14 @@ public class PlayersChatPanel extends javax.swing.JPanel {
|
|||
jScrollPaneTalk.setOpaque(false);
|
||||
|
||||
jScrollPaneSystem.getViewport().setOpaque(false);
|
||||
jScrollPaneSystem.setViewportBorder(null);
|
||||
|
||||
colorPaneSystem.setExtBackgroundColor(new Color(0, 0, 0, CHAT_ALPHA)); // Alpha = 255 not transparent
|
||||
colorPaneSystem.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
if (jScrollPanePlayers != null) {
|
||||
jScrollPanePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
|
||||
jScrollPanePlayers.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA));
|
||||
jScrollPanePlayers.setViewportBorder(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,41 +11,23 @@
|
|||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-14,0,0,6,17"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="topPanel" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="jSplitPane1" alignment="0" pref="908" max="32767" attributes="0"/>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel2" alignment="1" pref="908" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="topPanel" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jSplitPane1" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="jPanel2" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="598" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="topPanel">
|
||||
<Container class="javax.swing.JPanel" name="jPanelTop">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="ff" green="ff" id="white" palette="1" red="ff" type="palette"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
|
@ -57,12 +39,12 @@
|
|||
<Component id="btnNewTournament" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="filterBar1" max="32767" attributes="0"/>
|
||||
<Component id="filterBar2" pref="468" max="32767" attributes="0"/>
|
||||
<Component id="filterBar1" pref="491" max="32767" attributes="0"/>
|
||||
<Component id="filterBar2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="btnQuickStart" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="835" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
@ -77,11 +59,11 @@
|
|||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="filterBar1" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="filterBar1" max="32767" attributes="0"/>
|
||||
<Component id="btnQuickStart" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="filterBar2" min="-2" pref="25" max="-2" attributes="0"/>
|
||||
<Component id="filterBar2" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
|
@ -132,24 +114,12 @@
|
|||
<SubComponents>
|
||||
<Component class="javax.swing.JToggleButton" name="btnStateWaiting">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/state_waiting.png"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Shows all tables waiting for players."/>
|
||||
<Property name="actionCommand" type="java.lang.String" value="stateWait"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[27, 27]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[27, 27]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
|
@ -160,24 +130,12 @@
|
|||
</Component>
|
||||
<Component class="javax.swing.JToggleButton" name="btnStateActive">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/state_active.png"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Shows all tables with active matches."/>
|
||||
<Property name="actionCommand" type="java.lang.String" value="stateActive"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[27, 27]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[27, 27]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
|
@ -188,24 +146,12 @@
|
|||
</Component>
|
||||
<Component class="javax.swing.JToggleButton" name="btnStateFinished">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/buttons/state_finished.png"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="<HTML>Toggles the visibility of the table of completed <br>matches and tournaments in the lower area.
<br>Showing the last 50 finished matches."/>
|
||||
<Property name="actionCommand" type="java.lang.String" value="stateFinished"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[27, 27]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[27, 27]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 23]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
<Property name="verticalTextPosition" type="int" value="3"/>
|
||||
|
@ -487,7 +433,132 @@
|
|||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPane1">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="dividerSize" type="int" value="10"/>
|
||||
<Property name="resizeWeight" type="double" value="1.0"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanelTables">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="left"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPaneTables" alignment="0" pref="23" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPaneTables" alignment="0" pref="643" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPaneTables">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="dividerSize" type="int" value="10"/>
|
||||
<Property name="orientation" type="int" value="0"/>
|
||||
<Property name="resizeWeight" type="double" value="0.5"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPaneTablesActive">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="viewportBorder" type="javax.swing.border.Border" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="null" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="left"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="tableTables">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="this.tableModel" type="code"/>
|
||||
</Property>
|
||||
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
|
||||
<TableHeader reorderingAllowed="true" resizingAllowed="true"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPaneTablesFinished">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="viewportBorder" type="javax.swing.border.Border" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="null" type="code"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="tableCompleted">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="this.matchesModel" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="mage.client.table.PlayersChatPanel" name="chatPanelMain">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanelBottom">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo">
|
||||
|
@ -498,6 +569,11 @@
|
|||
<Dimension value="[664, 39]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="-1" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
|
@ -507,7 +583,7 @@
|
|||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" pref="705" max="32767" attributes="0"/>
|
||||
<Component id="jLabel2" pref="1350" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
|
@ -559,119 +635,5 @@
|
|||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPane1">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="dividerSize" type="int" value="10"/>
|
||||
<Property name="resizeWeight" type="double" value="1.0"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="left"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPane2" alignment="0" pref="810" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jSplitPane2" alignment="0" pref="526" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JSplitPane" name="jSplitPane2">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="dividerSize" type="int" value="10"/>
|
||||
<Property name="orientation" type="int" value="0"/>
|
||||
<Property name="resizeWeight" type="double" value="0.5"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="left"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="tableTables">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="this.tableModel" type="code"/>
|
||||
</Property>
|
||||
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
|
||||
<TableHeader reorderingAllowed="true" resizingAllowed="true"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[23, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="tableCompleted">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="this.matchesModel" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="mage.client.table.PlayersChatPanel" name="chatPanelMain">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout$JSplitPaneConstraintsDescription">
|
||||
<JSplitPaneConstraints position="right"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
|
|
@ -37,6 +37,7 @@ import java.awt.Color;
|
|||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.HeadlessException;
|
||||
import java.awt.Image;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
@ -148,7 +149,6 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
PreferencesDialog.KEY_TABLES_COLUMNS_WIDTH, PreferencesDialog.KEY_TABLES_COLUMNS_ORDER);
|
||||
|
||||
tableCompleted.setRowSorter(new MageTableRowSorter(matchesModel));
|
||||
setGUISize();
|
||||
|
||||
chatPanelMain.getUserChatPanel().useExtendedView(ChatPanelBasic.VIEW_MODE.NONE);
|
||||
chatPanelMain.getUserChatPanel().setBorder(null);
|
||||
|
@ -159,16 +159,18 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
btnFormatBlock, btnFormatStandard, btnFormatModern, btnFormatLegacy, btnFormatVintage, btnFormatCommander, btnFormatTinyLeader, btnFormatLimited, btnFormatOther,
|
||||
btnSkillBeginner, btnSkillCasual, btnSkillSerious};
|
||||
|
||||
JComponent[] components = new JComponent[]{chatPanelMain, jSplitPane1, jScrollPane1, jScrollPane2, topPanel, jPanel3};
|
||||
JComponent[] components = new JComponent[]{chatPanelMain, jSplitPane1, jScrollPaneTablesActive, jScrollPaneTablesFinished, jPanelTop, jPanelTables};
|
||||
for (JComponent component : components) {
|
||||
component.setOpaque(false);
|
||||
}
|
||||
|
||||
jScrollPane1.getViewport().setBackground(new Color(255, 255, 255, 50));
|
||||
jScrollPane2.getViewport().setBackground(new Color(255, 255, 255, 50));
|
||||
jScrollPaneTablesActive.getViewport().setBackground(new Color(255, 255, 255, 50));
|
||||
jScrollPaneTablesFinished.getViewport().setBackground(new Color(255, 255, 255, 50));
|
||||
|
||||
restoreSettings();
|
||||
|
||||
setGUISize();
|
||||
|
||||
Action openTableAction;
|
||||
openTableAction = new AbstractAction() {
|
||||
@Override
|
||||
|
@ -302,9 +304,28 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
tableCompleted.setRowHeight(GUISizeHelper.getTableRowHeight());
|
||||
|
||||
jSplitPane1.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
jSplitPane2.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
jScrollPane1.getVerticalScrollBar().setPreferredSize(new Dimension(GUISizeHelper.scrollBarSize, 0));
|
||||
jScrollPane1.getHorizontalScrollBar().setPreferredSize(new Dimension(0, GUISizeHelper.scrollBarSize));
|
||||
jSplitPaneTables.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
jScrollPaneTablesActive.getVerticalScrollBar().setPreferredSize(new Dimension(GUISizeHelper.scrollBarSize, 0));
|
||||
jScrollPaneTablesActive.getHorizontalScrollBar().setPreferredSize(new Dimension(0, GUISizeHelper.scrollBarSize));
|
||||
|
||||
ImageIcon icon = new javax.swing.ImageIcon(getClass().getResource("/buttons/state_waiting.png"));
|
||||
Image img = icon.getImage();
|
||||
Image newimg = img.getScaledInstance(GUISizeHelper.menuFont.getSize(), GUISizeHelper.menuFont.getSize(), java.awt.Image.SCALE_SMOOTH);
|
||||
btnStateWaiting.setIcon(new ImageIcon(newimg));
|
||||
|
||||
icon = new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"));
|
||||
img = icon.getImage();
|
||||
newimg = img.getScaledInstance(GUISizeHelper.menuFont.getSize(), GUISizeHelper.menuFont.getSize(), java.awt.Image.SCALE_SMOOTH);
|
||||
btnStateActive.setIcon(new ImageIcon(newimg));
|
||||
|
||||
icon = new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"));
|
||||
img = icon.getImage();
|
||||
newimg = img.getScaledInstance(GUISizeHelper.menuFont.getSize(), GUISizeHelper.menuFont.getSize(), java.awt.Image.SCALE_SMOOTH);
|
||||
btnStateFinished.setIcon(new ImageIcon(newimg));
|
||||
|
||||
for (JToggleButton component : filterButtons) {
|
||||
component.setFont(GUISizeHelper.menuFont);
|
||||
}
|
||||
}
|
||||
|
||||
private void saveDividerLocations() {
|
||||
|
@ -313,7 +334,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
String sb = Double.toString(rec.getWidth()) + "x" + Double.toString(rec.getHeight());
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, sb);
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1, Integer.toString(this.jSplitPane1.getDividerLocation()));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2, Integer.toString(this.jSplitPane2.getDividerLocation()));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2, Integer.toString(this.jSplitPaneTables.getDividerLocation()));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3, Integer.toString(chatPanelMain.getSplitDividerLocation()));
|
||||
}
|
||||
|
||||
|
@ -355,11 +376,11 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
jSplitPane1.setDividerLocation(Integer.parseInt(location));
|
||||
}
|
||||
if (this.btnStateFinished.isSelected()) {
|
||||
this.jSplitPane2.setDividerLocation(-1);
|
||||
this.jSplitPaneTables.setDividerLocation(-1);
|
||||
} else {
|
||||
location = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2, null);
|
||||
if (location != null && jSplitPane2 != null) {
|
||||
jSplitPane2.setDividerLocation(Integer.parseInt(location));
|
||||
if (location != null && jSplitPaneTables != null) {
|
||||
jSplitPaneTables.setDividerLocation(Integer.parseInt(location));
|
||||
}
|
||||
}
|
||||
location = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3, null);
|
||||
|
@ -373,9 +394,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
public Map<String, JComponent> getUIComponents() {
|
||||
Map<String, JComponent> components = new HashMap<>();
|
||||
|
||||
components.put("jScrollPane1", jScrollPane1);
|
||||
components.put("jScrollPane1ViewPort", jScrollPane1.getViewport());
|
||||
components.put("jPanel1", topPanel);
|
||||
components.put("jScrollPane1", jScrollPaneTablesActive);
|
||||
components.put("jScrollPane1ViewPort", jScrollPaneTablesActive.getViewport());
|
||||
components.put("jPanel1", jPanelTop);
|
||||
components.put("tablesPanel", this);
|
||||
|
||||
return components;
|
||||
|
@ -485,9 +506,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
this.currentMessage = 0;
|
||||
}
|
||||
if (serverMessages == null || serverMessages.isEmpty()) {
|
||||
this.jPanel2.setVisible(false);
|
||||
this.jPanelBottom.setVisible(false);
|
||||
} else {
|
||||
this.jPanel2.setVisible(true);
|
||||
this.jPanelBottom.setVisible(true);
|
||||
this.jLabel2.setText(serverMessages.get(0));
|
||||
this.jButtonNext.setVisible(serverMessages.size() > 1);
|
||||
}
|
||||
|
@ -624,8 +645,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
topPanel = new javax.swing.JPanel();
|
||||
jPanelTop = new javax.swing.JPanel();
|
||||
btnNewTable = new javax.swing.JButton();
|
||||
btnNewTournament = new javax.swing.JButton();
|
||||
filterBar1 = new javax.swing.JToolBar();
|
||||
|
@ -653,21 +675,23 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
btnFormatLimited = new javax.swing.JToggleButton();
|
||||
btnFormatOther = new javax.swing.JToggleButton();
|
||||
btnQuickStart = new javax.swing.JButton();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
jSplitPane1 = new javax.swing.JSplitPane();
|
||||
jPanelTables = new javax.swing.JPanel();
|
||||
jSplitPaneTables = new javax.swing.JSplitPane();
|
||||
jScrollPaneTablesActive = new javax.swing.JScrollPane();
|
||||
tableTables = new javax.swing.JTable();
|
||||
jScrollPaneTablesFinished = new javax.swing.JScrollPane();
|
||||
tableCompleted = new javax.swing.JTable();
|
||||
chatPanelMain = new mage.client.table.PlayersChatPanel();
|
||||
jPanelBottom = new javax.swing.JPanel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jButtonNext = new javax.swing.JButton();
|
||||
jSplitPane1 = new javax.swing.JSplitPane();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jSplitPane2 = new javax.swing.JSplitPane();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
tableTables = new javax.swing.JTable();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
tableCompleted = new javax.swing.JTable();
|
||||
chatPanelMain = new mage.client.table.PlayersChatPanel();
|
||||
|
||||
topPanel.setBackground(java.awt.Color.white);
|
||||
topPanel.setOpaque(false);
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
jPanelTop.setBackground(java.awt.Color.white);
|
||||
jPanelTop.setOpaque(false);
|
||||
|
||||
btnNewTable.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/match_new.png"))); // NOI18N
|
||||
btnNewTable.setToolTipText("Creates a new match table.");
|
||||
|
@ -692,16 +716,12 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
filterBar1.setFocusable(false);
|
||||
filterBar1.setOpaque(false);
|
||||
|
||||
btnStateWaiting.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_waiting.png"))); // NOI18N
|
||||
btnStateWaiting.setSelected(true);
|
||||
btnStateWaiting.setToolTipText("Shows all tables waiting for players.");
|
||||
btnStateWaiting.setActionCommand("stateWait");
|
||||
btnStateWaiting.setFocusPainted(false);
|
||||
btnStateWaiting.setFocusable(false);
|
||||
btnStateWaiting.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
btnStateWaiting.setMaximumSize(new java.awt.Dimension(27, 27));
|
||||
btnStateWaiting.setMinimumSize(new java.awt.Dimension(27, 27));
|
||||
btnStateWaiting.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
btnStateWaiting.setRequestFocusEnabled(false);
|
||||
btnStateWaiting.setVerifyInputWhenFocusTarget(false);
|
||||
btnStateWaiting.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
|
@ -712,16 +732,12 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
});
|
||||
filterBar1.add(btnStateWaiting);
|
||||
|
||||
btnStateActive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_active.png"))); // NOI18N
|
||||
btnStateActive.setSelected(true);
|
||||
btnStateActive.setToolTipText("Shows all tables with active matches.");
|
||||
btnStateActive.setActionCommand("stateActive");
|
||||
btnStateActive.setFocusPainted(false);
|
||||
btnStateActive.setFocusable(false);
|
||||
btnStateActive.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
btnStateActive.setMaximumSize(new java.awt.Dimension(27, 27));
|
||||
btnStateActive.setMinimumSize(new java.awt.Dimension(27, 27));
|
||||
btnStateActive.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
btnStateActive.setRequestFocusEnabled(false);
|
||||
btnStateActive.setVerifyInputWhenFocusTarget(false);
|
||||
btnStateActive.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
|
@ -732,16 +748,12 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
});
|
||||
filterBar1.add(btnStateActive);
|
||||
|
||||
btnStateFinished.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/state_finished.png"))); // NOI18N
|
||||
btnStateFinished.setSelected(true);
|
||||
btnStateFinished.setToolTipText("<HTML>Toggles the visibility of the table of completed <br>matches and tournaments in the lower area.\n<br>Showing the last 50 finished matches.");
|
||||
btnStateFinished.setActionCommand("stateFinished");
|
||||
btnStateFinished.setFocusPainted(false);
|
||||
btnStateFinished.setFocusable(false);
|
||||
btnStateFinished.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
btnStateFinished.setMaximumSize(new java.awt.Dimension(27, 27));
|
||||
btnStateFinished.setMinimumSize(new java.awt.Dimension(27, 27));
|
||||
btnStateFinished.setPreferredSize(new java.awt.Dimension(23, 23));
|
||||
btnStateFinished.setRequestFocusEnabled(false);
|
||||
btnStateFinished.setVerifyInputWhenFocusTarget(false);
|
||||
btnStateFinished.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
||||
|
@ -1007,42 +1019,95 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel);
|
||||
topPanel.setLayout(topPanelLayout);
|
||||
topPanelLayout.setHorizontalGroup(
|
||||
topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(topPanelLayout.createSequentialGroup()
|
||||
javax.swing.GroupLayout jPanelTopLayout = new javax.swing.GroupLayout(jPanelTop);
|
||||
jPanelTop.setLayout(jPanelTopLayout);
|
||||
jPanelTopLayout.setHorizontalGroup(
|
||||
jPanelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanelTopLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(btnNewTable)
|
||||
.addGap(6, 6, 6)
|
||||
.addComponent(btnNewTournament)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(filterBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(filterBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 468, Short.MAX_VALUE))
|
||||
.addGroup(jPanelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(filterBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 491, Short.MAX_VALUE)
|
||||
.addComponent(filterBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(btnQuickStart)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(835, Short.MAX_VALUE))
|
||||
);
|
||||
topPanelLayout.setVerticalGroup(
|
||||
topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(topPanelLayout.createSequentialGroup()
|
||||
jPanelTopLayout.setVerticalGroup(
|
||||
jPanelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanelTopLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addGroup(jPanelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(btnNewTable)
|
||||
.addComponent(btnNewTournament))
|
||||
.addGroup(topPanelLayout.createSequentialGroup()
|
||||
.addGroup(topPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(filterBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(jPanelTopLayout.createSequentialGroup()
|
||||
.addGroup(jPanelTopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(filterBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(btnQuickStart))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(filterBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(filterBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
jPanel2.setPreferredSize(new java.awt.Dimension(664, 39));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||
add(jPanelTop, gridBagConstraints);
|
||||
|
||||
jSplitPane1.setBorder(null);
|
||||
jSplitPane1.setDividerSize(10);
|
||||
jSplitPane1.setResizeWeight(1.0);
|
||||
|
||||
jSplitPaneTables.setBorder(null);
|
||||
jSplitPaneTables.setDividerSize(10);
|
||||
jSplitPaneTables.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
||||
jSplitPaneTables.setResizeWeight(0.5);
|
||||
|
||||
jScrollPaneTablesActive.setBorder(null);
|
||||
jScrollPaneTablesActive.setViewportBorder(null);
|
||||
|
||||
tableTables.setModel(this.tableModel);
|
||||
jScrollPaneTablesActive.setViewportView(tableTables);
|
||||
|
||||
jSplitPaneTables.setLeftComponent(jScrollPaneTablesActive);
|
||||
|
||||
jScrollPaneTablesFinished.setBorder(null);
|
||||
jScrollPaneTablesFinished.setViewportBorder(null);
|
||||
jScrollPaneTablesFinished.setMinimumSize(new java.awt.Dimension(23, 0));
|
||||
|
||||
tableCompleted.setModel(this.matchesModel);
|
||||
jScrollPaneTablesFinished.setViewportView(tableCompleted);
|
||||
|
||||
jSplitPaneTables.setRightComponent(jScrollPaneTablesFinished);
|
||||
|
||||
javax.swing.GroupLayout jPanelTablesLayout = new javax.swing.GroupLayout(jPanelTables);
|
||||
jPanelTables.setLayout(jPanelTablesLayout);
|
||||
jPanelTablesLayout.setHorizontalGroup(
|
||||
jPanelTablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSplitPaneTables, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
|
||||
);
|
||||
jPanelTablesLayout.setVerticalGroup(
|
||||
jPanelTablesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSplitPaneTables, javax.swing.GroupLayout.DEFAULT_SIZE, 643, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
jSplitPane1.setLeftComponent(jPanelTables);
|
||||
jSplitPane1.setRightComponent(chatPanelMain);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
add(jSplitPane1, gridBagConstraints);
|
||||
|
||||
jPanelBottom.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
|
||||
jPanelBottom.setPreferredSize(new java.awt.Dimension(664, 39));
|
||||
|
||||
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
|
||||
jLabel1.setText("Message of the Day:");
|
||||
|
@ -1060,86 +1125,33 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||
jPanel2.setLayout(jPanel2Layout);
|
||||
jPanel2Layout.setHorizontalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
javax.swing.GroupLayout jPanelBottomLayout = new javax.swing.GroupLayout(jPanelBottom);
|
||||
jPanelBottom.setLayout(jPanelBottomLayout);
|
||||
jPanelBottomLayout.setHorizontalGroup(
|
||||
jPanelBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanelBottomLayout.createSequentialGroup()
|
||||
.addComponent(jButtonNext, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 705, Short.MAX_VALUE)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 1350, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel2Layout.setVerticalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
jPanelBottomLayout.setVerticalGroup(
|
||||
jPanelBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanelBottomLayout.createSequentialGroup()
|
||||
.addGroup(jPanelBottomLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jButtonNext, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(jLabel1))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jSplitPane1.setBorder(null);
|
||||
jSplitPane1.setDividerSize(10);
|
||||
jSplitPane1.setResizeWeight(1.0);
|
||||
|
||||
jSplitPane2.setBorder(null);
|
||||
jSplitPane2.setDividerSize(10);
|
||||
jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
|
||||
jSplitPane2.setResizeWeight(0.5);
|
||||
|
||||
jScrollPane1.setBorder(null);
|
||||
|
||||
tableTables.setModel(this.tableModel);
|
||||
jScrollPane1.setViewportView(tableTables);
|
||||
|
||||
jSplitPane2.setLeftComponent(jScrollPane1);
|
||||
|
||||
jScrollPane2.setBorder(null);
|
||||
jScrollPane2.setMinimumSize(new java.awt.Dimension(23, 0));
|
||||
|
||||
tableCompleted.setModel(this.matchesModel);
|
||||
jScrollPane2.setViewportView(tableCompleted);
|
||||
|
||||
jSplitPane2.setRightComponent(jScrollPane2);
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 810, Short.MAX_VALUE)
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
jSplitPane1.setLeftComponent(jPanel3);
|
||||
jSplitPane1.setRightComponent(chatPanelMain);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(topPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 908, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(topPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(jSplitPane1)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 598, Short.MAX_VALUE))
|
||||
);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||
add(jPanelBottom, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void btnNewTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewTournamentActionPerformed
|
||||
|
@ -1199,9 +1211,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
|
||||
private void btnStateFinishedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnStateFinishedActionPerformed
|
||||
if (this.btnStateFinished.isSelected()) {
|
||||
this.jSplitPane2.setDividerLocation(-1);
|
||||
this.jSplitPaneTables.setDividerLocation(-1);
|
||||
} else {
|
||||
this.jSplitPane2.setDividerLocation(this.jPanel3.getHeight());
|
||||
this.jSplitPaneTables.setDividerLocation(this.jPanelTables.getHeight());
|
||||
}
|
||||
this.startTasks();
|
||||
}//GEN-LAST:event_btnStateFinishedActionPerformed
|
||||
|
@ -1239,19 +1251,19 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
private javax.swing.JButton jButtonNext;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JPanel jPanelBottom;
|
||||
private javax.swing.JPanel jPanelTables;
|
||||
private javax.swing.JPanel jPanelTop;
|
||||
private javax.swing.JScrollPane jScrollPaneTablesActive;
|
||||
private javax.swing.JScrollPane jScrollPaneTablesFinished;
|
||||
private javax.swing.JToolBar.Separator jSeparator1;
|
||||
private javax.swing.JToolBar.Separator jSeparator2;
|
||||
private javax.swing.JToolBar.Separator jSeparator3;
|
||||
private javax.swing.JToolBar.Separator jSeparator4;
|
||||
private javax.swing.JSplitPane jSplitPane1;
|
||||
private javax.swing.JSplitPane jSplitPane2;
|
||||
private javax.swing.JSplitPane jSplitPaneTables;
|
||||
private javax.swing.JTable tableCompleted;
|
||||
private javax.swing.JTable tableTables;
|
||||
private javax.swing.JPanel topPanel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
|
|
|
@ -64,33 +64,33 @@ public class Config {
|
|||
} catch (IOException ex) {
|
||||
logger.fatal("Config error ", ex);
|
||||
}
|
||||
// serverName = p.getProperty("server-name");
|
||||
// port = Integer.parseInt(p.getProperty("port"));
|
||||
// remoteServer = p.getProperty("remote-server");
|
||||
// cardScalingFactor = Double.valueOf(p.getProperty("card-scaling-factor"));
|
||||
// cardScalingFactorEnlarged = Double.valueOf(p.getProperty("card-scaling-factor-enlarged"));
|
||||
// handScalingFactor = Double.valueOf(p.getProperty("hand-scaling-factor"));
|
||||
// defaultGameType = p.getProperty("default-game-type", "Human");
|
||||
// defaultDeckPath = p.getProperty("default-deck-path");
|
||||
// defaultOtherPlayerIndex = p.getProperty("default-other-player-index");
|
||||
// defaultComputerName = p.getProperty("default-computer-name");
|
||||
//
|
||||
// dimensions = new CardDimensions(cardScalingFactor);
|
||||
// dimensionsEnlarged = new CardDimensions(cardScalingFactorEnlarged);
|
||||
// activate instead this part, to run the UI editor for some panels without error
|
||||
serverName = "localhost";
|
||||
port = 17171;
|
||||
remoteServer = "mage-server";
|
||||
cardScalingFactor = 0.4;
|
||||
cardScalingFactorEnlarged = 0.5;
|
||||
handScalingFactor = 1.3;
|
||||
serverName = p.getProperty("server-name");
|
||||
port = Integer.parseInt(p.getProperty("port"));
|
||||
remoteServer = p.getProperty("remote-server");
|
||||
cardScalingFactor = Double.valueOf(p.getProperty("card-scaling-factor"));
|
||||
cardScalingFactorEnlarged = Double.valueOf(p.getProperty("card-scaling-factor-enlarged"));
|
||||
handScalingFactor = Double.valueOf(p.getProperty("hand-scaling-factor"));
|
||||
defaultGameType = p.getProperty("default-game-type", "Human");
|
||||
defaultDeckPath = "";
|
||||
defaultOtherPlayerIndex = "1";
|
||||
defaultComputerName = "Computer";
|
||||
defaultDeckPath = p.getProperty("default-deck-path");
|
||||
defaultOtherPlayerIndex = p.getProperty("default-other-player-index");
|
||||
defaultComputerName = p.getProperty("default-computer-name");
|
||||
|
||||
dimensions = new CardDimensions(cardScalingFactor);
|
||||
dimensionsEnlarged = new CardDimensions(cardScalingFactorEnlarged);
|
||||
// activate instead this part, to run the UI editor for some panels without error
|
||||
// serverName = "localhost";
|
||||
// port = 17171;
|
||||
// remoteServer = "mage-server";
|
||||
// cardScalingFactor = 0.4;
|
||||
// cardScalingFactorEnlarged = 0.5;
|
||||
// handScalingFactor = 1.3;
|
||||
// defaultGameType = p.getProperty("default-game-type", "Human");
|
||||
// defaultDeckPath = "";
|
||||
// defaultOtherPlayerIndex = "1";
|
||||
// defaultComputerName = "Computer";
|
||||
//
|
||||
// dimensions = new CardDimensions(cardScalingFactor);
|
||||
// dimensionsEnlarged = new CardDimensions(cardScalingFactorEnlarged);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,10 @@ public class GUISizeHelper {
|
|||
public static int gameDialogAreaFontSizeBig = 16;
|
||||
public static int gameDialogAreaFontSizeTooltip = 14;
|
||||
public static int gameDialogAreaFontSizeSmall = 11;
|
||||
public static int gameDialogAreaTextHeight = 0;
|
||||
|
||||
public static int gameDialogAreaButtonHigh = 16;
|
||||
|
||||
public static Font gameDialogAreaFont = new java.awt.Font("Arial", 0, 12);
|
||||
public static int gameDialogButtonHeight;
|
||||
public static int gameDialogButtonWidth;
|
||||
|
@ -114,6 +117,8 @@ public class GUISizeHelper {
|
|||
gameDialogAreaFontSizeBig = feedbackFontSize;
|
||||
gameDialogAreaFontSizeTooltip = feedbackFontSize - 2;
|
||||
gameDialogAreaFontSizeSmall = (feedbackFontSize / 2) + 2;
|
||||
gameDialogAreaTextHeight = GUISizeHelper.gameDialogAreaFontSizeBig + GUISizeHelper.gameDialogAreaFontSizeSmall + 30;
|
||||
|
||||
gameDialogAreaButtonHigh = feedbackFontSize;
|
||||
gameDialogAreaFont = new Font("Arial", 0, feedbackFontSize);
|
||||
gameDialogButtonHeight = feedbackFontSize + 6;
|
||||
|
|
Loading…
Add table
Reference in a new issue