forked from External/mage
* Some more changes to adjustment possibilities of GUI size.
This commit is contained in:
parent
ff52fcd588
commit
28b129018f
9 changed files with 463 additions and 142 deletions
|
|
@ -1135,8 +1135,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
public void showUserRequestDialog(final UserRequestMessage userRequestMessage) {
|
||||
final UserRequestDialog userRequestDialog = new UserRequestDialog();
|
||||
userRequestDialog.setLocation(100, 100);
|
||||
desktopPane.add(userRequestDialog, JLayeredPane.MODAL_LAYER);
|
||||
// ui.addComponent(MageComponents.DESKTOP_PANE, userRequestDialog);
|
||||
desktopPane.add(userRequestDialog, JLayeredPane.POPUP_LAYER);
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
userRequestDialog.showDialog(userRequestMessage);
|
||||
} else {
|
||||
|
|
@ -1371,38 +1370,21 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void showMessage(final String message
|
||||
) {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
JOptionPane.showMessageDialog(desktopPane, message);
|
||||
} else {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
JOptionPane.showMessageDialog(desktopPane, message);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void showMessage(String message) {
|
||||
final UserRequestMessage requestMessage = new UserRequestMessage("Message", message);
|
||||
requestMessage.setButton1("OK", null);
|
||||
MageFrame.getInstance().showUserRequestDialog(requestMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(final String message
|
||||
) {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
JOptionPane.showMessageDialog(desktopPane, message, "Error", JOptionPane.ERROR_MESSAGE);
|
||||
} else {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
JOptionPane.showMessageDialog(desktopPane, message, "Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void showError(final String message) {
|
||||
final UserRequestMessage requestMessage = new UserRequestMessage("Error", message);
|
||||
requestMessage.setButton1("OK", null);
|
||||
MageFrame.getInstance().showUserRequestDialog(requestMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processCallback(ClientCallback callback
|
||||
) {
|
||||
public void processCallback(ClientCallback callback) {
|
||||
callbackClient.processCallback(callback);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
|
||||
protected CardEventSource cardEventSource = new CardEventSource();
|
||||
private Dimension cardDimension;
|
||||
private int rowHeight;
|
||||
private CardsView cards;
|
||||
private Map<UUID, MageCard> mageCards = new LinkedHashMap<>();
|
||||
protected BigCard bigCard;
|
||||
|
|
@ -144,6 +145,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
|
||||
public void changeGUISize() {
|
||||
setGUISize();
|
||||
redrawCards();
|
||||
}
|
||||
|
||||
private void setGUISize() {
|
||||
|
|
@ -151,7 +153,8 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
mainTable.getTableHeader().setPreferredSize(new Dimension(GUISizeHelper.tableHeaderHeight, GUISizeHelper.tableHeaderHeight));
|
||||
mainTable.setFont(GUISizeHelper.tableFont);
|
||||
mainTable.setRowHeight(GUISizeHelper.getTableRowHeight());
|
||||
|
||||
cardDimension = GUISizeHelper.editorCardDimension;
|
||||
rowHeight = GUISizeHelper.editorCardOffsetSize;
|
||||
}
|
||||
|
||||
private void makeTransparent() {
|
||||
|
|
@ -301,7 +304,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
@Override
|
||||
public void drawCards(SortSetting sortSetting) {
|
||||
int maxWidth = this.getParent().getWidth();
|
||||
int numColumns = maxWidth / Config.dimensions.frameWidth;
|
||||
int numColumns = maxWidth / cardDimension.width;
|
||||
int curColumn = 0;
|
||||
int curRow = 0;
|
||||
int maxRow = 0;
|
||||
|
|
@ -325,7 +328,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
}
|
||||
|
||||
if (cards != null && cards.size() > 0) {
|
||||
Rectangle rectangle = new Rectangle(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
|
||||
Rectangle rectangle = new Rectangle(cardDimension.width, cardDimension.height);
|
||||
List<CardView> sortedCards = new ArrayList<>(cards.values());
|
||||
switch (sortSetting.getSortBy()) {
|
||||
case NAME:
|
||||
|
|
@ -361,13 +364,13 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
curRow = 0;
|
||||
}
|
||||
}
|
||||
rectangle.setLocation(curColumn * Config.dimensions.frameWidth, curRow * 20);
|
||||
rectangle.setLocation(curColumn * cardDimension.width, curRow * rowHeight);
|
||||
setCardBounds(mageCards.get(card.getId()), rectangle);
|
||||
|
||||
curRow++;
|
||||
lastCard = card;
|
||||
} else {
|
||||
rectangle.setLocation(curColumn * Config.dimensions.frameWidth, curRow * 20);
|
||||
rectangle.setLocation(curColumn * cardDimension.width, curRow * rowHeight);
|
||||
setCardBounds(mageCards.get(card.getId()), rectangle);
|
||||
curColumn++;
|
||||
if (curColumn == numColumns) {
|
||||
|
|
@ -381,7 +384,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
maxRow = Math.max(maxRow, curRow);
|
||||
maxColumn = Math.max(maxColumn, curColumn);
|
||||
updateCounts();
|
||||
cardArea.setPreferredSize(new Dimension((maxColumn + 1) * Config.dimensions.frameWidth, Config.dimensions.frameHeight + maxRow * 20));
|
||||
cardArea.setPreferredSize(new Dimension((maxColumn + 1) * cardDimension.width, cardDimension.height + maxRow * rowHeight));
|
||||
cardArea.revalidate();
|
||||
this.revalidate();
|
||||
this.repaint();
|
||||
|
|
@ -422,9 +425,6 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
}
|
||||
|
||||
private MageCard addCard(CardView card, BigCard bigCard, UUID gameId) {
|
||||
if (cardDimension == null) {
|
||||
cardDimension = new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
|
||||
}
|
||||
MageCard cardImg = Plugins.getInstance().getMageCard(card, bigCard, cardDimension, gameId, true);
|
||||
cardArea.add(cardImg);
|
||||
cardImg.update(card);
|
||||
|
|
@ -434,7 +434,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
|
||||
private void setCardBounds(MageCard card, Rectangle rectangle) {
|
||||
card.setBounds(rectangle);
|
||||
card.setCardBounds(rectangle.x, rectangle.y, Config.dimensions.frameWidth, Config.dimensions.frameHeight);
|
||||
card.setCardBounds(rectangle.x, rectangle.y, cardDimension.width, cardDimension.height);
|
||||
cardArea.moveToFront(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import mage.client.cards.BigCard;
|
|||
import mage.client.cards.CardsList;
|
||||
import mage.client.constants.Constants.DeckEditorMode;
|
||||
import mage.client.util.Event;
|
||||
import mage.client.util.GUISizeHelper;
|
||||
import mage.client.util.Listener;
|
||||
import mage.view.CardsView;
|
||||
|
||||
|
|
@ -69,6 +70,7 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
setGUISize();
|
||||
deckList.changeGUISize();
|
||||
sideboardList.changeGUISize();
|
||||
deckAreaSplitPane.setDividerSize(GUISizeHelper.dividerBarSize);
|
||||
}
|
||||
|
||||
private void setGUISize() {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<Component id="exitButton" min="-2" pref="100" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="tabsPanel" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tabsPanel" alignment="0" pref="535" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
|
|
@ -388,31 +388,7 @@
|
|||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="guiSizeBasic" pref="507" max="32767" attributes="0"/>
|
||||
<Component id="guiSizeGame" alignment="0" pref="507" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="guiSizeBasic" min="-2" pref="106" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="guiSizeGame" min="-2" pref="191" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="109" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="guiSizeBasic">
|
||||
<Properties>
|
||||
|
|
@ -425,7 +401,18 @@
|
|||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 180]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 180]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="11" insetsLeft="10" insetsBottom="0" insetsRight="10" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
|
|
@ -487,7 +474,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="4" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -499,7 +486,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="4" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -524,7 +511,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -539,7 +526,81 @@
|
|||
</AccessibilityProperties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSlider" name="sliderEditorCardSize">
|
||||
<Properties>
|
||||
<Property name="majorTickSpacing" type="int" value="5"/>
|
||||
<Property name="maximum" type="int" value="50"/>
|
||||
<Property name="minimum" type="int" value="10"/>
|
||||
<Property name="minorTickSpacing" type="int" value="1"/>
|
||||
<Property name="paintLabels" type="boolean" value="true"/>
|
||||
<Property name="paintTicks" type="boolean" value="true"/>
|
||||
<Property name="snapToTicks" type="boolean" value="true"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="<HTML>The size of the card in editor and the picked zone of the draft panel"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 40]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelEditorCardSize">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" value="Size of editor and drafted cards"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="<HTML>The size of the card in editor and the picked zone of the draft panel
"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSlider" name="sliderEditorCardOffset">
|
||||
<Properties>
|
||||
<Property name="majorTickSpacing" type="int" value="5"/>
|
||||
<Property name="maximum" type="int" value="50"/>
|
||||
<Property name="minimum" type="int" value="10"/>
|
||||
<Property name="minorTickSpacing" type="int" value="1"/>
|
||||
<Property name="paintLabels" type="boolean" value="true"/>
|
||||
<Property name="paintTicks" type="boolean" value="true"/>
|
||||
<Property name="snapToTicks" type="boolean" value="true"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="<HTML>The size of the card in editor and the picked zone of the draft panel"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 40]"/>
|
||||
</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="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelEditorCardOffset">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" value="Size of card offset"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="<HTML>The vertical offset of card images in editor areas
"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -556,7 +617,18 @@
|
|||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 180]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[600, 180]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="10" insetsBottom="86" insetsRight="10" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
|
|
@ -582,7 +654,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="4" insetsBottom="6" insetsRight="4" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -619,7 +691,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="3" insetsBottom="5" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -631,7 +703,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -656,7 +728,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="4" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="3" insetsBottom="5" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -668,7 +740,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="4" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -693,7 +765,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="3" insetsBottom="5" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -730,7 +802,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="3" insetsBottom="5" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -745,7 +817,7 @@
|
|||
</AccessibilityProperties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -771,7 +843,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="4" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="3" insetsBottom="5" insetsRight="3" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
@ -783,7 +855,7 @@
|
|||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="4" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
<GridBagConstraints gridX="2" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="3" ipadY="3" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ import mage.players.net.UserGroup;
|
|||
import mage.players.net.UserSkipPrioritySteps;
|
||||
import mage.remote.Connection;
|
||||
import mage.remote.Connection.ProxyType;
|
||||
import mage.view.UserRequestMessage;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
|
@ -80,7 +81,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class PreferencesDialog extends javax.swing.JDialog {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(PreferencesDialog.class);
|
||||
private static final Logger logger = Logger.getLogger(PreferencesDialog.class);
|
||||
|
||||
public static final String KEY_SHOW_TOOLTIPS_DELAY = "showTooltipsDelay";
|
||||
public static final String KEY_SHOW_CARD_NAMES = "showCardNames";
|
||||
|
|
@ -95,6 +96,9 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_GUI_TABLE_FONT_SIZE = "guiTableFontSize";
|
||||
public static final String KEY_GUI_CHAT_FONT_SIZE = "guiChatFontSize";
|
||||
public static final String KEY_GUI_CARD_HAND_SIZE = "guiCardHandSize";
|
||||
public static final String KEY_GUI_CARD_EDITOR_SIZE = "guiCardEditorSize";
|
||||
public static final String KEY_GUI_CARD_OFFSET_SIZE = "guiCardOffsetSize";
|
||||
|
||||
public static final String KEY_GUI_SYMBOL_SIZE = "guiSymbolSize";
|
||||
public static final String KEY_GUI_TOOLTIP_SIZE = "guiTooltipSize";
|
||||
public static final String KEY_GUI_DIALOG_FONT_SIZE = "guiDialogFontSize";
|
||||
|
|
@ -373,6 +377,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
chatFontSizeLabel = new javax.swing.JLabel();
|
||||
sliderDialogFont = new javax.swing.JSlider();
|
||||
labelDialogFont = new javax.swing.JLabel();
|
||||
sliderEditorCardSize = new javax.swing.JSlider();
|
||||
labelEditorCardSize = new javax.swing.JLabel();
|
||||
sliderEditorCardOffset = new javax.swing.JSlider();
|
||||
labelEditorCardOffset = new javax.swing.JLabel();
|
||||
guiSizeGame = new javax.swing.JPanel();
|
||||
sliderCardSizeHand = new javax.swing.JSlider();
|
||||
labelCardSizeHand = new javax.swing.JLabel();
|
||||
|
|
@ -729,8 +737,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
tabGuiSize.setMaximumSize(new java.awt.Dimension(527, 423));
|
||||
tabGuiSize.setMinimumSize(new java.awt.Dimension(527, 423));
|
||||
tabGuiSize.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
guiSizeBasic.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Size basic elements"));
|
||||
guiSizeBasic.setMinimumSize(new java.awt.Dimension(600, 180));
|
||||
guiSizeBasic.setPreferredSize(new java.awt.Dimension(600, 180));
|
||||
guiSizeBasic.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
sliderFontSize.setMajorTickSpacing(5);
|
||||
|
|
@ -769,7 +780,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
sliderChatFontSize.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderChatFontSize.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
|
|
@ -779,7 +790,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
chatFontSizeLabel.setText("Size of chat font");
|
||||
chatFontSizeLabel.setToolTipText("<HTML>The size of the font used to display the chat text");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
|
|
@ -796,7 +808,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
sliderDialogFont.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderDialogFont.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
guiSizeBasic.add(sliderDialogFont, gridBagConstraints);
|
||||
|
|
@ -805,14 +818,78 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
labelDialogFont.setText("Font size of messages and menues");
|
||||
labelDialogFont.setToolTipText("<HTML>The size of the font of messages and menues");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
guiSizeBasic.add(labelDialogFont, gridBagConstraints);
|
||||
labelDialogFont.getAccessibleContext().setAccessibleDescription("<HTML>The size of the font used to display messages or menus.");
|
||||
|
||||
sliderEditorCardSize.setMajorTickSpacing(5);
|
||||
sliderEditorCardSize.setMaximum(50);
|
||||
sliderEditorCardSize.setMinimum(10);
|
||||
sliderEditorCardSize.setMinorTickSpacing(1);
|
||||
sliderEditorCardSize.setPaintLabels(true);
|
||||
sliderEditorCardSize.setPaintTicks(true);
|
||||
sliderEditorCardSize.setSnapToTicks(true);
|
||||
sliderEditorCardSize.setToolTipText("<HTML>The size of the card in editor and the picked zone of the draft panel");
|
||||
sliderEditorCardSize.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderEditorCardSize.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
guiSizeBasic.add(sliderEditorCardSize, gridBagConstraints);
|
||||
|
||||
labelEditorCardSize.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelEditorCardSize.setText("Size of editor and drafted cards");
|
||||
labelEditorCardSize.setToolTipText("<HTML>The size of the card in editor and the picked zone of the draft panel\n");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
guiSizeBasic.add(labelEditorCardSize, gridBagConstraints);
|
||||
|
||||
sliderEditorCardOffset.setMajorTickSpacing(5);
|
||||
sliderEditorCardOffset.setMaximum(50);
|
||||
sliderEditorCardOffset.setMinimum(10);
|
||||
sliderEditorCardOffset.setMinorTickSpacing(1);
|
||||
sliderEditorCardOffset.setPaintLabels(true);
|
||||
sliderEditorCardOffset.setPaintTicks(true);
|
||||
sliderEditorCardOffset.setSnapToTicks(true);
|
||||
sliderEditorCardOffset.setToolTipText("<HTML>The size of the card in editor and the picked zone of the draft panel");
|
||||
sliderEditorCardOffset.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderEditorCardOffset.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
guiSizeBasic.add(sliderEditorCardOffset, gridBagConstraints);
|
||||
|
||||
labelEditorCardOffset.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelEditorCardOffset.setText("Size of card offset");
|
||||
labelEditorCardOffset.setToolTipText("<HTML>The vertical offset of card images in editor areas\n");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
guiSizeBasic.add(labelEditorCardOffset, gridBagConstraints);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(11, 10, 0, 10);
|
||||
tabGuiSize.add(guiSizeBasic, gridBagConstraints);
|
||||
|
||||
guiSizeGame.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Size game elements"));
|
||||
guiSizeGame.setMinimumSize(new java.awt.Dimension(600, 180));
|
||||
guiSizeGame.setPreferredSize(new java.awt.Dimension(600, 180));
|
||||
guiSizeGame.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
sliderCardSizeHand.setMajorTickSpacing(5);
|
||||
|
|
@ -830,7 +907,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
gridBagConstraints.insets = new java.awt.Insets(6, 4, 6, 4);
|
||||
guiSizeGame.add(sliderCardSizeHand, gridBagConstraints);
|
||||
|
||||
labelCardSizeHand.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
|
|
@ -855,17 +932,17 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
sliderCardSizeOtherZones.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderCardSizeOtherZones.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 3, 5, 3);
|
||||
guiSizeGame.add(sliderCardSizeOtherZones, gridBagConstraints);
|
||||
|
||||
labelCardSizeOtherZones.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelCardSizeOtherZones.setText("Size of other zone cards");
|
||||
labelCardSizeOtherZones.setToolTipText("<HTML>The size of card in other game zone (e.g. graveyard, revealed cards etc.)");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
|
|
@ -883,17 +960,17 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
sliderCardSizeBattlefield.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderCardSizeBattlefield.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 3, 5, 3);
|
||||
guiSizeGame.add(sliderCardSizeBattlefield, gridBagConstraints);
|
||||
|
||||
labelCardSizeBattlefield.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelCardSizeBattlefield.setText("Size of permanents");
|
||||
labelCardSizeBattlefield.setToolTipText("<HTML>The maximum size of permanents on the battlefield");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
|
|
@ -914,7 +991,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 3, 5, 3);
|
||||
guiSizeGame.add(sliderSymbolSize, gridBagConstraints);
|
||||
|
||||
labelSymbolSize.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
|
|
@ -938,17 +1015,18 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
sliderGameFeedbackArea.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderGameFeedbackArea.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 3, 5, 3);
|
||||
guiSizeGame.add(sliderGameFeedbackArea, gridBagConstraints);
|
||||
|
||||
labelGameFeedback.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelGameFeedback.setText("Size game feedback area");
|
||||
labelGameFeedback.setToolTipText("<HTML>The size of the game feedback area (buttons and messages above the hand area)");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 4;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
|
|
@ -967,43 +1045,29 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
sliderTooltipSize.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
sliderTooltipSize.setMinimumSize(new java.awt.Dimension(150, 40));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 3, 5, 3);
|
||||
guiSizeGame.add(sliderTooltipSize, gridBagConstraints);
|
||||
|
||||
labelTooltipSize.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelTooltipSize.setText("Tooltip size");
|
||||
labelTooltipSize.setToolTipText("<HTML>The size of the tooltip window for cards or permanents");
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 4;
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 4;
|
||||
gridBagConstraints.ipadx = 3;
|
||||
gridBagConstraints.ipady = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
guiSizeGame.add(labelTooltipSize, gridBagConstraints);
|
||||
|
||||
org.jdesktop.layout.GroupLayout tabGuiSizeLayout = new org.jdesktop.layout.GroupLayout(tabGuiSize);
|
||||
tabGuiSize.setLayout(tabGuiSizeLayout);
|
||||
tabGuiSizeLayout.setHorizontalGroup(
|
||||
tabGuiSizeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(tabGuiSizeLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.add(tabGuiSizeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(guiSizeBasic, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
|
||||
.add(guiSizeGame, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
tabGuiSizeLayout.setVerticalGroup(
|
||||
tabGuiSizeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
.add(tabGuiSizeLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.add(guiSizeBasic, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(guiSizeGame, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 191, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(109, Short.MAX_VALUE))
|
||||
);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(6, 10, 86, 10);
|
||||
tabGuiSize.add(guiSizeGame, gridBagConstraints);
|
||||
|
||||
tabsPanel.addTab("GUI Size", tabGuiSize);
|
||||
|
||||
|
|
@ -2216,7 +2280,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
|
||||
.add(exitButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
|
||||
.add(6, 6, 6))
|
||||
.add(tabsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.add(tabsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
|
||||
|
|
@ -2262,6 +2326,14 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
save(prefs, dialog.sliderCardSizeHand, KEY_GUI_CARD_HAND_SIZE, "true", "false", UPDATE_CACHE_POLICY);
|
||||
sizeGUIChanged = true;
|
||||
}
|
||||
if (getCachedValue(KEY_GUI_CARD_EDITOR_SIZE, 14) != dialog.sliderEditorCardSize.getValue()) {
|
||||
save(prefs, dialog.sliderEditorCardSize, KEY_GUI_CARD_EDITOR_SIZE, "true", "false", UPDATE_CACHE_POLICY);
|
||||
sizeGUIChanged = true;
|
||||
}
|
||||
if (getCachedValue(KEY_GUI_CARD_OFFSET_SIZE, 14) != dialog.sliderEditorCardOffset.getValue()) {
|
||||
save(prefs, dialog.sliderEditorCardOffset, KEY_GUI_CARD_OFFSET_SIZE, "true", "false", UPDATE_CACHE_POLICY);
|
||||
sizeGUIChanged = true;
|
||||
}
|
||||
if (getCachedValue(KEY_GUI_SYMBOL_SIZE, 14) != dialog.sliderSymbolSize.getValue()) {
|
||||
save(prefs, dialog.sliderSymbolSize, KEY_GUI_SYMBOL_SIZE, "true", "false", UPDATE_CACHE_POLICY);
|
||||
sizeGUIChanged = true;
|
||||
|
|
@ -2359,8 +2431,10 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
|
||||
prefs.flush();
|
||||
} catch (BackingStoreException ex) {
|
||||
ex.printStackTrace();
|
||||
JOptionPane.showMessageDialog(null, "Error: couldn't save preferences. Please try once again.");
|
||||
logger.error("Error: couldn't save preferences", ex);
|
||||
UserRequestMessage message = new UserRequestMessage("Error", "Error: couldn't save preferences. Please try once again.");
|
||||
message.setButton1("OK", null);
|
||||
MageFrame.getInstance().showUserRequestDialog(message);
|
||||
}
|
||||
|
||||
dialog.setVisible(false);
|
||||
|
|
@ -2623,15 +2697,22 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}//GEN-LAST:event_cbAutoOrderTriggerActionPerformed
|
||||
|
||||
private void showProxySettings() {
|
||||
if (cbProxyType.getSelectedItem() == Connection.ProxyType.SOCKS) {
|
||||
this.pnlProxy.setVisible(true);
|
||||
this.pnlProxySettings.setVisible(true);
|
||||
} else if (cbProxyType.getSelectedItem() == Connection.ProxyType.HTTP) {
|
||||
this.pnlProxy.setVisible(true);
|
||||
this.pnlProxySettings.setVisible(true);
|
||||
} else if (cbProxyType.getSelectedItem() == Connection.ProxyType.NONE) {
|
||||
this.pnlProxy.setVisible(false);
|
||||
this.pnlProxySettings.setVisible(false);
|
||||
Connection.ProxyType proxyType = (Connection.ProxyType) cbProxyType.getSelectedItem();
|
||||
switch (proxyType) {
|
||||
case SOCKS:
|
||||
this.pnlProxy.setVisible(true);
|
||||
this.pnlProxySettings.setVisible(true);
|
||||
break;
|
||||
case HTTP:
|
||||
this.pnlProxy.setVisible(true);
|
||||
this.pnlProxySettings.setVisible(true);
|
||||
break;
|
||||
case NONE:
|
||||
this.pnlProxy.setVisible(false);
|
||||
this.pnlProxySettings.setVisible(false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
this.pack();
|
||||
this.repaint();
|
||||
|
|
@ -2657,7 +2738,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
connection.setProxyPassword(password);
|
||||
}
|
||||
} else {
|
||||
LOGGER.warn("host or\\and port are empty: host=" + host + ", port=" + port);
|
||||
logger.warn("host or\\and port are empty: host=" + host + ", port=" + port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2759,6 +2840,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
load(prefs, dialog.sliderFontSize, KEY_GUI_TABLE_FONT_SIZE, "14");
|
||||
load(prefs, dialog.sliderChatFontSize, KEY_GUI_CHAT_FONT_SIZE, "14");
|
||||
load(prefs, dialog.sliderCardSizeHand, KEY_GUI_CARD_HAND_SIZE, "14");
|
||||
load(prefs, dialog.sliderEditorCardSize, KEY_GUI_CARD_EDITOR_SIZE, "14");
|
||||
load(prefs, dialog.sliderEditorCardOffset, KEY_GUI_CARD_OFFSET_SIZE, "14");
|
||||
load(prefs, dialog.sliderSymbolSize, KEY_GUI_SYMBOL_SIZE, "14");
|
||||
load(prefs, dialog.sliderDialogFont, KEY_GUI_DIALOG_FONT_SIZE, "14");
|
||||
load(prefs, dialog.sliderTooltipSize, KEY_GUI_TOOLTIP_SIZE, "14");
|
||||
|
|
@ -2903,7 +2986,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
dialog.tabsPanel.setSelectedIndex(index);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Error during open tab", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3083,7 +3166,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
addAvatar(jPanel32, 32, false, false);
|
||||
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e, e);
|
||||
logger.error(e, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3248,6 +3331,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JLabel labelCardSizeHand;
|
||||
private javax.swing.JLabel labelCardSizeOtherZones;
|
||||
private javax.swing.JLabel labelDialogFont;
|
||||
private javax.swing.JLabel labelEditorCardOffset;
|
||||
private javax.swing.JLabel labelEditorCardSize;
|
||||
private javax.swing.JLabel labelGameFeedback;
|
||||
private javax.swing.JLabel labelPreferedImageLanguage;
|
||||
private javax.swing.JLabel labelSymbolSize;
|
||||
|
|
@ -3277,6 +3362,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
private javax.swing.JSlider sliderCardSizeOtherZones;
|
||||
private javax.swing.JSlider sliderChatFontSize;
|
||||
private javax.swing.JSlider sliderDialogFont;
|
||||
private javax.swing.JSlider sliderEditorCardOffset;
|
||||
private javax.swing.JSlider sliderEditorCardSize;
|
||||
private javax.swing.JSlider sliderFontSize;
|
||||
private javax.swing.JSlider sliderGameFeedbackArea;
|
||||
private javax.swing.JSlider sliderSymbolSize;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<Properties>
|
||||
<Property name="resizable" type="boolean" value="true"/>
|
||||
<Property name="title" type="java.lang.String" value="UserRequestMessage"/>
|
||||
<Property name="modal" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
|
|
@ -28,7 +29,6 @@
|
|||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="lblText" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="btn3" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="btn2" pref="0" max="32767" attributes="0"/>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" value="message to the user"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 60]"/>
|
||||
<Dimension value="[1000, 500]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 60]"/>
|
||||
|
|
|
|||
|
|
@ -126,10 +126,11 @@ public class UserRequestDialog extends MageDialog {
|
|||
|
||||
setResizable(true);
|
||||
setTitle("UserRequestMessage");
|
||||
setModal(true);
|
||||
|
||||
lblText.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
lblText.setText("message to the user");
|
||||
lblText.setMaximumSize(new java.awt.Dimension(400, 60));
|
||||
lblText.setMaximumSize(new java.awt.Dimension(1000, 500));
|
||||
lblText.setMinimumSize(new java.awt.Dimension(400, 60));
|
||||
lblText.setPreferredSize(new java.awt.Dimension(400, 60));
|
||||
|
||||
|
|
@ -172,7 +173,6 @@ public class UserRequestDialog extends MageDialog {
|
|||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(lblText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(btn3, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(btn2, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ public class GUISizeHelper {
|
|||
public static Dimension otherZonesCardDimension;
|
||||
public static Dimension battlefieldCardDimension;
|
||||
|
||||
public static Dimension editorCardDimension;
|
||||
public static int editorCardOffsetSize;
|
||||
|
||||
public static int getTableRowHeight() {
|
||||
int fontSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_TABLE_FONT_SIZE, 14);
|
||||
return fontSize + 6;
|
||||
|
|
@ -125,5 +128,9 @@ public class GUISizeHelper {
|
|||
|
||||
int battlefieldCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_BATTLEFIELD_SIZE, 14);
|
||||
battlefieldCardDimension = new Dimension(CARD_IMAGE_WIDTH * battlefieldCardSize / 42, CARD_IMAGE_HEIGHT * battlefieldCardSize / 42);
|
||||
|
||||
int editorCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_EDITOR_SIZE, 14);
|
||||
editorCardDimension = new Dimension(CARD_IMAGE_WIDTH * editorCardSize / 42, CARD_IMAGE_HEIGHT * editorCardSize / 42);
|
||||
editorCardOffsetSize = 2 * PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OFFSET_SIZE, 14) - 10;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue