Changed references to OldGuiNewGame preference components to reference the actual ForgePreferences class hosted in Singletons.

This commit is contained in:
Rob Cashwalker
2011-09-13 20:22:20 +00:00
parent ffe281b890
commit 8b7767f7da
2 changed files with 13 additions and 13 deletions

View File

@@ -92,7 +92,7 @@ import forge.gui.input.Input_PayManaCost_Ability;
import forge.properties.ForgePreferences; import forge.properties.ForgePreferences;
import forge.properties.ForgeProps; import forge.properties.ForgeProps;
import forge.properties.NewConstants; import forge.properties.NewConstants;
import forge.view.swing.OldGuiNewGame; //import forge.view.swing.OldGuiNewGame;
/** /**
@@ -842,7 +842,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
private void initComponents() { private void initComponents() {
//Preparing the Frame //Preparing the Frame
setTitle(ForgeProps.getLocalized(LANG.PROGRAM_NAME)); setTitle(ForgeProps.getLocalized(LANG.PROGRAM_NAME));
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
setFont(new Font("Times New Roman", 0, 16)); setFont(new Font("Times New Roman", 0, 16));
} }
getContentPane().setLayout(new BorderLayout()); getContentPane().setLayout(new BorderLayout());
@@ -983,7 +983,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
//adding the individual parts //adding the individual parts
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
initFonts(pane); initFonts(pane);
} }
@@ -1165,7 +1165,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
oppPCLabel.setForeground(greenColor); oppPCLabel.setForeground(greenColor);
JLabel oppHandLabel = new JLabel(ForgeProps.getLocalized(COMPUTER_HAND.BUTTON), SwingConstants.TRAILING); JLabel oppHandLabel = new JLabel(ForgeProps.getLocalized(COMPUTER_HAND.BUTTON), SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
oppHandLabel.setFont(statFont); oppHandLabel.setFont(statFont);
} }
@@ -1173,7 +1173,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
oppGraveButton.setText((String) COMPUTER_GRAVEYARD_ACTION.getValue("buttonText")); oppGraveButton.setText((String) COMPUTER_GRAVEYARD_ACTION.getValue("buttonText"));
oppGraveButton.setMargin(new Insets(0, 0, 0, 0)); oppGraveButton.setMargin(new Insets(0, 0, 0, 0));
oppGraveButton.setHorizontalAlignment(SwingConstants.TRAILING); oppGraveButton.setHorizontalAlignment(SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
oppGraveButton.setFont(statFont); oppGraveButton.setFont(statFont);
} }
@@ -1185,7 +1185,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
oppRemovedButton.setText((String) COMPUTER_REMOVED_ACTION.getValue("buttonText")); oppRemovedButton.setText((String) COMPUTER_REMOVED_ACTION.getValue("buttonText"));
oppRemovedButton.setMargin(new Insets(0, 0, 0, 0)); oppRemovedButton.setMargin(new Insets(0, 0, 0, 0));
//removedButton.setHorizontalAlignment(SwingConstants.TRAILING); //removedButton.setHorizontalAlignment(SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
oppRemovedButton.setFont(statFont); oppRemovedButton.setFont(statFont);
} }
@@ -1256,12 +1256,12 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
JLabel playerLibraryLabel = new JLabel(ForgeProps.getLocalized(HUMAN_LIBRARY.BUTTON), JLabel playerLibraryLabel = new JLabel(ForgeProps.getLocalized(HUMAN_LIBRARY.BUTTON),
SwingConstants.TRAILING); SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
playerLibraryLabel.setFont(statFont); playerLibraryLabel.setFont(statFont);
} }
JLabel playerHandLabel = new JLabel(ForgeProps.getLocalized(HUMAN_HAND.TITLE), SwingConstants.TRAILING); JLabel playerHandLabel = new JLabel(ForgeProps.getLocalized(HUMAN_HAND.TITLE), SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
playerHandLabel.setFont(statFont); playerHandLabel.setFont(statFont);
} }
@@ -1270,7 +1270,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
playerGraveButton.setText((String) HUMAN_GRAVEYARD_ACTION.getValue("buttonText")); playerGraveButton.setText((String) HUMAN_GRAVEYARD_ACTION.getValue("buttonText"));
playerGraveButton.setMargin(new Insets(0, 0, 0, 0)); playerGraveButton.setMargin(new Insets(0, 0, 0, 0));
playerGraveButton.setHorizontalAlignment(SwingConstants.TRAILING); playerGraveButton.setHorizontalAlignment(SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
playerGraveButton.setFont(statFont); playerGraveButton.setFont(statFont);
} }
@@ -1279,7 +1279,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
playerFlashBackButton.setText((String) HUMAN_FLASHBACK_ACTION.getValue("buttonText")); playerFlashBackButton.setText((String) HUMAN_FLASHBACK_ACTION.getValue("buttonText"));
playerFlashBackButton.setMargin(new Insets(0, 0, 0, 0)); playerFlashBackButton.setMargin(new Insets(0, 0, 0, 0));
playerFlashBackButton.setHorizontalAlignment(SwingConstants.TRAILING); playerFlashBackButton.setHorizontalAlignment(SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
playerFlashBackButton.setFont(statFont); playerFlashBackButton.setFont(statFont);
} }
@@ -1294,7 +1294,7 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
playerRemovedButton.setText((String) HUMAN_REMOVED_ACTION.getValue("buttonText")); playerRemovedButton.setText((String) HUMAN_REMOVED_ACTION.getValue("buttonText"));
playerRemovedButton.setMargin(new Insets(0, 0, 0, 0)); playerRemovedButton.setMargin(new Insets(0, 0, 0, 0));
//removedButton.setHorizontalAlignment(SwingConstants.TRAILING); //removedButton.setHorizontalAlignment(SwingConstants.TRAILING);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
playerRemovedButton.setFont(statFont); playerRemovedButton.setFont(statFont);
} }

View File

@@ -8,7 +8,7 @@ package forge.gui.game;
import forge.*; import forge.*;
import forge.view.swing.OldGuiNewGame; //import forge.view.swing.OldGuiNewGame;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.EtchedBorder; import javax.swing.border.EtchedBorder;
@@ -81,7 +81,7 @@ public class CardDetailPanel extends JPanel implements CardContainer {
cdArea.setLineWrap(true); cdArea.setLineWrap(true);
cdArea.setWrapStyleWord(true); cdArea.setWrapStyleWord(true);
if (!OldGuiNewGame.useLAFFonts.isSelected()) { if (!Singletons.getModel().getPreferences().lafFonts) {
nameCostLabel.setFont(new java.awt.Font("Dialog", 0, 14)); nameCostLabel.setFont(new java.awt.Font("Dialog", 0, 14));
typeLabel.setFont(new java.awt.Font("Dialog", 0, 14)); typeLabel.setFont(new java.awt.Font("Dialog", 0, 14));
powerToughnessLabel.setFont(new java.awt.Font("Dialog", 0, 14)); powerToughnessLabel.setFont(new java.awt.Font("Dialog", 0, 14));