mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
changed Constants and NewConstants from Interfaces to static classes.
This commit is contained in:
@@ -28,7 +28,7 @@ import forge.quest.gui.main.QuestEventManager;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class AllZone implements NewConstants {
|
||||
public final class AllZone {
|
||||
// only for testing, should read decks from local directory
|
||||
// public static final IO IO = new IO("all-decks");
|
||||
|
||||
@@ -283,7 +283,7 @@ public final class AllZone implements NewConstants {
|
||||
if (cardFactory == null) {
|
||||
// setCardFactory(new
|
||||
// LazyCardFactory(ForgeProps.getFile(CARDSFOLDER)));
|
||||
setCardFactory(new PreloadingCardFactory(ForgeProps.getFile(CARDSFOLDER)));
|
||||
setCardFactory(new PreloadingCardFactory(ForgeProps.getFile(NewConstants.CARDSFOLDER)));
|
||||
}
|
||||
return cardFactory;
|
||||
}
|
||||
@@ -553,7 +553,7 @@ public final class AllZone implements NewConstants {
|
||||
*/
|
||||
public static DeckManager getDeckManager() {
|
||||
if (deckManager == null) {
|
||||
deckManager = new DeckManager(ForgeProps.getFile(NEW_DECKS));
|
||||
deckManager = new DeckManager(ForgeProps.getFile(NewConstants.NEW_DECKS));
|
||||
}
|
||||
return deckManager;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ import forge.card.CardRules;
|
||||
import forge.card.CardRulesReader;
|
||||
import forge.card.trigger.TriggerHandler;
|
||||
import forge.error.ErrorViewer;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.view.FView;
|
||||
|
||||
/**
|
||||
@@ -42,7 +41,7 @@ import forge.view.FView;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CardReader implements Runnable, NewConstants {
|
||||
public class CardReader implements Runnable {
|
||||
// NOPMD by Braids on 8/18/11 10:55
|
||||
// PM
|
||||
private static final String CARD_FILE_DOT_EXTENSION = ".txt"; // NOPMD by
|
||||
|
||||
@@ -14,15 +14,15 @@ import forge.game.GameType;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public interface Constant {
|
||||
public final class Constant {
|
||||
/** Constant <code>ProgramName="Forge - http://cardforge.org"</code>. */
|
||||
String PROGRAM_NAME = "Forge - http://cardforge.org";
|
||||
public static final String PROGRAM_NAME = "Forge - http://cardforge.org";
|
||||
|
||||
// used to pass information between the GUI screens
|
||||
/**
|
||||
* The Class Runtime.
|
||||
*/
|
||||
public abstract class Runtime {
|
||||
public static class Runtime {
|
||||
|
||||
/** The Constant HumanDeck. */
|
||||
public static final Deck[] HUMAN_DECK = new Deck[1];
|
||||
@@ -110,52 +110,52 @@ public interface Constant {
|
||||
/**
|
||||
* The Interface Phase.
|
||||
*/
|
||||
public interface Phase {
|
||||
public static class Phase {
|
||||
|
||||
/** The Constant Untap. */
|
||||
String UNTAP = "Untap";
|
||||
public static final String UNTAP = "Untap";
|
||||
|
||||
/** The Constant Upkeep. */
|
||||
String UPKEEP = "Upkeep";
|
||||
public static final String UPKEEP = "Upkeep";
|
||||
|
||||
/** The Constant Draw. */
|
||||
String DRAW = "Draw";
|
||||
public static final String DRAW = "Draw";
|
||||
|
||||
/** The Constant Main1. */
|
||||
String MAIN1 = "Main1";
|
||||
public static final String MAIN1 = "Main1";
|
||||
|
||||
/** The Constant Combat_Begin. */
|
||||
String COMBAT_BEGIN = "BeginCombat";
|
||||
public static final String COMBAT_BEGIN = "BeginCombat";
|
||||
|
||||
/** The Constant Combat_Declare_Attackers. */
|
||||
String COMBAT_DECLARE_ATTACKERS = "Declare Attackers";
|
||||
public static final String COMBAT_DECLARE_ATTACKERS = "Declare Attackers";
|
||||
|
||||
/** The Constant Combat_Declare_Attackers_InstantAbility. */
|
||||
String COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY = "Declare Attackers - Play Instants and Abilities";
|
||||
public static final String COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY = "Declare Attackers - Play Instants and Abilities";
|
||||
|
||||
/** The Constant Combat_Declare_Blockers. */
|
||||
String COMBAT_DECLARE_BLOCKERS = "Declare Blockers";
|
||||
public static final String COMBAT_DECLARE_BLOCKERS = "Declare Blockers";
|
||||
|
||||
/** The Constant Combat_Declare_Blockers_InstantAbility. */
|
||||
String COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY = "Declare Blockers - Play Instants and Abilities";
|
||||
public static final String COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY = "Declare Blockers - Play Instants and Abilities";
|
||||
|
||||
/** The Constant Combat_Damage. */
|
||||
String COMBAT_DAMAGE = "Combat Damage";
|
||||
public static final String COMBAT_DAMAGE = "Combat Damage";
|
||||
|
||||
/** The Constant Combat_FirstStrikeDamage. */
|
||||
String COMBAT_FIRST_STRIKE_DAMAGE = "First Strike Damage";
|
||||
public static final String COMBAT_FIRST_STRIKE_DAMAGE = "First Strike Damage";
|
||||
|
||||
/** The Constant Combat_End. */
|
||||
String COMBAT_END = "EndCombat";
|
||||
public static final String COMBAT_END = "EndCombat";
|
||||
|
||||
/** The Constant Main2. */
|
||||
String MAIN2 = "Main2";
|
||||
public static final String MAIN2 = "Main2";
|
||||
|
||||
/** The Constant End_Of_Turn. */
|
||||
String END_OF_TURN = "End of Turn";
|
||||
public static final String END_OF_TURN = "End of Turn";
|
||||
|
||||
/** The Constant Cleanup. */
|
||||
String CLEANUP = "Cleanup";
|
||||
public static final String CLEANUP = "Cleanup";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,122 +226,122 @@ public interface Constant {
|
||||
/**
|
||||
* The Interface Color.
|
||||
*/
|
||||
public interface Color {
|
||||
public static class Color {
|
||||
|
||||
/** The Black. */
|
||||
String BLACK = "black";
|
||||
public static final String BLACK = "black";
|
||||
|
||||
/** The Blue. */
|
||||
String BLUE = "blue";
|
||||
public static final String BLUE = "blue";
|
||||
|
||||
/** The Green. */
|
||||
String GREEN = "green";
|
||||
public static final String GREEN = "green";
|
||||
|
||||
/** The Red. */
|
||||
String RED = "red";
|
||||
public static final String RED = "red";
|
||||
|
||||
/** The White. */
|
||||
String WHITE = "white";
|
||||
public static final String WHITE = "white";
|
||||
|
||||
/** The Colorless. */
|
||||
String COLORLESS = "colorless";
|
||||
public static final String COLORLESS = "colorless";
|
||||
// color order "wubrg"
|
||||
/** The Colors. */
|
||||
String[] COLORS = { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS };
|
||||
public static final String[] COLORS = { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS };
|
||||
|
||||
/** The only colors. */
|
||||
String[] ONLY_COLORS = { WHITE, BLUE, BLACK, RED, GREEN };
|
||||
public static final String[] ONLY_COLORS = { WHITE, BLUE, BLACK, RED, GREEN };
|
||||
|
||||
/** The Snow. */
|
||||
String SNOW = "snow";
|
||||
public static final String SNOW = "snow";
|
||||
|
||||
/** The Mana colors. */
|
||||
String[] MANA_COLORS = { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS, SNOW };
|
||||
public static final String[] MANA_COLORS = { WHITE, BLUE, BLACK, RED, GREEN, COLORLESS, SNOW };
|
||||
|
||||
/** The loaded. */
|
||||
boolean[] LOADED = { false };
|
||||
public static final boolean[] LOADED = { false };
|
||||
// public static final Constant_StringHashMap[] LandColor = new
|
||||
// Constant_StringHashMap[1];
|
||||
|
||||
/** The Basic lands. */
|
||||
String[] BASIC_LANDS = { "Plains", "Island", "Swamp", "Mountain", "Forest" };
|
||||
public static final String[] BASIC_LANDS = { "Plains", "Island", "Swamp", "Mountain", "Forest" };
|
||||
}
|
||||
|
||||
/**
|
||||
* The Interface Quest.
|
||||
*/
|
||||
public interface Quest {
|
||||
public static class Quest {
|
||||
|
||||
/** The fantasy quest. */
|
||||
boolean[] FANTASY_QUEST = new boolean[1];
|
||||
public static final boolean[] FANTASY_QUEST = new boolean[1];
|
||||
|
||||
// public static final Quest_Assignment[] qa = new Quest_Assignment[1];
|
||||
|
||||
/** The human list. */
|
||||
CardList[] HUMAN_LIST = new CardList[1];
|
||||
public static final CardList[] HUMAN_LIST = new CardList[1];
|
||||
|
||||
/** The computer list. */
|
||||
CardList[] COMPUTER_LIST = new CardList[1];
|
||||
public static final CardList[] COMPUTER_LIST = new CardList[1];
|
||||
|
||||
/** The human life. */
|
||||
int[] HUMAN_LIFE = new int[1];
|
||||
public static final int[] HUMAN_LIFE = new int[1];
|
||||
|
||||
/** The computer life. */
|
||||
int[] COMPUTER_LIFE = new int[1];
|
||||
public static final int[] COMPUTER_LIFE = new int[1];
|
||||
|
||||
/** The opp icon name. */
|
||||
String[] OPP_ICON_NAME = new String[1];
|
||||
public static final String[] OPP_ICON_NAME = new String[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* The Interface CardTypes.
|
||||
*/
|
||||
public interface CardTypes {
|
||||
public static class CardTypes {
|
||||
|
||||
/** The loaded. */
|
||||
boolean[] LOADED = { false };
|
||||
public static final boolean[] LOADED = { false };
|
||||
|
||||
/** The card types. */
|
||||
ConstantStringArrayList[] CARD_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] CARD_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The super types. */
|
||||
ConstantStringArrayList[] SUPER_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] SUPER_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The basic types. */
|
||||
ConstantStringArrayList[] BASIC_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] BASIC_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The land types. */
|
||||
ConstantStringArrayList[] LAND_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] LAND_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The creature types. */
|
||||
ConstantStringArrayList[] CREATURE_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] CREATURE_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The instant types. */
|
||||
ConstantStringArrayList[] INSTANT_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] INSTANT_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The sorcery types. */
|
||||
ConstantStringArrayList[] SORCERY_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] SORCERY_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The enchantment types. */
|
||||
ConstantStringArrayList[] ENCHANTMENT_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] ENCHANTMENT_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The artifact types. */
|
||||
ConstantStringArrayList[] ARTIFACT_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] ARTIFACT_TYPES = new ConstantStringArrayList[1];
|
||||
|
||||
/** The walker types. */
|
||||
ConstantStringArrayList[] WALKER_TYPES = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] WALKER_TYPES = new ConstantStringArrayList[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* The Interface Keywords.
|
||||
*/
|
||||
public interface Keywords {
|
||||
public static class Keywords {
|
||||
|
||||
/** The loaded. */
|
||||
boolean[] LOADED = { false };
|
||||
public static final boolean[] LOADED = { false };
|
||||
|
||||
/** The Non stacking list. */
|
||||
ConstantStringArrayList[] NON_STACKING_LIST = new ConstantStringArrayList[1];
|
||||
public static final ConstantStringArrayList[] NON_STACKING_LIST = new ConstantStringArrayList[1];
|
||||
}
|
||||
|
||||
} // Constant
|
||||
|
||||
@@ -23,7 +23,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CopyFiles extends SwingWorker<Void, Integer> implements NewConstants {
|
||||
public class CopyFiles extends SwingWorker<Void, Integer> {
|
||||
|
||||
private final List<File> fileList;
|
||||
|
||||
|
||||
@@ -93,6 +93,10 @@ import forge.item.CardPrinted;
|
||||
import forge.properties.ForgePreferences;
|
||||
import forge.properties.ForgeProps;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.properties.NewConstants.Lang.GuiDisplay.ComputerHand;
|
||||
import forge.properties.NewConstants.Lang.GuiDisplay.ComputerLibrary;
|
||||
import forge.properties.NewConstants.Lang.GuiDisplay.HumanHand;
|
||||
import forge.properties.NewConstants.Lang.GuiDisplay.HumanLibrary;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -102,8 +106,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class GuiDisplay extends JFrame implements CardContainer, Display, NewConstants, NewConstants.Gui.GuiDisplay,
|
||||
NewConstants.Lang.GuiDisplay {
|
||||
public class GuiDisplay extends JFrame implements CardContainer, Display {
|
||||
/** Constant <code>serialVersionUID=4519302185194841060L</code>. */
|
||||
private static final long serialVersionUID = 4519302185194841060L;
|
||||
|
||||
@@ -177,9 +180,9 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
* </p>
|
||||
*/
|
||||
private void setupActions() {
|
||||
humanGraveyardAction = new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Graveyard), HUMAN_GRAVEYARD);
|
||||
humanRemovedACtion = new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Exile), HUMAN_REMOVED);
|
||||
humanFlashbackAction = new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Graveyard), HUMAN_FLASHBACK) {
|
||||
humanGraveyardAction = new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Graveyard), NewConstants.Lang.GuiDisplay.HUMAN_GRAVEYARD);
|
||||
humanRemovedACtion = new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Exile), NewConstants.Lang.GuiDisplay.HUMAN_REMOVED);
|
||||
humanFlashbackAction = new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Graveyard), NewConstants.Lang.GuiDisplay.HUMAN_FLASHBACK) {
|
||||
|
||||
private static final long serialVersionUID = 8120331222693706164L;
|
||||
|
||||
@@ -195,11 +198,11 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
}
|
||||
};
|
||||
computerGraveyardAction = new ZoneAction(AllZone.getComputerPlayer().getZone(Zone.Graveyard),
|
||||
COMPUTER_GRAVEYARD);
|
||||
computerRemovedAction = new ZoneAction(AllZone.getComputerPlayer().getZone(Zone.Exile), COMPUTER_REMOVED);
|
||||
NewConstants.Lang.GuiDisplay.COMPUTER_GRAVEYARD);
|
||||
computerRemovedAction = new ZoneAction(AllZone.getComputerPlayer().getZone(Zone.Exile), NewConstants.Lang.GuiDisplay.COMPUTER_REMOVED);
|
||||
concedeAction = new ConcedeAction();
|
||||
|
||||
humanDecklistAction = new DeckListAction(HUMAN_DECKLIST);
|
||||
humanDecklistAction = new DeckListAction(NewConstants.Lang.GuiDisplay.HUMAN_DECKLIST);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -216,7 +219,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
computerGraveyardAction, computerRemovedAction, new JSeparator(), playsoundCheckboxForMenu,
|
||||
new JSeparator(), ErrorViewer.ALL_THREADS_ACTION, concedeAction };
|
||||
|
||||
JMenu gameMenu = new JMenu(ForgeProps.getLocalized(MenuBar.Menu.TITLE));
|
||||
JMenu gameMenu = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.GuiDisplay.MenuBar.Menu.TITLE));
|
||||
for (Object o : obj) {
|
||||
if (o instanceof ForgeAction) {
|
||||
gameMenu.add(((ForgeAction) o).setupButton(new JMenuItem()));
|
||||
@@ -230,7 +233,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
}
|
||||
|
||||
// Phase Menu Creation
|
||||
JMenu gamePhases = new JMenu(ForgeProps.getLocalized(MenuBar.PHASE.TITLE));
|
||||
JMenu gamePhases = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.GuiDisplay.MenuBar.PHASE.TITLE));
|
||||
|
||||
JMenuItem aiLabel = new JMenuItem("Computer");
|
||||
JMenuItem humanLabel = new JMenuItem("Human");
|
||||
@@ -244,7 +247,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
}
|
||||
|
||||
// Dev Mode Creation
|
||||
JMenu devMenu = new JMenu(ForgeProps.getLocalized(MenuBar.DEV.TITLE));
|
||||
JMenu devMenu = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.GuiDisplay.MenuBar.DEV.TITLE));
|
||||
|
||||
devMenu.setEnabled(Constant.Runtime.DEV_MODE[0]);
|
||||
|
||||
@@ -256,7 +259,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
ComputerLibrary.BASE);
|
||||
Action viewHumanLibrary
|
||||
= new ZoneAction(AllZone.getHumanPlayer().getZone(Zone.Library), HumanLibrary.BASE);
|
||||
ForgeAction generateMana = new ForgeAction(MANAGEN) {
|
||||
ForgeAction generateMana = new ForgeAction(NewConstants.Lang.GuiDisplay.MANAGEN) {
|
||||
private static final long serialVersionUID = 7171104690016706405L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -265,7 +268,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
};
|
||||
|
||||
// + Battlefield setup +
|
||||
ForgeAction setupBattleField = new ForgeAction(SETUPBATTLEFIELD) {
|
||||
ForgeAction setupBattleField = new ForgeAction(NewConstants.Lang.GuiDisplay.SETUPBATTLEFIELD) {
|
||||
private static final long serialVersionUID = -6660930759092583160L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -275,7 +278,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
// - Battlefield setup -
|
||||
|
||||
// DevMode Tutor
|
||||
ForgeAction tutor = new ForgeAction(TUTOR) {
|
||||
ForgeAction tutor = new ForgeAction(NewConstants.Lang.GuiDisplay.TUTOR) {
|
||||
private static final long serialVersionUID = 2003222642609217705L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -285,7 +288,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
// end DevMode Tutor
|
||||
|
||||
// DevMode AddCounter
|
||||
ForgeAction addCounter = new ForgeAction(ADDCOUNTER) {
|
||||
ForgeAction addCounter = new ForgeAction(NewConstants.Lang.GuiDisplay.ADDCOUNTER) {
|
||||
private static final long serialVersionUID = 3136264111882855268L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -295,7 +298,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
// end DevMode AddCounter
|
||||
|
||||
// DevMode Tap
|
||||
ForgeAction tapPerm = new ForgeAction(TAPPERM) {
|
||||
ForgeAction tapPerm = new ForgeAction(NewConstants.Lang.GuiDisplay.TAPPERM) {
|
||||
private static final long serialVersionUID = -6092045653540313527L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -305,7 +308,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
// end DevMode Tap
|
||||
|
||||
// DevMode Untap
|
||||
ForgeAction untapPerm = new ForgeAction(UNTAPPERM) {
|
||||
ForgeAction untapPerm = new ForgeAction(NewConstants.Lang.GuiDisplay.UNTAPPERM) {
|
||||
private static final long serialVersionUID = 5425291996157256656L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -315,7 +318,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
// end DevMode Untap
|
||||
|
||||
// DevMode UnlimitedLand
|
||||
ForgeAction unlimitedLand = new ForgeAction(NOLANDLIMIT) {
|
||||
ForgeAction unlimitedLand = new ForgeAction(NewConstants.Lang.GuiDisplay.NOLANDLIMIT) {
|
||||
private static final long serialVersionUID = 2184353891062202796L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -325,7 +328,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
// end DevMode UnlimitedLand
|
||||
|
||||
// DevMode SetLife
|
||||
ForgeAction setLife = new ForgeAction(SETLIFE) {
|
||||
ForgeAction setLife = new ForgeAction(NewConstants.Lang.GuiDisplay.SETLIFE) {
|
||||
private static final long serialVersionUID = -1750588303928974918L;
|
||||
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
@@ -674,7 +677,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
AllZone.getComputerPlayer().updateObservers();
|
||||
|
||||
if (AllZone.getQuestData() != null) {
|
||||
File base = ForgeProps.getFile(IMAGE_ICON);
|
||||
File base = ForgeProps.getFile(NewConstants.IMAGE_ICON);
|
||||
String iconName = "";
|
||||
if (Constant.Quest.OPP_ICON_NAME[0] != null) {
|
||||
iconName = Constant.Quest.OPP_ICON_NAME[0];
|
||||
@@ -860,7 +863,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
*/
|
||||
private void initComponents() {
|
||||
// Preparing the Frame
|
||||
setTitle(ForgeProps.getLocalized(Lang.PROGRAM_NAME));
|
||||
setTitle(ForgeProps.getLocalized(NewConstants.Lang.PROGRAM_NAME));
|
||||
if (!Singletons.getModel().getPreferences().isLafFonts()) {
|
||||
setFont(new Font("Times New Roman", 0, 16));
|
||||
}
|
||||
@@ -882,7 +885,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
|
||||
// Write the layout to the new file, usually
|
||||
// res/gui/display_new_layout.xml
|
||||
File f = ForgeProps.getFile(LAYOUT_NEW);
|
||||
File f = ForgeProps.getFile(NewConstants.Gui.GuiDisplay.LAYOUT_NEW);
|
||||
|
||||
Node layout = pane.getMultiSplitLayout().getModel();
|
||||
|
||||
@@ -914,7 +917,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
|
||||
// Try to load the latest saved layout, usually
|
||||
// res/gui/display_new_layout.xml
|
||||
final File file = ForgeProps.getFile(LAYOUT_NEW);
|
||||
final File file = ForgeProps.getFile(NewConstants.Gui.GuiDisplay.LAYOUT_NEW);
|
||||
|
||||
try {
|
||||
model = loadModel(xstream, file);
|
||||
@@ -950,7 +953,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
|
||||
if (model == null) {
|
||||
System.err.println("XMLDecoder failed; using default layout.");
|
||||
final File defaultFile = ForgeProps.getFile(LAYOUT);
|
||||
final File defaultFile = ForgeProps.getFile(NewConstants.Gui.GuiDisplay.LAYOUT);
|
||||
|
||||
try {
|
||||
model = loadModel(xstream, defaultFile);
|
||||
@@ -1231,7 +1234,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
oppIconLifePanel.add(oppLifeLabel);
|
||||
|
||||
JPanel oppPanel = new JPanel();
|
||||
oppPanel.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(COMPUTER_TITLE)));
|
||||
oppPanel.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(NewConstants.Lang.GuiDisplay.COMPUTER_TITLE)));
|
||||
oppPanel.setLayout(new BorderLayout());
|
||||
oppPanel.add(oppNumbersPanel, BorderLayout.WEST);
|
||||
// oppPanel.add(oppIconLabel, BorderLayout.CENTER);
|
||||
@@ -1261,7 +1264,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
|
||||
JScrollPane combatPane = new JScrollPane(combatArea);
|
||||
|
||||
combatPane.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(COMBAT)));
|
||||
combatPane.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(NewConstants.Lang.GuiDisplay.COMBAT)));
|
||||
pane.add(new ExternalPanel(combatPane), "combat");
|
||||
}
|
||||
|
||||
@@ -1342,7 +1345,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
playerNumbersPanel.add(playerFBValue);
|
||||
|
||||
JPanel playerPanel = new JPanel();
|
||||
playerPanel.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(HUMAN_TITLE)));
|
||||
playerPanel.setBorder(new TitledBorder(new EtchedBorder(), ForgeProps.getLocalized(NewConstants.Lang.GuiDisplay.HUMAN_TITLE)));
|
||||
playerPanel.setLayout(new BorderLayout());
|
||||
playerPanel.add(playerNumbersPanel, BorderLayout.WEST);
|
||||
playerPanel.add(playerLifeLabel, BorderLayout.EAST);
|
||||
@@ -1647,7 +1650,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
private static final long serialVersionUID = -6976695235601916762L;
|
||||
|
||||
public ConcedeAction() {
|
||||
super(CONCEDE);
|
||||
super(NewConstants.Lang.GuiDisplay.CONCEDE);
|
||||
}
|
||||
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -1723,7 +1726,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
public TriggerReactionMenu() {
|
||||
super();
|
||||
|
||||
ForgeAction actAccept = new ForgeAction(Lang.GuiDisplay.Trigger.ALWAYSACCEPT) {
|
||||
ForgeAction actAccept = new ForgeAction(NewConstants.Lang.GuiDisplay.Trigger.ALWAYSACCEPT) {
|
||||
private static final long serialVersionUID = -3734674058185367612L;
|
||||
|
||||
@Override
|
||||
@@ -1732,7 +1735,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
}
|
||||
};
|
||||
|
||||
ForgeAction actDecline = new ForgeAction(Lang.GuiDisplay.Trigger.ALWAYSDECLINE) {
|
||||
ForgeAction actDecline = new ForgeAction(NewConstants.Lang.GuiDisplay.Trigger.ALWAYSDECLINE) {
|
||||
private static final long serialVersionUID = -1983295769159971502L;
|
||||
|
||||
@Override
|
||||
@@ -1741,7 +1744,7 @@ public class GuiDisplay extends JFrame implements CardContainer, Display, NewCon
|
||||
}
|
||||
};
|
||||
|
||||
ForgeAction actAsk = new ForgeAction(Lang.GuiDisplay.Trigger.ALWAYSASK) {
|
||||
ForgeAction actAsk = new ForgeAction(NewConstants.Lang.GuiDisplay.Trigger.ALWAYSASK) {
|
||||
private static final long serialVersionUID = 5045255351332940821L;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,6 @@ import forge.card.mana.ManaPool;
|
||||
import forge.card.spellability.AbilityMana;
|
||||
import forge.gui.GuiUtils;
|
||||
import forge.gui.game.CardPanel;
|
||||
import forge.properties.NewConstants;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -41,7 +40,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class GuiDisplayUtil implements NewConstants {
|
||||
public final class GuiDisplayUtil {
|
||||
|
||||
private GuiDisplayUtil() {
|
||||
throw new AssertionError();
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.List;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import forge.properties.ForgeProps;
|
||||
import forge.properties.NewConstants;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -41,10 +42,10 @@ public class GuiDownloadPicturesLQ extends GuiDownloader {
|
||||
*/
|
||||
protected final DownloadObject[] getNeededImages() {
|
||||
// read token names and urls
|
||||
DownloadObject[] cardTokenLQ = readFileWithNames(TOKEN_IMAGES, ForgeProps.getFile(IMAGE_TOKEN));
|
||||
DownloadObject[] cardTokenLQ = readFileWithNames(NewConstants.TOKEN_IMAGES, ForgeProps.getFile(NewConstants.IMAGE_TOKEN));
|
||||
ArrayList<DownloadObject> cList = new ArrayList<DownloadObject>();
|
||||
|
||||
String base = ForgeProps.getFile(IMAGE_BASE).getPath();
|
||||
String base = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath();
|
||||
for (Card c : AllZone.getCardFactory()) {
|
||||
cList.addAll(createDLObjects(c, base));
|
||||
if (c.hasAlternateState()) {
|
||||
@@ -67,7 +68,7 @@ public class GuiDownloadPicturesLQ extends GuiDownloader {
|
||||
}
|
||||
|
||||
// add missing tokens to the list of things to download
|
||||
File filebase = ForgeProps.getFile(IMAGE_TOKEN);
|
||||
File filebase = ForgeProps.getFile(NewConstants.IMAGE_TOKEN);
|
||||
for (int i = 0; i < cardTokenLQ.length; i++) {
|
||||
file = new File(filebase, cardTokenLQ[i].getName());
|
||||
if (!file.exists()) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
import forge.properties.ForgeProps;
|
||||
import forge.properties.NewConstants;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -40,14 +41,14 @@ public class GuiDownloadQuestImages extends GuiDownloader {
|
||||
*/
|
||||
protected final DownloadObject[] getNeededImages() {
|
||||
// read all card names and urls
|
||||
DownloadObject[] questOpponents = readFile(Quest.OPPONENT_ICONS, ForgeProps.getFile(Quest.OPPONENT_DIR));
|
||||
DownloadObject[] boosterImages = readFile(PICS_BOOSTER_IMAGES, ForgeProps.getFile(PICS_BOOSTER));
|
||||
DownloadObject[] petIcons = readFileWithNames(Quest.PET_SHOP_ICONS, ForgeProps.getFile(IMAGE_ICON));
|
||||
DownloadObject[] questPets = readFileWithNames(Quest.PET_TOKEN_IMAGES, ForgeProps.getFile(IMAGE_TOKEN));
|
||||
DownloadObject[] questOpponents = readFile(NewConstants.Quest.OPPONENT_ICONS, ForgeProps.getFile(NewConstants.Quest.OPPONENT_DIR));
|
||||
DownloadObject[] boosterImages = readFile(NewConstants.PICS_BOOSTER_IMAGES, ForgeProps.getFile(NewConstants.PICS_BOOSTER));
|
||||
DownloadObject[] petIcons = readFileWithNames(NewConstants.Quest.PET_SHOP_ICONS, ForgeProps.getFile(NewConstants.IMAGE_ICON));
|
||||
DownloadObject[] questPets = readFileWithNames(NewConstants.Quest.PET_TOKEN_IMAGES, ForgeProps.getFile(NewConstants.IMAGE_TOKEN));
|
||||
ArrayList<DownloadObject> urls = new ArrayList<DownloadObject>();
|
||||
|
||||
File file;
|
||||
File dir = ForgeProps.getFile(Quest.OPPONENT_DIR);
|
||||
File dir = ForgeProps.getFile(NewConstants.Quest.OPPONENT_DIR);
|
||||
for (int i = 0; i < questOpponents.length; i++) {
|
||||
file = new File(dir, questOpponents[i].getName().replace("%20", " "));
|
||||
if (!file.exists()) {
|
||||
@@ -55,7 +56,7 @@ public class GuiDownloadQuestImages extends GuiDownloader {
|
||||
}
|
||||
}
|
||||
|
||||
dir = ForgeProps.getFile(PICS_BOOSTER);
|
||||
dir = ForgeProps.getFile(NewConstants.PICS_BOOSTER);
|
||||
for (int i = 0; i < boosterImages.length; i++) {
|
||||
file = new File(dir, boosterImages[i].getName().replace("%20", " "));
|
||||
if (!file.exists()) {
|
||||
@@ -63,7 +64,7 @@ public class GuiDownloadQuestImages extends GuiDownloader {
|
||||
}
|
||||
}
|
||||
|
||||
dir = ForgeProps.getFile(IMAGE_ICON);
|
||||
dir = ForgeProps.getFile(NewConstants.IMAGE_ICON);
|
||||
for (int i = 0; i < petIcons.length; i++) {
|
||||
file = new File(dir, petIcons[i].getName().replace("%20", " "));
|
||||
if (!file.exists()) {
|
||||
@@ -71,7 +72,7 @@ public class GuiDownloadQuestImages extends GuiDownloader {
|
||||
}
|
||||
}
|
||||
|
||||
dir = ForgeProps.getFile(IMAGE_TOKEN);
|
||||
dir = ForgeProps.getFile(NewConstants.IMAGE_TOKEN);
|
||||
for (int i = 0; i < questPets.length; i++) {
|
||||
file = new File(dir, questPets[i].getName().replace("%20", " "));
|
||||
if (!file.exists()) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import forge.card.CardSet;
|
||||
import forge.item.CardDb;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.properties.ForgeProps;
|
||||
import forge.properties.NewConstants;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -45,10 +46,10 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader {
|
||||
*/
|
||||
protected final DownloadObject[] getNeededImages() {
|
||||
// read token names and urls
|
||||
DownloadObject[] cardTokenLQ = readFileWithNames(TOKEN_IMAGES, ForgeProps.getFile(IMAGE_TOKEN));
|
||||
DownloadObject[] cardTokenLQ = readFileWithNames(NewConstants.TOKEN_IMAGES, ForgeProps.getFile(NewConstants.IMAGE_TOKEN));
|
||||
ArrayList<DownloadObject> cList = new ArrayList<DownloadObject>();
|
||||
|
||||
File base = ForgeProps.getFile(IMAGE_BASE);
|
||||
File base = ForgeProps.getFile(NewConstants.IMAGE_BASE);
|
||||
String urlBase = "http://cardforge.org/fpics/";
|
||||
for (CardPrinted c : CardDb.instance().getAllCards()) {
|
||||
String setCode3 = c.getSet();
|
||||
@@ -72,7 +73,7 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader {
|
||||
|
||||
// add missing tokens to the list of things to download
|
||||
File file;
|
||||
File filebase = ForgeProps.getFile(IMAGE_TOKEN);
|
||||
File filebase = ForgeProps.getFile(NewConstants.IMAGE_TOKEN);
|
||||
for (int i = 0; i < cardTokenLQ.length; i++) {
|
||||
file = new File(filebase, cardTokenLQ[i].getName());
|
||||
if (!file.exists()) {
|
||||
|
||||
@@ -53,8 +53,7 @@ import forge.properties.NewConstants;
|
||||
*
|
||||
* @author Forge
|
||||
*/
|
||||
public abstract class GuiDownloader extends DefaultBoundedRangeModel implements Runnable, NewConstants,
|
||||
NewConstants.Lang.GuiDownloadPictures {
|
||||
public abstract class GuiDownloader extends DefaultBoundedRangeModel implements Runnable {
|
||||
|
||||
private static final long serialVersionUID = -8596808503046590349L;
|
||||
|
||||
@@ -141,12 +140,12 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
cards = getNeededImages();
|
||||
|
||||
if (cards.length == 0) {
|
||||
JOptionPane.showMessageDialog(frame, ForgeProps.getLocalized(NO_MORE));
|
||||
JOptionPane.showMessageDialog(frame, ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.NO_MORE));
|
||||
return;
|
||||
}
|
||||
|
||||
addr = new JTextField(ForgeProps.getLocalized(PROXY_ADDRESS));
|
||||
port = new JTextField(ForgeProps.getLocalized(PROXY_PORT));
|
||||
addr = new JTextField(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.PROXY_ADDRESS));
|
||||
port = new JTextField(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.PROXY_PORT));
|
||||
bar = new JProgressBar(this);
|
||||
|
||||
JPanel p0 = new JPanel();
|
||||
@@ -154,8 +153,8 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
|
||||
// Proxy Choice
|
||||
ButtonGroup bg = new ButtonGroup();
|
||||
String[] labels = { ForgeProps.getLocalized(NO_PROXY), ForgeProps.getLocalized(HTTP_PROXY),
|
||||
ForgeProps.getLocalized(SOCKS_PROXY) };
|
||||
String[] labels = { ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.NO_PROXY), ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.HTTP_PROXY),
|
||||
ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.SOCKS_PROXY) };
|
||||
for (int i = 0; i < TYPES.length; i++) {
|
||||
JRadioButton rb = new JRadioButton(labels[i]);
|
||||
rb.addChangeListener(new ProxyHandler(i));
|
||||
@@ -171,7 +170,7 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
p0.add(port);
|
||||
|
||||
// Start
|
||||
final JButton b = new JButton(ForgeProps.getLocalized(Buttons.START));
|
||||
final JButton b = new JButton(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Buttons.START));
|
||||
b.addActionListener(new ActionListener() {
|
||||
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -194,7 +193,7 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
bar.setPreferredSize(d);
|
||||
|
||||
// JOptionPane
|
||||
close = new JButton(ForgeProps.getLocalized(Buttons.CANCEL));
|
||||
close = new JButton(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Buttons.CANCEL));
|
||||
Object[] options = { b, close };
|
||||
dlg = new JOptionPane(p0, DEFAULT_OPTION, PLAIN_MESSAGE, null, options, options[1]);
|
||||
|
||||
@@ -288,7 +287,7 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
sb.append(String.format("0:%02d remaining.", t2Go / 1000));
|
||||
}
|
||||
} else {
|
||||
sb.append(String.format(ForgeProps.getLocalized(BAR_CLOSE), card, cards.length));
|
||||
sb.append(String.format(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.BAR_CLOSE), card, cards.length));
|
||||
}
|
||||
|
||||
bar.setString(sb.toString());
|
||||
@@ -308,7 +307,7 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
* @return a {@link javax.swing.JDialog} object.
|
||||
*/
|
||||
private JDialog getDlg(final JFrame frame) {
|
||||
final JDialog dlg = this.dlg.createDialog(frame, ForgeProps.getLocalized(TITLE));
|
||||
final JDialog dlg = this.dlg.createDialog(frame, ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.TITLE));
|
||||
close.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
dlg.setVisible(false);
|
||||
@@ -348,7 +347,7 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
p = new Proxy(TYPES[type], new InetSocketAddress(addr.getText(), parseInt(port.getText())));
|
||||
} catch (Exception ex) {
|
||||
ErrorViewer
|
||||
.showError(ex, ForgeProps.getLocalized(Errors.PROXY_CONNECT), addr.getText(), port.getText());
|
||||
.showError(ex, ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Errors.PROXY_CONNECT), addr.getText(), port.getText());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -417,7 +416,7 @@ public abstract class GuiDownloader extends DefaultBoundedRangeModel implements
|
||||
}
|
||||
} // for
|
||||
}
|
||||
close.setText(ForgeProps.getLocalized(Buttons.CLOSE));
|
||||
close.setText(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Buttons.CLOSE));
|
||||
} // run
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class GuiImportPicture extends JDialog implements NewConstants {
|
||||
public class GuiImportPicture extends JDialog {
|
||||
/** Constant <code>serialVersionUID=-4191539152208389089L</code>. */
|
||||
private static final long serialVersionUID = -4191539152208389089L;
|
||||
private JPanel jContentPane = null;
|
||||
@@ -110,7 +110,7 @@ public class GuiImportPicture extends JDialog implements NewConstants {
|
||||
jLabelHDDFree = new JLabel();
|
||||
jLabelHDDFree.setBounds(new Rectangle(15, 119, 177, 16));
|
||||
|
||||
File file = ForgeProps.getFile(IMAGE_BASE);
|
||||
File file = ForgeProps.getFile(NewConstants.IMAGE_BASE);
|
||||
|
||||
long freeSpace = file.getFreeSpace();
|
||||
freeSpaceM = freeSpace / 1024 / 1024;
|
||||
@@ -200,7 +200,7 @@ public class GuiImportPicture extends JDialog implements NewConstants {
|
||||
start = fName.indexOf("full");
|
||||
fName = fName.substring(0, start - 1) + fName.substring(start + 4, fName.length() - 4);
|
||||
fName = GuiDisplayUtil.cleanString(fName) + ".jpg";
|
||||
File file = new File(ForgeProps.getFile(IMAGE_BASE), fName);
|
||||
File file = new File(ForgeProps.getFile(NewConstants.IMAGE_BASE), fName);
|
||||
if (!file.exists()) {
|
||||
filesForCopy = filesForCopy + 1;
|
||||
filesToCopySize = filesToCopySize + listFiles.get(i).length();
|
||||
@@ -294,7 +294,7 @@ public class GuiImportPicture extends JDialog implements NewConstants {
|
||||
start = fName.indexOf("full");
|
||||
fName = fName.substring(0, start - 1) + fName.substring(start + 4, fName.length() - 4);
|
||||
fName = GuiDisplayUtil.cleanString(fName) + ".jpg";
|
||||
File file = new File(ForgeProps.getFile(IMAGE_BASE), fName);
|
||||
File file = new File(ForgeProps.getFile(NewConstants.IMAGE_BASE), fName);
|
||||
if (!file.exists()) {
|
||||
filesForCopy = filesForCopy + 1;
|
||||
filesToCopySize = filesToCopySize + listFiles.get(i).length();
|
||||
|
||||
@@ -52,8 +52,7 @@ import forge.properties.NewConstants.Lang.GuiDownloadPictures;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class GuiMigrateLocalMWSSetPicturesHQ extends DefaultBoundedRangeModel implements Runnable,
|
||||
NewConstants, NewConstants.Lang.GuiDownloadPictures {
|
||||
public final class GuiMigrateLocalMWSSetPicturesHQ extends DefaultBoundedRangeModel implements Runnable {
|
||||
|
||||
/** Constant <code>serialVersionUID=-7890794857949935256L</code>. */
|
||||
private static final long serialVersionUID = -7890794857949935256L;
|
||||
@@ -181,7 +180,7 @@ public final class GuiMigrateLocalMWSSetPicturesHQ extends DefaultBoundedRangeMo
|
||||
this.bar.setPreferredSize(d);
|
||||
|
||||
// JOptionPane
|
||||
this.close = new JButton(ForgeProps.getLocalized(Buttons.CANCEL));
|
||||
this.close = new JButton(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Buttons.CANCEL));
|
||||
final Object[] options = { b, this.close };
|
||||
this.dlg = new JOptionPane(p0, JOptionPane.DEFAULT_OPTION,
|
||||
JOptionPane.PLAIN_MESSAGE, null, options, options[1]);
|
||||
@@ -342,7 +341,7 @@ public final class GuiMigrateLocalMWSSetPicturesHQ extends DefaultBoundedRangeMo
|
||||
p = new Proxy(GuiMigrateLocalMWSSetPicturesHQ.TYPES[this.type], new InetSocketAddress(
|
||||
this.addr.getText(), Integer.parseInt(this.port.getText())));
|
||||
} catch (final Exception ex) {
|
||||
ErrorViewer.showError(ex, ForgeProps.getLocalized(Errors.PROXY_CONNECT), this.addr.getText(),
|
||||
ErrorViewer.showError(ex, ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Errors.PROXY_CONNECT), this.addr.getText(),
|
||||
this.port.getText());
|
||||
// throw new
|
||||
// RuntimeException("Gui_DownloadPictures : error 1 - " +ex);
|
||||
@@ -427,7 +426,7 @@ public final class GuiMigrateLocalMWSSetPicturesHQ extends DefaultBoundedRangeMo
|
||||
}
|
||||
} // for
|
||||
}
|
||||
this.close.setText(ForgeProps.getLocalized(Buttons.CLOSE));
|
||||
this.close.setText(ForgeProps.getLocalized(NewConstants.Lang.GuiDownloadPictures.Buttons.CLOSE));
|
||||
} // run
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,7 +41,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ImageCache implements NewConstants {
|
||||
public class ImageCache {
|
||||
/** Constant <code>imageCache</code>. */
|
||||
private static final Map<String, BufferedImage> IMAGE_CACHE;
|
||||
/** Constant <code>FULL_SIZE</code>. */
|
||||
@@ -88,9 +88,9 @@ public class ImageCache implements NewConstants {
|
||||
File path;
|
||||
if (key.endsWith(TOKEN)) {
|
||||
key = key.substring(0, key.length() - TOKEN.length());
|
||||
path = ForgeProps.getFile(IMAGE_TOKEN);
|
||||
path = ForgeProps.getFile(NewConstants.IMAGE_TOKEN);
|
||||
} else {
|
||||
path = ForgeProps.getFile(IMAGE_BASE);
|
||||
path = ForgeProps.getFile(NewConstants.IMAGE_BASE);
|
||||
}
|
||||
|
||||
File file = null;
|
||||
|
||||
@@ -19,7 +19,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class MenuItemHowToPlay extends JMenuItem implements NewConstants.Lang.HowTo {
|
||||
public class MenuItemHowToPlay extends JMenuItem {
|
||||
/** Constant <code>serialVersionUID=5552000208438248428L</code>. */
|
||||
private static final long serialVersionUID = 5552000208438248428L;
|
||||
|
||||
@@ -29,11 +29,11 @@ public class MenuItemHowToPlay extends JMenuItem implements NewConstants.Lang.Ho
|
||||
* </p>
|
||||
*/
|
||||
public MenuItemHowToPlay() {
|
||||
super(ForgeProps.getLocalized(TITLE));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.HowTo.TITLE));
|
||||
|
||||
this.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(final ActionEvent a) {
|
||||
String text = ForgeProps.getLocalized(MESSAGE);
|
||||
String text = ForgeProps.getLocalized(NewConstants.Lang.HowTo.MESSAGE);
|
||||
|
||||
JTextArea area = new JTextArea(text, 25, 40);
|
||||
area.setWrapStyleWord(true);
|
||||
@@ -42,7 +42,7 @@ public class MenuItemHowToPlay extends JMenuItem implements NewConstants.Lang.Ho
|
||||
|
||||
area.setOpaque(false);
|
||||
|
||||
JOptionPane.showMessageDialog(null, new JScrollPane(area), ForgeProps.getLocalized(TITLE),
|
||||
JOptionPane.showMessageDialog(null, new JScrollPane(area), ForgeProps.getLocalized(NewConstants.Lang.HowTo.TITLE),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class NameChanger implements NewConstants {
|
||||
public class NameChanger {
|
||||
private Map<String, String> mutatedMap = new TreeMap<String, String>();
|
||||
private Map<String, String> originalMap = new TreeMap<String, String>();
|
||||
|
||||
@@ -215,7 +215,7 @@ public class NameChanger implements NewConstants {
|
||||
@SuppressWarnings("unused")
|
||||
private void readFile() {
|
||||
try {
|
||||
BufferedReader in = new BufferedReader(new FileReader(ForgeProps.getFile(NAME_MUTATOR)));
|
||||
BufferedReader in = new BufferedReader(new FileReader(ForgeProps.getFile(NewConstants.NAME_MUTATOR)));
|
||||
|
||||
String line = in.readLine();
|
||||
|
||||
@@ -232,7 +232,7 @@ public class NameChanger implements NewConstants {
|
||||
|
||||
// ~ (could be cleaner...)
|
||||
try {
|
||||
BufferedReader in = new BufferedReader(new FileReader(ForgeProps.getFile(NAME_MUTATOR)));
|
||||
BufferedReader in = new BufferedReader(new FileReader(ForgeProps.getFile(NewConstants.NAME_MUTATOR)));
|
||||
|
||||
String line;
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@ public final class AbilityFactoryClash {
|
||||
* </p>
|
||||
*
|
||||
* @param af
|
||||
* a {@link forge.card.abilityFactory.AbilityFactory} object.
|
||||
* a {@link forge.card.abilityfactory.AbilityFactory} object.
|
||||
* @return a {@link forge.card.spellability.SpellAbility} object.
|
||||
* @since 1.1.7
|
||||
*/
|
||||
@@ -486,7 +486,7 @@ public final class AbilityFactoryClash {
|
||||
* </p>
|
||||
*
|
||||
* @param af
|
||||
* a {@link forge.card.abilityFactory.AbilityFactory} object.
|
||||
* a {@link forge.card.abilityfactory.AbilityFactory} object.
|
||||
* @return a {@link forge.card.spellability.SpellAbility} object.
|
||||
* @since 1.1.7
|
||||
*/
|
||||
@@ -519,7 +519,7 @@ public final class AbilityFactoryClash {
|
||||
* </p>
|
||||
*
|
||||
* @param af
|
||||
* a {@link forge.card.abilityFactory.AbilityFactory} object.
|
||||
* a {@link forge.card.abilityfactory.AbilityFactory} object.
|
||||
* @return a {@link forge.card.spellability.SpellAbility} object.
|
||||
* @since 1.1.7
|
||||
*/
|
||||
|
||||
@@ -68,7 +68,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractCardFactory implements NewConstants, CardFactoryInterface {
|
||||
public abstract class AbstractCardFactory implements CardFactoryInterface {
|
||||
/**
|
||||
* This maps card name Strings to Card instances. The Card instances have no
|
||||
* owner, and lack abilities.
|
||||
|
||||
@@ -34,7 +34,7 @@ import forge.properties.NewConstants;
|
||||
* @author Clemens Koza
|
||||
* @version V1.0 02.08.2009
|
||||
*/
|
||||
public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer {
|
||||
public class ErrorViewer {
|
||||
/** Constant <code>NAME_OS="os.name"</code>. */
|
||||
private static final String NAME_OS = "os.name";
|
||||
/** Constant <code>VERSION_OS="os.version"</code>. */
|
||||
@@ -166,11 +166,11 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
// Button is not modified, String gets the automatic listener to hide
|
||||
// the dialog
|
||||
final Object[] options = { new JButton(new BugzAction(area)), new JButton(new SaveAction(area)),
|
||||
ForgeProps.getLocalized(ErrorViewer.BUTTON_CLOSE), new JButton(new ExitAction()) };
|
||||
ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.BUTTON_CLOSE), new JButton(new ExitAction()) };
|
||||
|
||||
final JOptionPane pane = new JOptionPane(new JScrollPane(area), JOptionPane.ERROR_MESSAGE,
|
||||
JOptionPane.DEFAULT_OPTION, null, options, options[1]);
|
||||
ErrorViewer.dlg = pane.createDialog(null, ForgeProps.getLocalized(ErrorViewer.TITLE));
|
||||
ErrorViewer.dlg = pane.createDialog(null, ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.TITLE));
|
||||
ErrorViewer.dlg.setResizable(true);
|
||||
ErrorViewer.dlg.setVisible(true);
|
||||
ErrorViewer.dlg.dispose();
|
||||
@@ -192,7 +192,7 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
}
|
||||
ex.printStackTrace();
|
||||
|
||||
pw.printf(ForgeProps.getLocalized(ErrorViewer.MESSAGE),
|
||||
pw.printf(ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.MESSAGE),
|
||||
ForgeProps.getProperty(NewConstants.HOW_TO_REPORT_BUGS_URL),
|
||||
message != null ? message : ex.getMessage(), Singletons.getModel().getBuildInfo().toPrettyString(),
|
||||
System.getProperty(ErrorViewer.NAME_OS), System.getProperty(ErrorViewer.VERSION_OS),
|
||||
@@ -213,7 +213,7 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
private static void printError(final PrintWriter pw, final String message) {
|
||||
System.err.println(message);
|
||||
|
||||
pw.printf(ForgeProps.getLocalized(ErrorViewer.MESSAGE),
|
||||
pw.printf(ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.MESSAGE),
|
||||
ForgeProps.getProperty(NewConstants.HOW_TO_REPORT_BUGS_URL), message, Singletons.getModel()
|
||||
.getBuildInfo().toPrettyString(), System.getProperty(ErrorViewer.NAME_OS),
|
||||
System.getProperty(ErrorViewer.VERSION_OS), System.getProperty(ErrorViewer.ARCHITECTURE_OS),
|
||||
@@ -237,7 +237,7 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
private final JTextArea area;
|
||||
|
||||
public SaveAction(final JTextArea areaParam) {
|
||||
super(ForgeProps.getLocalized(ErrorViewer.BUTTON_SAVE));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.BUTTON_SAVE));
|
||||
this.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_DOWN_MASK));
|
||||
this.area = areaParam;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
bw.write(this.area.getText());
|
||||
bw.close();
|
||||
} catch (final IOException ex) {
|
||||
ErrorViewer.showError(ex, ForgeProps.getLocalized(ERRORS.SAVE_MESSAGE));
|
||||
ErrorViewer.showError(ex, ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.ERRORS.SAVE_MESSAGE));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -296,7 +296,7 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
private static final long serialVersionUID = 276202595758381626L;
|
||||
|
||||
public ExitAction() {
|
||||
super(ForgeProps.getLocalized(ErrorViewer.BUTTON_EXIT));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.BUTTON_EXIT));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -310,12 +310,12 @@ public class ErrorViewer implements NewConstants, NewConstants.Lang.ErrorViewer
|
||||
private static final long serialVersionUID = 5638147106706803363L;
|
||||
|
||||
public ShowAllThreadsAction() {
|
||||
super(ForgeProps.getLocalized(ErrorViewer.SHOW_ERROR));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.SHOW_ERROR));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
ErrorViewer.showErrorAllThreads(ForgeProps.getLocalized(ERRORS.SHOW_MESSAGE));
|
||||
ErrorViewer.showErrorAllThreads(ForgeProps.getLocalized(NewConstants.Lang.ErrorViewer.ERRORS.SHOW_MESSAGE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class DeckEditorCommonMenu extends JMenuBar implements NewConstants {
|
||||
public final class DeckEditorCommonMenu extends JMenuBar {
|
||||
|
||||
/** Constant <code>serialVersionUID=-4037993759604768755L</code>. */
|
||||
private static final long serialVersionUID = -4037993759604768755L;
|
||||
|
||||
@@ -34,7 +34,6 @@ import forge.item.InventoryItem;
|
||||
import forge.item.ItemPool;
|
||||
import forge.item.ItemPoolView;
|
||||
import forge.properties.ForgeProps;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.properties.NewConstants.Lang.GuiBoosterDraft;
|
||||
import forge.view.swing.GuiHomeScreen;
|
||||
import forge.view.swing.OldGuiNewGame;
|
||||
@@ -47,7 +46,7 @@ import forge.view.swing.OldGuiNewGame;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class DeckEditorDraft extends DeckEditorBase implements NewConstants, NewConstants.Lang.GuiBoosterDraft {
|
||||
public class DeckEditorDraft extends DeckEditorBase {
|
||||
/**
|
||||
* Constant <code>serialVersionUID=-6055633915602448260L</code>.
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,6 @@ import forge.item.CardPrinted;
|
||||
import forge.item.InventoryItem;
|
||||
import forge.item.ItemPool;
|
||||
import forge.item.ItemPoolView;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.quest.data.QuestData;
|
||||
|
||||
//import forge.quest.data.QuestBoosterPack;
|
||||
@@ -39,7 +38,7 @@ import forge.quest.data.QuestData;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public final class DeckEditorQuest extends DeckEditorBase implements NewConstants {
|
||||
public final class DeckEditorQuest extends DeckEditorBase {
|
||||
/** Constant <code>serialVersionUID=152061168634545L</code>. */
|
||||
private static final long serialVersionUID = 152061168634545L;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ import forge.properties.NewConstants;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ReadPriceList implements NewConstants {
|
||||
public class ReadPriceList {
|
||||
|
||||
/** Constant <code>comment="//"</code>. */
|
||||
private static final String COMMENT = "//";
|
||||
@@ -44,8 +44,8 @@ public class ReadPriceList implements NewConstants {
|
||||
* </p>
|
||||
*/
|
||||
private void setup() {
|
||||
this.priceMap = this.readFile(ForgeProps.getFile(Quest.PRICE));
|
||||
this.priceMap.putAll(this.readFile(ForgeProps.getFile(Quest.BOOSTER_PRICE)));
|
||||
this.priceMap = this.readFile(ForgeProps.getFile(NewConstants.Quest.PRICE));
|
||||
this.priceMap.putAll(this.readFile(ForgeProps.getFile(NewConstants.Quest.BOOSTER_PRICE)));
|
||||
|
||||
} // setup()
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import javax.swing.border.EmptyBorder;
|
||||
|
||||
import forge.AllZone;
|
||||
import forge.gui.GuiUtils;
|
||||
import forge.properties.NewConstants;
|
||||
import forge.quest.data.QuestData;
|
||||
import forge.quest.data.bazaar.QuestStallDefinition;
|
||||
import forge.quest.data.bazaar.QuestStallManager;
|
||||
@@ -33,7 +32,7 @@ import forge.quest.data.bazaar.QuestStallPurchasable;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class QuestBazaarStall extends JPanel implements NewConstants {
|
||||
public class QuestBazaarStall extends JPanel {
|
||||
/** Constant <code>serialVersionUID=-4147745071116906043L</code>. */
|
||||
private static final long serialVersionUID = -4147745071116906043L;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ import forge.quest.gui.QuestOptions;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.Lang.OldGuiNewGame {
|
||||
public class OldGuiNewGame extends JFrame {
|
||||
/** Constant <code>serialVersionUID=-2437047615019135648L</code>. */
|
||||
private static final long serialVersionUID = -2437047615019135648L;
|
||||
|
||||
@@ -141,19 +141,19 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
// use these two variables
|
||||
/** Constant <code>removeSmallCreatures</code>. */
|
||||
private static JCheckBoxMenuItem removeSmallCreatures = new JCheckBoxMenuItem(
|
||||
ForgeProps.getLocalized(MenuBar.Options.Generate.REMOVE_SMALL));
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.Generate.REMOVE_SMALL));
|
||||
|
||||
/** Constant <code>removeArtifacts</code>. */
|
||||
private static JCheckBoxMenuItem removeArtifacts = new JCheckBoxMenuItem(
|
||||
ForgeProps.getLocalized(MenuBar.Options.Generate.REMOVE_ARTIFACTS));
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.Generate.REMOVE_ARTIFACTS));
|
||||
/** Constant <code>useLAFFonts</code>. */
|
||||
private static JCheckBoxMenuItem useLAFFonts = new JCheckBoxMenuItem(ForgeProps.getLocalized(MenuBar.Options.FONT));
|
||||
private static JCheckBoxMenuItem useLAFFonts = new JCheckBoxMenuItem(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.FONT));
|
||||
/** Constant <code>cardOverlay</code>. */
|
||||
private static JCheckBoxMenuItem cardOverlay = new JCheckBoxMenuItem(
|
||||
ForgeProps.getLocalized(MenuBar.Options.CARD_OVERLAY));
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.CARD_OVERLAY));
|
||||
/** Constant <code>cardScale</code>. */
|
||||
private static JCheckBoxMenuItem cardScale = new JCheckBoxMenuItem(
|
||||
ForgeProps.getLocalized(MenuBar.Options.CARD_SCALE));
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.CARD_SCALE));
|
||||
private final JButton questButton = new JButton();
|
||||
|
||||
private final Action lookAndFeelAction = new LookAndFeelAction(this);
|
||||
@@ -220,7 +220,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
this.setSize(550, 565);
|
||||
GuiUtils.centerFrame(this);
|
||||
|
||||
this.setTitle(ForgeProps.getLocalized(Lang.PROGRAM_NAME));
|
||||
this.setTitle(ForgeProps.getLocalized(NewConstants.Lang.PROGRAM_NAME));
|
||||
this.setupMenu();
|
||||
this.setVisible(true);
|
||||
|
||||
@@ -258,7 +258,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
// useLAFFonts.setSelected(false);
|
||||
|
||||
// new stuff
|
||||
final JMenu generatedDeck = new JMenu(ForgeProps.getLocalized(MenuBar.Options.Generate.TITLE));
|
||||
final JMenu generatedDeck = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Options.Generate.TITLE));
|
||||
|
||||
generatedDeck.add(OldGuiNewGame.removeSmallCreatures);
|
||||
OldGuiNewGame.removeSmallCreatures.addActionListener(new ActionListener() {
|
||||
@@ -293,7 +293,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
}
|
||||
});
|
||||
|
||||
final JMenu helpMenu = new JMenu(ForgeProps.getLocalized(MenuBar.Help.TITLE));
|
||||
final JMenu helpMenu = new JMenu(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Help.TITLE));
|
||||
|
||||
final Action[] helpActions = { this.howToPlayAction };
|
||||
for (final Action a : helpActions) {
|
||||
@@ -402,8 +402,8 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
}
|
||||
|
||||
final String sDeckName = JOptionPane.showInputDialog(null,
|
||||
ForgeProps.getLocalized(NewGameText.SAVE_SEALED_MSG),
|
||||
ForgeProps.getLocalized(NewGameText.SAVE_SEALED_TTL), JOptionPane.QUESTION_MESSAGE);
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SAVE_SEALED_MSG),
|
||||
ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SAVE_SEALED_TTL), JOptionPane.QUESTION_MESSAGE);
|
||||
|
||||
deck.setName(sDeckName);
|
||||
deck.setPlayerType(PlayerType.HUMAN);
|
||||
@@ -472,7 +472,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
*/
|
||||
private void jbInit() throws Exception {
|
||||
|
||||
this.titleLabel.setText(ForgeProps.getLocalized(NewGameText.NEW_GAME));
|
||||
this.titleLabel.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.NEW_GAME));
|
||||
this.titleLabel.setFont(new java.awt.Font("Dialog", 0, 26));
|
||||
|
||||
/* CHOPPIC */
|
||||
@@ -488,10 +488,10 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
*/
|
||||
|
||||
/* jPanel2.setBorder(titledBorder1); */
|
||||
this.setCustomBorder(this.jPanel2, ForgeProps.getLocalized(NewGameText.GAMETYPE));
|
||||
this.setCustomBorder(this.jPanel2, ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.GAMETYPE));
|
||||
this.jPanel2.setLayout(new MigLayout("align center"));
|
||||
|
||||
this.singleRadioButton.setText(ForgeProps.getLocalized(NewGameText.CONSTRUCTED_TEXT));
|
||||
this.singleRadioButton.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.CONSTRUCTED_TEXT));
|
||||
this.singleRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -500,7 +500,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
});
|
||||
|
||||
// sealedRadioButton.setToolTipText("");
|
||||
this.sealedRadioButton.setText(ForgeProps.getLocalized(NewGameText.SEALED_TEXT));
|
||||
this.sealedRadioButton.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SEALED_TEXT));
|
||||
this.sealedRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -509,7 +509,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
});
|
||||
|
||||
// draftRadioButton.setToolTipText("");
|
||||
this.draftRadioButton.setText(ForgeProps.getLocalized(NewGameText.BOOSTER_TEXT));
|
||||
this.draftRadioButton.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.BOOSTER_TEXT));
|
||||
this.draftRadioButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -522,24 +522,24 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
*/
|
||||
|
||||
/* jPanel1.setBorder(titledBorder2); */
|
||||
this.setCustomBorder(this.jPanel1, ForgeProps.getLocalized(NewGameText.LIBRARY));
|
||||
this.setCustomBorder(this.jPanel1, ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.LIBRARY));
|
||||
this.jPanel1.setLayout(new MigLayout("align center"));
|
||||
|
||||
this.jLabel2.setText(ForgeProps.getLocalized(NewGameText.YOURDECK));
|
||||
this.jLabel3.setText(ForgeProps.getLocalized(NewGameText.OPPONENT));
|
||||
this.jLabel2.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.YOURDECK));
|
||||
this.jLabel3.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.OPPONENT));
|
||||
|
||||
/*
|
||||
* Settings Panel
|
||||
*/
|
||||
|
||||
/* jPanel3.setBorder(titledBorder3); */
|
||||
this.setCustomBorder(this.jPanel3, ForgeProps.getLocalized(NewGameText.SETTINGS));
|
||||
this.setCustomBorder(this.jPanel3, ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.SETTINGS));
|
||||
this.jPanel3.setLayout(new MigLayout("align center"));
|
||||
|
||||
// newGuiCheckBox.setText(ForgeProps.getLocalized(NEW_GAME_TEXT.NEW_GUI));
|
||||
OldGuiNewGame.getSmoothLandCheckBox().setText(ForgeProps.getLocalized(NewGameText.AI_LAND));
|
||||
OldGuiNewGame.getSmoothLandCheckBox().setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.AI_LAND));
|
||||
|
||||
OldGuiNewGame.getDevModeCheckBox().setText(ForgeProps.getLocalized(NewGameText.DEV_MODE));
|
||||
OldGuiNewGame.getDevModeCheckBox().setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.DEV_MODE));
|
||||
OldGuiNewGame.getDevModeCheckBox().addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -578,7 +578,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
*/
|
||||
|
||||
this.deckEditorButton.setFont(new java.awt.Font("Dialog", 0, 15));
|
||||
this.deckEditorButton.setText(ForgeProps.getLocalized(NewGameText.DECK_EDITOR));
|
||||
this.deckEditorButton.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.DECK_EDITOR));
|
||||
this.deckEditorButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -588,7 +588,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
|
||||
this.startButton.setFont(new java.awt.Font("Dialog", 0, 18));
|
||||
this.startButton.setHorizontalTextPosition(SwingConstants.LEADING);
|
||||
this.startButton.setText(ForgeProps.getLocalized(NewGameText.START_GAME));
|
||||
this.startButton.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.START_GAME));
|
||||
this.startButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
@@ -597,7 +597,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
});
|
||||
|
||||
this.questButton.setFont(new java.awt.Font("Dialog", 0, 18));
|
||||
this.questButton.setText(ForgeProps.getLocalized(NewGameText.QUEST_MODE));
|
||||
this.questButton.setText(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.NewGameText.QUEST_MODE));
|
||||
|
||||
this.getContentPane().add(this.titleLabel, "align center, span 3, grow, wrap");
|
||||
|
||||
@@ -1003,7 +1003,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* the component
|
||||
*/
|
||||
public LookAndFeelAction(final Component component) {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.LF));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.LF));
|
||||
this.c = component;
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new download price action.
|
||||
*/
|
||||
public DownloadPriceAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.DOWNLOADPRICE));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.DOWNLOADPRICE));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1187,7 +1187,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new download action lq.
|
||||
*/
|
||||
public DownloadActionLQ() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.DOWNLOADLQ));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.DOWNLOADLQ));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1221,7 +1221,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new download action set lq.
|
||||
*/
|
||||
public DownloadActionSetLQ() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.DOWNLOADSETLQ));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.DOWNLOADSETLQ));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1255,7 +1255,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new download action quest.
|
||||
*/
|
||||
public DownloadActionQuest() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.DOWNLOADQUESTIMG));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.DOWNLOADQUESTIMG));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1291,7 +1291,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new import picture action.
|
||||
*/
|
||||
public ImportPictureAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.IMPORTPICTURE));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.IMPORTPICTURE));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1329,7 +1329,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new card sizes action.
|
||||
*/
|
||||
public CardSizesAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.CARD_SIZES));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.CARD_SIZES));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1410,7 +1410,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new card stack action.
|
||||
*/
|
||||
public CardStackAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.CARD_STACK));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.CARD_STACK));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1484,7 +1484,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new card stack offset action.
|
||||
*/
|
||||
public CardStackOffsetAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.CARD_STACK_OFFSET));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.CARD_STACK_OFFSET));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1562,7 +1562,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new how to play action.
|
||||
*/
|
||||
public HowToPlayAction() {
|
||||
super(ForgeProps.getLocalized(Lang.HowTo.TITLE));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.HowTo.TITLE));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1580,7 +1580,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
*/
|
||||
@Override
|
||||
public final void actionPerformed(final ActionEvent e) {
|
||||
final String text = ForgeProps.getLocalized(Lang.HowTo.MESSAGE);
|
||||
final String text = ForgeProps.getLocalized(NewConstants.Lang.HowTo.MESSAGE);
|
||||
|
||||
final JTextArea area = new JTextArea(text, 25, 40);
|
||||
area.setWrapStyleWord(true);
|
||||
@@ -1588,7 +1588,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
area.setEditable(false);
|
||||
area.setOpaque(false);
|
||||
|
||||
JOptionPane.showMessageDialog(null, new JScrollPane(area), ForgeProps.getLocalized(Lang.HowTo.TITLE),
|
||||
JOptionPane.showMessageDialog(null, new JScrollPane(area), ForgeProps.getLocalized(NewConstants.Lang.HowTo.TITLE),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}
|
||||
@@ -1606,7 +1606,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new about action.
|
||||
*/
|
||||
public AboutAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.ABOUT));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.ABOUT));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1659,7 +1659,7 @@ public class OldGuiNewGame extends JFrame implements NewConstants, NewConstants.
|
||||
* Instantiates a new exit action.
|
||||
*/
|
||||
public ExitAction() {
|
||||
super(ForgeProps.getLocalized(MenuBar.Menu.EXIT));
|
||||
super(ForgeProps.getLocalized(NewConstants.Lang.OldGuiNewGame.MenuBar.Menu.EXIT));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user