diff --git a/src/main/java/forge/control/home/ControlDraft.java b/src/main/java/forge/control/home/ControlDraft.java index 257e55d86a4..8e80dbda89f 100644 --- a/src/main/java/forge/control/home/ControlDraft.java +++ b/src/main/java/forge/control/home/ControlDraft.java @@ -45,11 +45,11 @@ public class ControlDraft { } @Override public void mouseEntered(MouseEvent e) { - view.getLblDirections().setForeground(Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_HOVER)); + view.getLblDirections().setForeground(Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_HOVER)); } @Override public void mouseExited(MouseEvent e) { - view.getLblDirections().setForeground(Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_TEXT)); + view.getLblDirections().setForeground(Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_TEXT)); } }; diff --git a/src/main/java/forge/control/home/ControlUtilities.java b/src/main/java/forge/control/home/ControlUtilities.java index c9c8268a206..ae36dc390d3 100644 --- a/src/main/java/forge/control/home/ControlUtilities.java +++ b/src/main/java/forge/control/home/ControlUtilities.java @@ -51,11 +51,11 @@ public class ControlUtilities { } @Override public void mouseEntered(MouseEvent e) { - view.getLblLicensing().setForeground(Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_HOVER)); + view.getLblLicensing().setForeground(Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_HOVER)); } @Override public void mouseExited(MouseEvent e) { - view.getLblLicensing().setForeground(Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_TEXT)); + view.getLblLicensing().setForeground(Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_TEXT)); } }; diff --git a/src/main/java/forge/view/home/HomeTopLevel.java b/src/main/java/forge/view/home/HomeTopLevel.java index a803574b1f7..e1434e530bc 100644 --- a/src/main/java/forge/view/home/HomeTopLevel.java +++ b/src/main/java/forge/view/home/HomeTopLevel.java @@ -78,7 +78,7 @@ public class HomeTopLevel extends FPanel { utilities = new ViewUtilities(this); this.setOpaque(false); - this.setBGTexture(skin.getIcon(FSkin.SkinProp.BG_TEXTURE)); + this.setBGTexture(skin.getIcon(FSkin.Backgrounds.BG_TEXTURE)); this.setLayout(null); this.addComponentListener(new ComponentAdapter() { @Override @@ -98,10 +98,10 @@ public class HomeTopLevel extends FPanel { pnlMenu = new FRoundedPanel(); pnlMenu.setLayout(new MigLayout("insets 0, gap 0, wrap")); - pnlMenu.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + pnlMenu.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); pnlContent = new FRoundedPanel(); - pnlContent.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + pnlContent.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); pnlContent.setLayout(new MigLayout("insets 0, gap 0")); btnConstructed = new FButton(); @@ -157,7 +157,7 @@ public class HomeTopLevel extends FPanel { add(pnlMenu, "w 36%!, h 96%!, gap 2% 2% 2% 2%"); add(pnlContent, "w 58%!, h 96%!, gap 0% 2% 2% 2%"); - JLabel lblIcon = new JLabel(skin.getIcon(FSkin.SkinProp.IMG_LOGO)); + JLabel lblIcon = new JLabel(skin.getIcon(FSkin.ForgeIcons.IMG_LOGO)); pnlMenu.add(lblIcon, "gapleft 10%, ax center"); constraints = "w 80%!, gapleft 10%, gaptop 1%, gapbottom 1%, h 40px!"; diff --git a/src/main/java/forge/view/home/QuestFileLister.java b/src/main/java/forge/view/home/QuestFileLister.java index e5cf4526bca..c633868ef12 100644 --- a/src/main/java/forge/view/home/QuestFileLister.java +++ b/src/main/java/forge/view/home/QuestFileLister.java @@ -52,9 +52,9 @@ public class QuestFileLister extends JPanel { this.skin = Singletons.getView().getSkin(); this.clrDefault = new Color(0, 0, 0, 0); - this.clrHover = skin.getColor(FSkin.SkinProp.CLR_HOVER); - this.clrActive = skin.getColor(FSkin.SkinProp.CLR_ACTIVE); - this.clrBorders = skin.getColor(FSkin.SkinProp.CLR_BORDERS); + this.clrHover = skin.getColor(FSkin.Colors.CLR_HOVER); + this.clrActive = skin.getColor(FSkin.Colors.CLR_ACTIVE); + this.clrBorders = skin.getColor(FSkin.Colors.CLR_BORDERS); this.setOpaque(false); this.setLayout(new MigLayout("insets 0, gap 0, wrap")); @@ -74,7 +74,7 @@ public class QuestFileLister extends JPanel { // Note: careful with the widths of the rows here; // scroll panes will have difficulty dynamically resizing if 100% width is set. final JPanel rowTitle = new JPanel(); - rowTitle.setBackground(skin.getColor(FSkin.SkinProp.CLR_ZEBRA)); + rowTitle.setBackground(skin.getColor(FSkin.Colors.CLR_ZEBRA)); rowTitle.setLayout(new MigLayout("insets 0, gap 0")); rowTitle.add(new FLabel("Delete", SwingConstants.CENTER), "w 15%!, h 20px!, gap 0 0 5px 0"); rowTitle.add(new FLabel("Edit", SwingConstants.CENTER), "w 15%!, h 20px!, gap 0 0 5px 0"); diff --git a/src/main/java/forge/view/home/SplashFrame.java b/src/main/java/forge/view/home/SplashFrame.java index ebb17f7445a..ca448a1639c 100644 --- a/src/main/java/forge/view/home/SplashFrame.java +++ b/src/main/java/forge/view/home/SplashFrame.java @@ -75,7 +75,7 @@ public class SplashFrame extends JFrame { "SplashFrame() must be called from an event dispatch thread."); } - final ImageIcon bgIcon = skin.getIcon(FSkin.SkinProp.BG_SPLASH); + final ImageIcon bgIcon = skin.getIcon(FSkin.Backgrounds.BG_SPLASH); final int splashWidthPx = bgIcon.getIconWidth(); final int splashHeightPx = bgIcon.getIconHeight(); diff --git a/src/main/java/forge/view/home/StartButton.java b/src/main/java/forge/view/home/StartButton.java index 38c2ccecbab..3997dc8deec 100644 --- a/src/main/java/forge/view/home/StartButton.java +++ b/src/main/java/forge/view/home/StartButton.java @@ -18,12 +18,12 @@ public class StartButton extends JButton { super(); final FSkin skin = Singletons.getView().getSkin(); setRolloverEnabled(true); - setRolloverIcon(skin.getIcon(FSkin.SkinProp.IMG_BTN_START_OVER)); + setRolloverIcon(skin.getIcon(FSkin.ButtonImages.IMG_BTN_START_OVER)); setOpaque(false); - setIcon(skin.getIcon(FSkin.SkinProp.IMG_BTN_START_UP)); + setIcon(skin.getIcon(FSkin.ButtonImages.IMG_BTN_START_UP)); setContentAreaFilled(false); setBorder(null); setBorderPainted(false); - setPressedIcon(skin.getIcon(FSkin.SkinProp.IMG_BTN_START_DOWN)); + setPressedIcon(skin.getIcon(FSkin.ButtonImages.IMG_BTN_START_DOWN)); } } diff --git a/src/main/java/forge/view/home/SubButton.java b/src/main/java/forge/view/home/SubButton.java index 22bed459259..579a135c478 100644 --- a/src/main/java/forge/view/home/SubButton.java +++ b/src/main/java/forge/view/home/SubButton.java @@ -35,19 +35,19 @@ public class SubButton extends JButton { public SubButton(String txt0) { super(txt0); skin = Singletons.getView().getSkin(); - setBorder(new LineBorder(skin.getColor(FSkin.SkinProp.CLR_BORDERS), 1)); - setBackground(skin.getColor(FSkin.SkinProp.CLR_INACTIVE)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + setBorder(new LineBorder(skin.getColor(FSkin.Colors.CLR_BORDERS), 1)); + setBackground(skin.getColor(FSkin.Colors.CLR_INACTIVE)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); setVerticalTextPosition(SwingConstants.CENTER); setFocusPainted(false); this.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { - if (isEnabled()) { setBackground(skin.getColor(FSkin.SkinProp.CLR_HOVER)); } + if (isEnabled()) { setBackground(skin.getColor(FSkin.Colors.CLR_HOVER)); } } public void mouseExited(MouseEvent e) { - if (isEnabled()) { setBackground(skin.getColor(FSkin.SkinProp.CLR_INACTIVE)); } + if (isEnabled()) { setBackground(skin.getColor(FSkin.Colors.CLR_INACTIVE)); } } }); @@ -66,7 +66,7 @@ public class SubButton extends JButton { public void setEnabled(boolean b0) { super.setEnabled(b0); - if (b0) { setBackground(skin.getColor(FSkin.SkinProp.CLR_INACTIVE)); } + if (b0) { setBackground(skin.getColor(FSkin.Colors.CLR_INACTIVE)); } else { setBackground(new Color(220, 220, 220)); } } diff --git a/src/main/java/forge/view/home/SubTab.java b/src/main/java/forge/view/home/SubTab.java index 7219d2373d3..6e4e6e6c84b 100644 --- a/src/main/java/forge/view/home/SubTab.java +++ b/src/main/java/forge/view/home/SubTab.java @@ -28,8 +28,8 @@ public class SubTab extends JPanel { super(); this.setOpaque(false); this.skin = Singletons.getView().getSkin(); - this.clrBorders = skin.getColor(FSkin.SkinProp.CLR_BORDERS); - this.clrHover = skin.getColor(FSkin.SkinProp.CLR_HOVER); + this.clrBorders = skin.getColor(FSkin.Colors.CLR_BORDERS); + this.clrHover = skin.getColor(FSkin.Colors.CLR_HOVER); this.setCursor(new Cursor(Cursor.HAND_CURSOR)); this.madHover = new MouseAdapter() { @@ -48,7 +48,7 @@ public class SubTab extends JPanel { this.addMouseListener(madHover); final JLabel lbl = new JLabel(s0); - lbl.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lbl.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lbl.setFont(skin.getFont(12)); this.add(lbl); } diff --git a/src/main/java/forge/view/home/ViewConstructed.java b/src/main/java/forge/view/home/ViewConstructed.java index f4b1d7b99e4..313488ddfff 100644 --- a/src/main/java/forge/view/home/ViewConstructed.java +++ b/src/main/java/forge/view/home/ViewConstructed.java @@ -84,25 +84,25 @@ public class ViewConstructed extends JPanel { JLabel lblHuman = new JLabel("Choose your deck:"); lblHuman.setFont(skin.getBoldFont(16)); - lblHuman.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblHuman.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblHuman.setHorizontalAlignment(SwingConstants.CENTER); JLabel lblColorInfo = new JLabel(colorsToolTip); lblColorInfo.setToolTipText(colorsToolTip); lblColorInfo.setFont(skin.getItalicFont(12)); - lblColorInfo.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblColorInfo.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblColorInfo.setHorizontalAlignment(SwingConstants.CENTER); JLabel lblThemeInfo = new JLabel(themeToolTip); lblThemeInfo.setToolTipText(themeToolTip); lblThemeInfo.setFont(skin.getItalicFont(12)); - lblThemeInfo.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblThemeInfo.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblThemeInfo.setHorizontalAlignment(SwingConstants.CENTER); JLabel lblDecklistInfo = new JLabel(decklistToolTip); lblDecklistInfo.setToolTipText(decklistToolTip); lblDecklistInfo.setFont(skin.getItalicFont(12)); - lblDecklistInfo.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblDecklistInfo.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblDecklistInfo.setHorizontalAlignment(SwingConstants.CENTER); // Random theme and pre-constructed buttons @@ -157,25 +157,25 @@ public class ViewConstructed extends JPanel { JLabel lblAI = new JLabel("Choose a deck for the computer:"); lblAI.setFont(skin.getBoldFont(16)); - lblAI.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblAI.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblAI.setHorizontalAlignment(SwingConstants.CENTER); JLabel lblColorInfo = new JLabel(colorsToolTip); lblColorInfo.setToolTipText(colorsToolTip); lblColorInfo.setFont(skin.getItalicFont(12)); - lblColorInfo.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblColorInfo.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblColorInfo.setHorizontalAlignment(SwingConstants.CENTER); JLabel lblThemeInfo = new JLabel(themeToolTip); lblThemeInfo.setToolTipText(themeToolTip); lblThemeInfo.setFont(skin.getItalicFont(12)); - lblThemeInfo.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblThemeInfo.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblThemeInfo.setHorizontalAlignment(SwingConstants.CENTER); JLabel lblDecklistInfo = new JLabel(decklistToolTip); lblDecklistInfo.setToolTipText(decklistToolTip); lblDecklistInfo.setFont(skin.getItalicFont(12)); - lblDecklistInfo.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblDecklistInfo.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblDecklistInfo.setHorizontalAlignment(SwingConstants.CENTER); // Random theme and pre-constructed deck buttons @@ -295,7 +295,7 @@ public class ViewConstructed extends JPanel { JLabel lblOr = new JLabel("OR"); lblOr.setHorizontalAlignment(SwingConstants.CENTER); - lblOr.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblOr.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); add(lblOr, BorderLayout.CENTER); } } diff --git a/src/main/java/forge/view/home/ViewDraft.java b/src/main/java/forge/view/home/ViewDraft.java index 8ffea5af156..68f9b9abae1 100644 --- a/src/main/java/forge/view/home/ViewDraft.java +++ b/src/main/java/forge/view/home/ViewDraft.java @@ -131,7 +131,7 @@ public class ViewDraft extends JPanel { // Init directions text pane tpnDirections = new JTextPane(); tpnDirections.setOpaque(false); - tpnDirections.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + tpnDirections.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); tpnDirections.setFont(skin.getFont(15)); tpnDirections.setAlignmentX(SwingConstants.CENTER); tpnDirections.setFocusable(false); @@ -158,13 +158,13 @@ public class ViewDraft extends JPanel { final JLabel lblHuman = new JLabel("Select your deck: "); lblHuman.setFont(skin.getBoldFont(16)); lblHuman.setHorizontalAlignment(SwingConstants.CENTER); - lblHuman.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblHuman.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.add(lblHuman, "w 60%!, gap 5% 5% 2% 2%"); final JLabel lblAI = new JLabel("Who will you play?"); lblAI.setFont(skin.getBoldFont(16)); lblAI.setHorizontalAlignment(SwingConstants.CENTER); - lblAI.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblAI.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.add(lblAI, "w 25%!, gap 0 0 2% 2%, wrap"); lstHumanDecks = new DeckLister(GameType.Draft, exit); @@ -179,7 +179,7 @@ public class ViewDraft extends JPanel { lblDirections = new JLabel("Click For Directions"); lblDirections.setFont(skin.getFont(16)); lblDirections.setHorizontalAlignment(SwingConstants.CENTER); - lblDirections.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblDirections.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.add(lblDirections, "alignx center, span 2 1, gap 5% 5% 5% 2%, wrap"); btnStart = new StartButton(parentView); @@ -206,8 +206,8 @@ public class ViewDraft extends JPanel { }); btnClose.setText("Close"); - pnlContainer.setBorder(new LineBorder(skin.getColor(FSkin.SkinProp.CLR_BORDERS), 1)); - pnlContainer.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + pnlContainer.setBorder(new LineBorder(skin.getColor(FSkin.Colors.CLR_BORDERS), 1)); + pnlContainer.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); pnlContainer.setLayout(new MigLayout("insets 0, wrap")); pnlContainer.add(tpnDirections, "w 90%, gap 5% 0 20px 0, wrap"); pnlContainer.add(btnClose, "w 300px!, h 40px!, gap 0 0 20px 20px, alignx center"); diff --git a/src/main/java/forge/view/home/ViewQuest.java b/src/main/java/forge/view/home/ViewQuest.java index 315142133b9..b40ea91ae1c 100644 --- a/src/main/java/forge/view/home/ViewQuest.java +++ b/src/main/java/forge/view/home/ViewQuest.java @@ -83,7 +83,7 @@ public class ViewQuest extends JScrollPane { // Non-final inits this.parentView = v0; this.skin = Singletons.getView().getSkin(); - this.clrBorders = skin.getColor(FSkin.SkinProp.CLR_THEME).darker().darker(); + this.clrBorders = skin.getColor(FSkin.Colors.CLR_THEME).darker().darker(); this.eventPanelConstraints = "w 100%!, h 80px!, gap 0 0 5px 5px"; // Final component inits @@ -196,7 +196,7 @@ public class ViewQuest extends JScrollPane { /** Layout and details for Swing components in title panel. */ private void populateTitle() { pnlTitle.setLayout(new MigLayout("insets 0, gap 0, align center")); - pnlTitle.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME).darker()); + pnlTitle.setBackground(skin.getColor(FSkin.Colors.CLR_THEME).darker()); ((FRoundedPanel) pnlTitle).setBorderColor(clrBorders); pnlTitle.add(lblTitle, "h 70%!, gap 0 0 0 10%!"); } @@ -256,7 +256,7 @@ public class ViewQuest extends JScrollPane { final FRoundedPanel pnl = new FRoundedPanel(); pnl.setLayout(new MigLayout("insets 0, align center")); pnl.setBorderColor(clrBorders); - pnl.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + pnl.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); pnl.add(new FLabel("Load a previous Quest"), "h 24px!, gap 2px 2px 2px 2px"); final FLabel lbl = new FLabel("To use quest files " @@ -281,7 +281,7 @@ public class ViewQuest extends JScrollPane { final FRoundedPanel pnl1 = new FRoundedPanel(); pnl1.setLayout(new MigLayout("insets 0, align center")); pnl1.setBorderColor(clrBorders); - pnl1.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + pnl1.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); pnl1.add(new FLabel("Start a new quest"), "h 24px!, gap 2px 2px 2px 2px"); final ButtonGroup group1 = new ButtonGroup(); @@ -419,7 +419,7 @@ public class ViewQuest extends JScrollPane { // Select first event. selectedOpponent = (SelectablePanel) pnlDuels.getComponent(0); - selectedOpponent.setBackground(skin.getColor(FSkin.SkinProp.CLR_ACTIVE)); + selectedOpponent.setBackground(skin.getColor(FSkin.Colors.CLR_ACTIVE)); } } @@ -445,7 +445,7 @@ public class ViewQuest extends JScrollPane { if (pnlChallenges.getComponentCount() > 0) { pnlStart.setVisible(true); selectedOpponent = (SelectablePanel) pnlChallenges.getComponent(0); - selectedOpponent.setBackground(skin.getColor(FSkin.SkinProp.CLR_ACTIVE)); + selectedOpponent.setBackground(skin.getColor(FSkin.Colors.CLR_ACTIVE)); } } @@ -492,7 +492,7 @@ public class ViewQuest extends JScrollPane { btnCurrentDeck.setText(" Build, then select a deck in the \"Decks\" tab. "); } else { - btnCurrentDeck.setBackground(skin.getColor(FSkin.SkinProp.CLR_INACTIVE)); + btnCurrentDeck.setBackground(skin.getColor(FSkin.Colors.CLR_INACTIVE)); btnCurrentDeck.setText("Current deck: " + control.getCurrentDeck().getName()); } } @@ -505,9 +505,9 @@ public class ViewQuest extends JScrollPane { /** @param e0   QuestEvent */ public SelectablePanel(QuestEvent e0) { super(); - this.clrSelected = skin.getColor(FSkin.SkinProp.CLR_ACTIVE); - this.clrDefault = skin.getColor(FSkin.SkinProp.CLR_INACTIVE); - this.clrHover = skin.getColor(FSkin.SkinProp.CLR_HOVER); + this.clrSelected = skin.getColor(FSkin.Colors.CLR_ACTIVE); + this.clrDefault = skin.getColor(FSkin.Colors.CLR_INACTIVE); + this.clrHover = skin.getColor(FSkin.Colors.CLR_HOVER); this.event = e0; this.setBackground(clrDefault); @@ -522,7 +522,7 @@ public class ViewQuest extends JScrollPane { FLabel lblIcon = new FLabel(new ImageIcon(file.toString())); lblIcon.setIconScaleFactor(1); - lblIcon.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblIcon.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.add(lblIcon, "h 60px!, w 60px!, gap 10px 10px 10px 0, span 1 2"); // Name diff --git a/src/main/java/forge/view/home/ViewQuestPreferences.java b/src/main/java/forge/view/home/ViewQuestPreferences.java index 80bac2ab442..13127e48b28 100644 --- a/src/main/java/forge/view/home/ViewQuestPreferences.java +++ b/src/main/java/forge/view/home/ViewQuestPreferences.java @@ -222,9 +222,9 @@ public class ViewQuestPreferences extends JPanel { this.qpref = qp0; this.err = e0; - this.clrHover = skin.getColor(FSkin.SkinProp.CLR_HOVER); - this.clrActive = skin.getColor(FSkin.SkinProp.CLR_ACTIVE); - this.clrText = skin.getColor(FSkin.SkinProp.CLR_TEXT); + this.clrHover = skin.getColor(FSkin.Colors.CLR_HOVER); + this.clrActive = skin.getColor(FSkin.Colors.CLR_ACTIVE); + this.clrText = skin.getColor(FSkin.Colors.CLR_TEXT); this.setOpaque(false); this.setBorder(null); diff --git a/src/main/java/forge/view/home/ViewSealed.java b/src/main/java/forge/view/home/ViewSealed.java index cb0598264ac..86682d22e11 100644 --- a/src/main/java/forge/view/home/ViewSealed.java +++ b/src/main/java/forge/view/home/ViewSealed.java @@ -43,7 +43,7 @@ public class ViewSealed extends JPanel { // Title JLabel lblTitle = new JLabel("Select a deck for yourself, or build a new one: "); lblTitle.setFont(skin.getBoldFont(14)); - lblTitle.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblTitle.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); // Deck lister diff --git a/src/main/java/forge/view/home/ViewSettings.java b/src/main/java/forge/view/home/ViewSettings.java index 5bdd7607c98..07be7731699 100644 --- a/src/main/java/forge/view/home/ViewSettings.java +++ b/src/main/java/forge/view/home/ViewSettings.java @@ -220,8 +220,8 @@ public class ViewSettings extends JScrollPane { super(); setText(txt0); setFont(skin.getBoldFont(12)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); - setBackground(skin.getColor(FSkin.SkinProp.CLR_HOVER)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); + setBackground(skin.getColor(FSkin.Colors.CLR_HOVER)); setOpaque(false); this.addMouseListener(new MouseAdapter() { @@ -244,8 +244,8 @@ public class ViewSettings extends JScrollPane { super(); setText(txt0); setFont(skin.getBoldFont(12)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); - setBackground(skin.getColor(FSkin.SkinProp.CLR_HOVER)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); + setBackground(skin.getColor(FSkin.Colors.CLR_HOVER)); setOpaque(false); this.addMouseListener(new MouseAdapter() { @@ -284,10 +284,10 @@ public class ViewSettings extends JScrollPane { private class SectionLabel extends JLabel { public SectionLabel(String txt0) { super(txt0); - setBorder(new MatteBorder(0, 0, 1, 0, skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + setBorder(new MatteBorder(0, 0, 1, 0, skin.getColor(FSkin.Colors.CLR_BORDERS))); setHorizontalAlignment(SwingConstants.CENTER); setFont(skin.getBoldFont(16)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); } } @@ -296,7 +296,7 @@ public class ViewSettings extends JScrollPane { public NoteLabel(String txt0) { super(txt0); setFont(skin.getItalicFont(12)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); } } @@ -305,7 +305,7 @@ public class ViewSettings extends JScrollPane { public TitleLabel(String txt0) { super(txt0); setFont(skin.getBoldFont(12)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); } } @@ -314,7 +314,7 @@ public class ViewSettings extends JScrollPane { public ShortcutLabel(String txt0) { super(txt0); setFont(skin.getFont(14)); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); } } @@ -349,7 +349,7 @@ public class ViewSettings extends JScrollPane { this.addFocusListener(new FocusAdapter() { @Override public void focusGained(final FocusEvent e) { - KeyboardShortcutField.this.setBackground(skin.getColor(FSkin.SkinProp.CLR_ACTIVE)); + KeyboardShortcutField.this.setBackground(skin.getColor(FSkin.Colors.CLR_ACTIVE)); } @Override diff --git a/src/main/java/forge/view/home/ViewUtilities.java b/src/main/java/forge/view/home/ViewUtilities.java index 6afda3d1ff8..5f9de27a417 100644 --- a/src/main/java/forge/view/home/ViewUtilities.java +++ b/src/main/java/forge/view/home/ViewUtilities.java @@ -88,7 +88,7 @@ public class ViewUtilities extends JPanel { tpnLicensing = new JTextPane(); tpnLicensing.setOpaque(false); - tpnLicensing.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + tpnLicensing.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); tpnLicensing.setFont(skin.getFont(15)); tpnLicensing.setAlignmentX(SwingConstants.CENTER); tpnLicensing.setFocusable(false); @@ -104,7 +104,7 @@ public class ViewUtilities extends JPanel { lblLicensing = new JLabel("Click For License Information"); lblLicensing.setFont(skin.getFont(16)); lblLicensing.setHorizontalAlignment(SwingConstants.CENTER); - lblLicensing.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblLicensing.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.add(lblLicensing, "alignx center, span 2 1, gap 25% 0 5% 0"); control = new ControlUtilities(this); @@ -124,8 +124,8 @@ public class ViewUtilities extends JPanel { }); btnClose.setText("Close"); - pnlContainer.setBorder(new LineBorder(skin.getColor(FSkin.SkinProp.CLR_BORDERS), 1)); - pnlContainer.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + pnlContainer.setBorder(new LineBorder(skin.getColor(FSkin.Colors.CLR_BORDERS), 1)); + pnlContainer.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); pnlContainer.setLayout(new MigLayout("insets 0, wrap")); pnlContainer.add(tpnLicensing, "w 90%, gap 5% 0 20px 0, wrap"); pnlContainer.add(btnClose, "w 300px!, h 40px!, gap 0 0 20px 20px, alignx center"); diff --git a/src/main/java/forge/view/match/MatchTopLevel.java b/src/main/java/forge/view/match/MatchTopLevel.java index 4a4236dbe47..ac51a273551 100644 --- a/src/main/java/forge/view/match/MatchTopLevel.java +++ b/src/main/java/forge/view/match/MatchTopLevel.java @@ -97,8 +97,8 @@ public class MatchTopLevel extends FPanel { // Set properties this.setOpaque(false); - this.setBGTexture(Singletons.getView().getSkin().getIcon(FSkin.SkinProp.BG_TEXTURE)); - this.setBGImg(Singletons.getView().getSkin().getIcon(FSkin.SkinProp.BG_MATCH)); + this.setBGTexture(Singletons.getView().getSkin().getIcon(FSkin.Backgrounds.BG_TEXTURE)); + this.setBGImg(Singletons.getView().getSkin().getIcon(FSkin.Backgrounds.BG_MATCH)); this.setLayout(null); b = (int) Math.ceil(BOUNDARY_THICKNESS_PX / 2); diff --git a/src/main/java/forge/view/match/ViewDetail.java b/src/main/java/forge/view/match/ViewDetail.java index ac74093ec66..6f9e0e6f837 100644 --- a/src/main/java/forge/view/match/ViewDetail.java +++ b/src/main/java/forge/view/match/ViewDetail.java @@ -47,7 +47,7 @@ public class ViewDetail extends FRoundedPanel { pnlDetail = new CardDetailPanel(null); pnlDetail.setOpaque(false); - this.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + this.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); this.setLayout(new MigLayout("insets 0, gap 0")); add(pnlDetail, "w 100%!, h 100%!"); diff --git a/src/main/java/forge/view/match/ViewDock.java b/src/main/java/forge/view/match/ViewDock.java index 259a2f9e81e..06f3354695c 100644 --- a/src/main/java/forge/view/match/ViewDock.java +++ b/src/main/java/forge/view/match/ViewDock.java @@ -59,7 +59,7 @@ public class ViewDock extends FRoundedPanel { super(); this.skin = Singletons.getView().getSkin(); this.setToolTipText("Shortcut Button Dock"); - this.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + this.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); //this.setLayout(new MigLayout("insets 0, gap 0, ay center, ax center")); // Mig layout does not support wrapping! @@ -76,7 +76,7 @@ public class ViewDock extends FRoundedPanel { } }; - final JLabel btnConcede = new DockButton(skin.getIcon(FSkin.SkinProp.ICON_DOCK_CONCEDE), "Concede Game"); + final JLabel btnConcede = new DockButton(skin.getIcon(FSkin.DockIcons.ICO_CONCEDE), "Concede Game"); btnConcede.addMouseListener(new MouseAdapter() { @Override public void mousePressed(final MouseEvent e) { @@ -84,7 +84,7 @@ public class ViewDock extends FRoundedPanel { } }); - final JLabel btnSettings = new DockButton(skin.getIcon(FSkin.SkinProp.ICON_DOCK_SETTINGS), "Game Settings"); + final JLabel btnSettings = new DockButton(skin.getIcon(FSkin.DockIcons.ICO_SETTINGS), "Game Settings"); btnSettings.addMouseListener(new MouseAdapter() { @Override public void mousePressed(final MouseEvent e) { @@ -92,7 +92,7 @@ public class ViewDock extends FRoundedPanel { } }); - final JLabel btnEndTurn = new DockButton(skin.getIcon(FSkin.SkinProp.ICON_DOCK_ENDTURN), "End Turn"); + final JLabel btnEndTurn = new DockButton(skin.getIcon(FSkin.DockIcons.ICO_ENDTURN), "End Turn"); btnEndTurn.addMouseListener(new MouseAdapter() { @Override public void mousePressed(final MouseEvent e) { @@ -100,7 +100,7 @@ public class ViewDock extends FRoundedPanel { } }); - final JLabel btnViewDeckList = new DockButton(skin.getIcon(FSkin.SkinProp.ICON_DOCK_DECKLIST), "View Deck List"); + final JLabel btnViewDeckList = new DockButton(skin.getIcon(FSkin.DockIcons.ICO_DECKLIST), "View Deck List"); btnViewDeckList.addMouseListener(new MouseAdapter() { @Override public void mousePressed(final MouseEvent e) { @@ -132,7 +132,7 @@ public class ViewDock extends FRoundedPanel { */ public class DockButton extends JLabel { private final Image img; - private final Color hoverBG = ViewDock.this.skin.getColor(FSkin.SkinProp.CLR_HOVER); + private final Color hoverBG = ViewDock.this.skin.getColor(FSkin.Colors.CLR_HOVER); private final Color defaultBG = new Color(0, 0, 0, 0); private Color clrBorders = new Color(0, 0, 0, 0); private int w, h; @@ -160,7 +160,7 @@ public class ViewDock extends FRoundedPanel { this.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(final MouseEvent e) { - DockButton.this.clrBorders = ViewDock.this.skin.getColor(FSkin.SkinProp.CLR_BORDERS); + DockButton.this.clrBorders = ViewDock.this.skin.getColor(FSkin.Colors.CLR_BORDERS); DockButton.this.setBackground(DockButton.this.hoverBG); } diff --git a/src/main/java/forge/view/match/ViewField.java b/src/main/java/forge/view/match/ViewField.java index 5c9a2560cc4..a8583bf3314 100644 --- a/src/main/java/forge/view/match/ViewField.java +++ b/src/main/java/forge/view/match/ViewField.java @@ -80,7 +80,7 @@ public class ViewField extends FRoundedPanel { private JLabel lblAvatar, lblLife; private final Image img; private final Color transparent = new Color(0, 0, 0, 0); - private final Color hoverBG = Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_HOVER); + private final Color hoverBG = Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_HOVER); /** * Assembles Swing components of player field instance. @@ -95,10 +95,10 @@ public class ViewField extends FRoundedPanel { this.setLayout(new MigLayout("insets 0, gap 0")); this.setCornerRadius(5); this.setToolTipText(player.getName() + " Gameboard"); - this.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + this.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); this.inactiveBorder = new LineBorder(new Color(0, 0, 0, 0), 1); - this.hoverBorder = new LineBorder(this.skin.getColor(FSkin.SkinProp.CLR_BORDERS), 1); + this.hoverBorder = new LineBorder(this.skin.getColor(FSkin.Colors.CLR_BORDERS), 1); this.counter = -1; // Player icon logic @@ -129,7 +129,7 @@ public class ViewField extends FRoundedPanel { // Avatar and life avatarArea = new JPanel(); avatarArea.setOpaque(false); - avatarArea.setBackground(skin.getColor(FSkin.SkinProp.CLR_HOVER)); + avatarArea.setBackground(skin.getColor(FSkin.Colors.CLR_HOVER)); avatarArea.setLayout(new MigLayout("insets 0, gap 0")); lblAvatar = new JLabel(); @@ -138,7 +138,7 @@ public class ViewField extends FRoundedPanel { lblLife = new JLabel(); lblLife.setHorizontalAlignment(SwingConstants.CENTER); - lblLife.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblLife.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); avatarArea.add(lblLife, "w 100%!, h 30%!, gaptop 4%"); this.add(avatarArea, "w 10%!, h 30%!"); @@ -154,7 +154,7 @@ public class ViewField extends FRoundedPanel { final JScrollPane scroller = new JScrollPane(); this.tabletop = new PlayArea(scroller, player.equals(AllZone.getComputerPlayer()) ? true : false); - this.tabletop.setBorder(new MatteBorder(0, 1, 0, 0, this.skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + this.tabletop.setBorder(new MatteBorder(0, 1, 0, 0, this.skin.getColor(FSkin.Colors.CLR_BORDERS))); this.tabletop.setOpaque(false); scroller.setViewportView(this.tabletop); @@ -272,52 +272,52 @@ public class ViewField extends FRoundedPanel { final String constraintsR = "w 47%!, h 12.5%!, growy, gapright 3%"; // Hand, library, graveyard, exile, flashback, poison labels - ViewField.this.lblHand = new DetailLabel(FSkin.SkinProp.ICON_ZONE_HAND, "99"); + ViewField.this.lblHand = new DetailLabel(FSkin.ZoneIcons.ICO_HAND, "99"); ViewField.this.lblHand.setToolTipText("Cards in hand"); poolArea.add(ViewField.this.lblHand, constraintsL); - ViewField.this.lblLibrary = new DetailLabel(FSkin.SkinProp.ICON_ZONE_LIBRARY, "99"); + ViewField.this.lblLibrary = new DetailLabel(FSkin.ZoneIcons.ICO_LIBRARY, "99"); ViewField.this.lblLibrary.setToolTipText("Cards in library"); poolArea.add(ViewField.this.lblLibrary, constraintsR); - ViewField.this.lblGraveyard = new DetailLabel(FSkin.SkinProp.ICON_ZONE_GRAVEYARD, "99"); + ViewField.this.lblGraveyard = new DetailLabel(FSkin.ZoneIcons.ICO_GRAVEYARD, "99"); ViewField.this.lblGraveyard.setToolTipText("Cards in graveyard"); poolArea.add(ViewField.this.lblGraveyard, constraintsL); - ViewField.this.lblExile = new DetailLabel(FSkin.SkinProp.ICON_ZONE_EXILE, "99"); + ViewField.this.lblExile = new DetailLabel(FSkin.ZoneIcons.ICO_EXILE, "99"); ViewField.this.lblExile.setToolTipText("Exiled cards"); poolArea.add(ViewField.this.lblExile, constraintsR); - ViewField.this.lblFlashback = new DetailLabel(FSkin.SkinProp.ICON_ZONE_FLASHBACK, "99"); + ViewField.this.lblFlashback = new DetailLabel(FSkin.ZoneIcons.ICO_FLASHBACK, "99"); ViewField.this.lblFlashback.setToolTipText("Flashback cards"); poolArea.add(ViewField.this.lblFlashback, constraintsL); - ViewField.this.lblPoison = new DetailLabel(FSkin.SkinProp.ICON_ZONE_POISON, "99"); + ViewField.this.lblPoison = new DetailLabel(FSkin.ZoneIcons.ICO_POISON, "99"); ViewField.this.lblPoison.setToolTipText("Poison counters"); poolArea.add(ViewField.this.lblPoison, constraintsR); // Black, Blue, Colorless, Green, Red, White mana labels - ViewField.this.lblBlack = new DetailLabel(FSkin.SkinProp.ICON_MANA_BLACK, "99"); + ViewField.this.lblBlack = new DetailLabel(FSkin.ManaIcons.ICO_BLACK, "99"); ViewField.this.lblBlack.setToolTipText("Black mana"); poolArea.add(ViewField.this.lblBlack, constraintsL); - ViewField.this.lblBlue = new DetailLabel(FSkin.SkinProp.ICON_MANA_BLUE, "99"); + ViewField.this.lblBlue = new DetailLabel(FSkin.ManaIcons.ICO_BLUE, "99"); ViewField.this.lblBlue.setToolTipText("Blue mana"); poolArea.add(ViewField.this.lblBlue, constraintsR); - ViewField.this.lblGreen = new DetailLabel(FSkin.SkinProp.ICON_MANA_GREEN, "99"); + ViewField.this.lblGreen = new DetailLabel(FSkin.ManaIcons.ICO_GREEN, "99"); ViewField.this.lblGreen.setToolTipText("Green mana"); poolArea.add(ViewField.this.lblGreen, constraintsL); - ViewField.this.lblRed = new DetailLabel(FSkin.SkinProp.ICON_MANA_RED, "99"); + ViewField.this.lblRed = new DetailLabel(FSkin.ManaIcons.ICO_RED, "99"); ViewField.this.lblRed.setToolTipText("Red mana"); poolArea.add(ViewField.this.lblRed, constraintsR); - ViewField.this.lblWhite = new DetailLabel(FSkin.SkinProp.ICON_MANA_WHITE, "99"); + ViewField.this.lblWhite = new DetailLabel(FSkin.ManaIcons.ICO_WHITE, "99"); ViewField.this.lblWhite.setToolTipText("White mana"); poolArea.add(ViewField.this.lblWhite, constraintsL); - ViewField.this.lblColorless = new DetailLabel(FSkin.SkinProp.ICON_MANA_COLORLESS, "99"); + ViewField.this.lblColorless = new DetailLabel(FSkin.ManaIcons.ICO_COLORLESS, "99"); ViewField.this.lblColorless.setToolTipText("Colorless mana"); poolArea.add(ViewField.this.lblColorless, constraintsR); } @@ -357,14 +357,14 @@ public class ViewField extends FRoundedPanel { this.getLblLife().setForeground(Color.red); } else { - this.getLblLife().setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.getLblLife().setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); } if (p0.getPoisonCounters() >= 8) { this.getLblPoison().setForeground(Color.red); } else { - this.getLblPoison().setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.getLblPoison().setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); } //mana pool @@ -664,7 +664,7 @@ public class ViewField extends FRoundedPanel { this.setText(txt0); this.setOpaque(false); - this.setForeground(ViewField.this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setForeground(ViewField.this.skin.getColor(FSkin.Colors.CLR_TEXT)); this.setPreferredSize(this.labelSize); this.setMaximumSize(this.labelSize); this.setMinimumSize(this.labelSize); @@ -676,9 +676,9 @@ public class ViewField extends FRoundedPanel { ViewField.this.counter++; if (((ViewField.this.counter % 4) == 2) || ((ViewField.this.counter % 4) == 3)) { - this.defaultBG = ViewField.this.skin.getColor(FSkin.SkinProp.CLR_ZEBRA); + this.defaultBG = ViewField.this.skin.getColor(FSkin.Colors.CLR_ZEBRA); } else { - this.defaultBG = ViewField.this.skin.getColor(FSkin.SkinProp.CLR_THEME); + this.defaultBG = ViewField.this.skin.getColor(FSkin.Colors.CLR_THEME); } this.setBackground(this.defaultBG); @@ -696,7 +696,7 @@ public class ViewField extends FRoundedPanel { @Override public void mouseEntered(final MouseEvent e) { DetailLabel.this.setBackground(DetailLabel.this.hoverBG); - DetailLabel.this.clrBorders = ViewField.this.skin.getColor(FSkin.SkinProp.CLR_BORDERS); + DetailLabel.this.clrBorders = ViewField.this.skin.getColor(FSkin.Colors.CLR_BORDERS); } @Override @@ -706,7 +706,7 @@ public class ViewField extends FRoundedPanel { } }; - this.hoverBG = ViewField.this.skin.getColor(FSkin.SkinProp.CLR_HOVER); + this.hoverBG = ViewField.this.skin.getColor(FSkin.Colors.CLR_HOVER); this.clrBorders = ViewField.this.transparent; } diff --git a/src/main/java/forge/view/match/ViewHand.java b/src/main/java/forge/view/match/ViewHand.java index 30cddb0c910..36fb58b9870 100644 --- a/src/main/java/forge/view/match/ViewHand.java +++ b/src/main/java/forge/view/match/ViewHand.java @@ -44,7 +44,7 @@ public class ViewHand extends FRoundedPanel { public ViewHand(MatchTopLevel v0) { final JScrollPane scroller = new JScrollPane(); ViewHand.this.hand = new HandArea(scroller); - ViewHand.this.setBackground(Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_THEME)); + ViewHand.this.setBackground(Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_THEME)); topLevel = v0; scroller.setViewportView(ViewHand.this.hand); diff --git a/src/main/java/forge/view/match/ViewInput.java b/src/main/java/forge/view/match/ViewInput.java index a2b38fcee28..0d383cad9db 100644 --- a/src/main/java/forge/view/match/ViewInput.java +++ b/src/main/java/forge/view/match/ViewInput.java @@ -60,8 +60,8 @@ public class ViewInput extends FRoundedPanel { super(); this.skin = Singletons.getView().getSkin(); this.setToolTipText("Input Area"); - this.setBackground(this.skin.getColor(FSkin.SkinProp.CLR_THEME)); - this.setForeground(this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setBackground(this.skin.getColor(FSkin.Colors.CLR_THEME)); + this.setForeground(this.skin.getColor(FSkin.Colors.CLR_TEXT)); this.setLayout(new MigLayout("wrap 2, fill, insets 0, gap 0")); // Cancel button @@ -71,9 +71,9 @@ public class ViewInput extends FRoundedPanel { // Game counter lblGames = new JLabel(); lblGames.setFont(skin.getBoldFont(12)); - lblGames.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblGames.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblGames.setHorizontalAlignment(SwingConstants.CENTER); - lblGames.setBorder(new MatteBorder(0, 0, 1, 0, skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + lblGames.setBorder(new MatteBorder(0, 0, 1, 0, skin.getColor(FSkin.Colors.CLR_BORDERS))); this.tarMessage = new JTextArea(); this.tarMessage.setOpaque(false); @@ -81,7 +81,7 @@ public class ViewInput extends FRoundedPanel { this.tarMessage.setEditable(false); this.tarMessage.setLineWrap(true); this.tarMessage.setWrapStyleWord(true); - this.tarMessage.setForeground(this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.tarMessage.setForeground(this.skin.getColor(FSkin.Colors.CLR_TEXT)); this.tarMessage.setFont(this.skin.getFont(16)); this.add(this.lblGames, "span 2 1, w 96%!, gapleft 2%, h 10%, wrap"); this.add(this.tarMessage, "span 2 1, h 70%!, w 96%!, gapleft 2%, gaptop 1%"); diff --git a/src/main/java/forge/view/match/ViewPicture.java b/src/main/java/forge/view/match/ViewPicture.java index 37892567156..2d71c68df98 100644 --- a/src/main/java/forge/view/match/ViewPicture.java +++ b/src/main/java/forge/view/match/ViewPicture.java @@ -42,7 +42,7 @@ public class ViewPicture extends FRoundedPanel { pnlPicture = new CardPicturePanel(null); pnlPicture.setOpaque(false); - this.setBackground(Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_THEME)); + this.setBackground(Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_THEME)); this.setLayout(new MigLayout("insets 0, gap 0, center")); add(pnlPicture, "w 100%!, h 100%!"); diff --git a/src/main/java/forge/view/match/ViewTabber.java b/src/main/java/forge/view/match/ViewTabber.java index bd280539487..94cd9d4208b 100644 --- a/src/main/java/forge/view/match/ViewTabber.java +++ b/src/main/java/forge/view/match/ViewTabber.java @@ -99,9 +99,9 @@ public class ViewTabber extends FRoundedPanel { */ public ViewTabber() { this.skin = Singletons.getView().getSkin(); - this.hoverColor = this.skin.getColor(FSkin.SkinProp.CLR_HOVER); - this.activeColor = this.skin.getColor(FSkin.SkinProp.CLR_ACTIVE); - this.inactiveColor = this.skin.getColor(FSkin.SkinProp.CLR_INACTIVE); + this.hoverColor = this.skin.getColor(FSkin.Colors.CLR_HOVER); + this.activeColor = this.skin.getColor(FSkin.Colors.CLR_ACTIVE); + this.inactiveColor = this.skin.getColor(FSkin.Colors.CLR_INACTIVE); // Assemble card pic viewer this.panelList = new ArrayList(); @@ -158,7 +158,7 @@ public class ViewTabber extends FRoundedPanel { this.populatePnlConsole(); this.vtpTabber = new FVerticalTabPanel(this.panelList); - this.setBackground(skin.getColor(FSkin.SkinProp.CLR_THEME)); + this.setBackground(skin.getColor(FSkin.Colors.CLR_THEME)); this.setLayout(new MigLayout("insets 0, gap 0")); this.add(vtpTabber, "w 97%!, h 100%!, gapleft 2%"); @@ -334,7 +334,7 @@ public class ViewTabber extends FRoundedPanel { return new Color[] { new Color(111, 75, 43), Color.white }; } - return new Color[] { new Color(0, 0, 0, 0), skin.getColor(FSkin.SkinProp.CLR_TEXT) }; + return new Color[] { new Color(0, 0, 0, 0), skin.getColor(FSkin.Colors.CLR_TEXT) }; } /** @@ -358,7 +358,7 @@ public class ViewTabber extends FRoundedPanel { this.combatTARs.clear(); this.control.showPnlCombat(); - final Border border = new MatteBorder(0, 0, 0, 0, skin.getColor(FSkin.SkinProp.CLR_BORDERS)); + final Border border = new MatteBorder(0, 0, 0, 0, skin.getColor(FSkin.Colors.CLR_BORDERS)); this.vtpTabber.getAllVTabs().get(ControlTabber.COMBAT_PANEL) .setText("Combat : " + AllZone.getCombat().getAttackers().length); @@ -366,7 +366,7 @@ public class ViewTabber extends FRoundedPanel { final JTextArea tar = new JTextArea(s); tar.setOpaque(false); tar.setBorder(border); - tar.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + tar.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); tar.setFocusable(false); tar.setLineWrap(true); this.pnlCombat.add(tar, "w 95%!, gapleft 3%, gaptop 1%, h 95%"); @@ -390,7 +390,7 @@ public class ViewTabber extends FRoundedPanel { JTextArea tar = new JTextArea(gl.getLogText(3)); tar.setOpaque(false); // tar.setBorder(border); - tar.setForeground(this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); + tar.setForeground(this.skin.getColor(FSkin.Colors.CLR_TEXT)); tar.setFocusable(false); tar.setEditable(false); @@ -600,7 +600,7 @@ public class ViewTabber extends FRoundedPanel { this.infoLBLs.put(p, new JLabel[] { name, life, hand, draw, prevention, keywords, antes }); // Set border on bottom label, and larger font on player name - antes.setBorder(new MatteBorder(0, 0, 1, 0, this.skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + antes.setBorder(new MatteBorder(0, 0, 1, 0, this.skin.getColor(FSkin.Colors.CLR_BORDERS))); name.setText(p.getName()); // Add to "players" tab panel @@ -680,8 +680,8 @@ public class ViewTabber extends FRoundedPanel { log.setWrapStyleWord(true); log.setEditable(false); log.setFocusable(false); - log.setForeground(this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); - log.setBorder(new MatteBorder(1, 0, 0, 0, this.skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + log.setForeground(this.skin.getColor(FSkin.Colors.CLR_TEXT)); + log.setBorder(new MatteBorder(1, 0, 0, 0, this.skin.getColor(FSkin.Colors.CLR_BORDERS))); log.setText("No log information yet. Input codes entered above. " + "Output data recorded below."); @@ -746,7 +746,7 @@ public class ViewTabber extends FRoundedPanel { this.r = 6; // Radius (for paintComponent) this.i = 2; // Insets (for paintComponent) this.setEnabled(true); - this.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.addMouseListener(new MouseAdapter() { @Override @@ -836,7 +836,7 @@ public class ViewTabber extends FRoundedPanel { private class InfoLabel extends JLabel { public InfoLabel() { super(); - this.setForeground(ViewTabber.this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setForeground(ViewTabber.this.skin.getColor(FSkin.Colors.CLR_TEXT)); } } diff --git a/src/main/java/forge/view/toolbox/DeckLister.java b/src/main/java/forge/view/toolbox/DeckLister.java index 7441d4ef0dc..dd3b07827be 100644 --- a/src/main/java/forge/view/toolbox/DeckLister.java +++ b/src/main/java/forge/view/toolbox/DeckLister.java @@ -70,9 +70,9 @@ public class DeckLister extends JPanel { this.cmdEditorExit = cmd0; this.clrDefault = new Color(0, 0, 0, 0); - this.clrHover = skin.getColor(FSkin.SkinProp.CLR_HOVER); - this.clrActive = skin.getColor(FSkin.SkinProp.CLR_ACTIVE); - this.clrBorders = skin.getColor(FSkin.SkinProp.CLR_BORDERS); + this.clrHover = skin.getColor(FSkin.Colors.CLR_HOVER); + this.clrActive = skin.getColor(FSkin.Colors.CLR_ACTIVE); + this.clrBorders = skin.getColor(FSkin.Colors.CLR_BORDERS); this.setOpaque(false); this.setLayout(new MigLayout("insets 0, gap 0, wrap")); @@ -92,7 +92,7 @@ public class DeckLister extends JPanel { // Note: careful with the widths of the rows here; // scroll panes will have difficulty dynamically resizing if 100% width is set. JPanel rowTitle = new TitlePanel(); - rowTitle.setBackground(skin.getColor(FSkin.SkinProp.CLR_ZEBRA)); + rowTitle.setBackground(skin.getColor(FSkin.Colors.CLR_ZEBRA)); rowTitle.setLayout(new MigLayout("insets 0, gap 0")); rowTitle.add(new FLabel("Delete", SwingConstants.CENTER), "w 10%!, h 20px!, gaptop 5px"); rowTitle.add(new FLabel("Edit", SwingConstants.CENTER), "w 10%!, h 20px!, gaptop 5px"); @@ -282,7 +282,7 @@ public class DeckLister extends JPanel { public GenericLabel(String txt0) { super(txt0); setHorizontalAlignment(SwingConstants.CENTER); - setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); setFont(skin.getBoldFont(12)); } } diff --git a/src/main/java/forge/view/toolbox/FButton.java b/src/main/java/forge/view/toolbox/FButton.java index 6ad85f1b074..efd236422fa 100644 --- a/src/main/java/forge/view/toolbox/FButton.java +++ b/src/main/java/forge/view/toolbox/FButton.java @@ -70,16 +70,16 @@ public class FButton extends JButton { super(msg); this.skin = Singletons.getView().getSkin(); this.setOpaque(false); - this.setForeground(this.skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setForeground(this.skin.getColor(FSkin.Colors.CLR_TEXT)); this.setBackground(Color.red); this.setFocusPainted(false); this.setBorder(BorderFactory.createEmptyBorder()); this.setContentAreaFilled(false); this.setMargin(new Insets(0, 25, 0, 25)); this.setFont(this.skin.getBoldFont(14)); - this.imgL = skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_LEFT).getImage(); - this.imgM = skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_CENTER).getImage(); - this.imgR = skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_RIGHT).getImage(); + this.imgL = skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_LEFT).getImage(); + this.imgM = skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_CENTER).getImage(); + this.imgR = skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_RIGHT).getImage(); if ((this.imgL != null) && (this.imgM != null) && (this.imgR != null)) { this.allImagesPresent = true; @@ -101,9 +101,9 @@ public class FButton extends JButton { if (isToggled()) { return; } if (FButton.this.isEnabled()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_OVER_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_OVER_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_OVER_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_OVER_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_OVER_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_OVER_RIGHT).getImage(); } } @@ -112,14 +112,14 @@ public class FButton extends JButton { if (isToggled()) { return; } if (FButton.this.isEnabled() && !FButton.this.isFocusOwner()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_RIGHT).getImage(); } else if (FButton.this.isEnabled() && FButton.this.isFocusOwner()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_FOCUS_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_FOCUS_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_FOCUS_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_FOCUS_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_FOCUS_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_FOCUS_RIGHT).getImage(); } } @@ -128,9 +128,9 @@ public class FButton extends JButton { if (isToggled()) { return; } if (FButton.this.isEnabled()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DOWN_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DOWN_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DOWN_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DOWN_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DOWN_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DOWN_RIGHT).getImage(); } } @@ -139,9 +139,9 @@ public class FButton extends JButton { if (isToggled()) { return; } if (FButton.this.isEnabled()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DOWN_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DOWN_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DOWN_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DOWN_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DOWN_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DOWN_RIGHT).getImage(); } } }); @@ -152,9 +152,9 @@ public class FButton extends JButton { if (isToggled()) { return; } if (FButton.this.isEnabled()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_FOCUS_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_FOCUS_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_FOCUS_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_FOCUS_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_FOCUS_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_FOCUS_RIGHT).getImage(); } addKeyListener(klEnter); @@ -164,9 +164,9 @@ public class FButton extends JButton { if (isToggled()) { return; } if (FButton.this.isEnabled()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_RIGHT).getImage(); } removeKeyListener(klEnter); @@ -177,14 +177,14 @@ public class FButton extends JButton { @Override public void setEnabled(boolean b0) { if (!b0) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DISABLED_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DISABLED_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DISABLED_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DISABLED_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DISABLED_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DISABLED_RIGHT).getImage(); } else { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_RIGHT).getImage(); } super.setEnabled(b0); @@ -202,20 +202,20 @@ public class FButton extends JButton { /** @param b0   boolean. */ public void setToggled(boolean b0) { if (b0) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_TOGGLE_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_TOGGLE_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_TOGGLE_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_TOGGLE_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_TOGGLE_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_TOGGLE_RIGHT).getImage(); } else if (isEnabled()) { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_UP_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_UP_RIGHT).getImage(); repaint(); } else { - FButton.this.imgL = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DISABLED_LEFT).getImage(); - FButton.this.imgM = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DISABLED_CENTER).getImage(); - FButton.this.imgR = FButton.this.skin.getIcon(FSkin.SkinProp.IMG_BTN_DISABLED_RIGHT).getImage(); + FButton.this.imgL = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DISABLED_LEFT).getImage(); + FButton.this.imgM = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DISABLED_CENTER).getImage(); + FButton.this.imgR = FButton.this.skin.getIcon(FSkin.ButtonImages.IMG_BTN_DISABLED_RIGHT).getImage(); repaint(); } this.toggle = b0; diff --git a/src/main/java/forge/view/toolbox/FCheckBox.java b/src/main/java/forge/view/toolbox/FCheckBox.java index f0c6b566b04..c0188d06157 100644 --- a/src/main/java/forge/view/toolbox/FCheckBox.java +++ b/src/main/java/forge/view/toolbox/FCheckBox.java @@ -23,8 +23,8 @@ public class FCheckBox extends JCheckBox { public FCheckBox(final String s0) { super(s0); this.skin = Singletons.getView().getSkin(); - this.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); - this.setBackground(skin.getColor(FSkin.SkinProp.CLR_HOVER)); + this.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); + this.setBackground(skin.getColor(FSkin.Colors.CLR_HOVER)); this.setFont(skin.getFont(14)); this.setOpaque(false); diff --git a/src/main/java/forge/view/toolbox/FLabel.java b/src/main/java/forge/view/toolbox/FLabel.java index dc3a800307a..ce4f7e50e07 100644 --- a/src/main/java/forge/view/toolbox/FLabel.java +++ b/src/main/java/forge/view/toolbox/FLabel.java @@ -63,7 +63,7 @@ public class FLabel extends JLabel { public FLabel(final String s0) { super(s0); this.skin = Singletons.getView().getSkin(); - this.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.cadResize = new ComponentAdapter() { @Override diff --git a/src/main/java/forge/view/toolbox/FList.java b/src/main/java/forge/view/toolbox/FList.java index d66f2a50144..c1328aa61ac 100644 --- a/src/main/java/forge/view/toolbox/FList.java +++ b/src/main/java/forge/view/toolbox/FList.java @@ -9,7 +9,6 @@ import javax.swing.ListCellRenderer; import javax.swing.border.EmptyBorder; import forge.Singletons; -import forge.view.toolbox.FSkin.SkinProp; /** * A JList object using Forge skin properties. @@ -53,8 +52,8 @@ public class FList extends JList { lst0, val0, i0, isSelected, cellHasFocus); lblItem.setBorder(new EmptyBorder(4, 3, 4, 3)); - lblItem.setBackground(skin.getColor(SkinProp.CLR_ACTIVE)); - lblItem.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + lblItem.setBackground(skin.getColor(FSkin.Colors.CLR_ACTIVE)); + lblItem.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); lblItem.setFont(skin.getFont(13)); lblItem.setOpaque(isSelected); return lblItem; diff --git a/src/main/java/forge/view/toolbox/FRadioButton.java b/src/main/java/forge/view/toolbox/FRadioButton.java index 5e2e8a84ec9..ff36ea8f99d 100644 --- a/src/main/java/forge/view/toolbox/FRadioButton.java +++ b/src/main/java/forge/view/toolbox/FRadioButton.java @@ -24,8 +24,8 @@ public class FRadioButton extends JRadioButton { super(); this.setText(s0); this.skin = Singletons.getView().getSkin(); - this.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); - this.setBackground(skin.getColor(FSkin.SkinProp.CLR_HOVER)); + this.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); + this.setBackground(skin.getColor(FSkin.Colors.CLR_HOVER)); this.setFont(skin.getFont(14)); this.setOpaque(false); diff --git a/src/main/java/forge/view/toolbox/FRoundedPanel.java b/src/main/java/forge/view/toolbox/FRoundedPanel.java index b29bf15a883..2f9e409209d 100644 --- a/src/main/java/forge/view/toolbox/FRoundedPanel.java +++ b/src/main/java/forge/view/toolbox/FRoundedPanel.java @@ -42,7 +42,7 @@ public class FRoundedPanel extends JPanel { private boolean[] borders = { true, true, true, true }; private boolean[] corners = { true, true, true, true }; // NW, SW, SE, NE private Color shadowColor = new Color(150, 150, 150, 150); - private Color borderColor = Singletons.getView().getSkin().getColor(FSkin.SkinProp.CLR_BORDERS); + private Color borderColor = Singletons.getView().getSkin().getColor(FSkin.Colors.CLR_BORDERS); private int shadowOffset = 5; private int cornerRadius = 10; private boolean showShadow = false; diff --git a/src/main/java/forge/view/toolbox/FScrollPane.java b/src/main/java/forge/view/toolbox/FScrollPane.java index 1f17b73a30d..92c8246094b 100644 --- a/src/main/java/forge/view/toolbox/FScrollPane.java +++ b/src/main/java/forge/view/toolbox/FScrollPane.java @@ -24,7 +24,7 @@ public class FScrollPane extends JScrollPane { getViewport().setOpaque(false); skin = Singletons.getView().getSkin(); - setBorder(new LineBorder(skin.getColor(FSkin.SkinProp.CLR_BORDERS), 1)); + setBorder(new LineBorder(skin.getColor(FSkin.Colors.CLR_BORDERS), 1)); setOpaque(false); } } diff --git a/src/main/java/forge/view/toolbox/FSkin.java b/src/main/java/forge/view/toolbox/FSkin.java index 964a813eba9..f9fc1e1f2ae 100644 --- a/src/main/java/forge/view/toolbox/FSkin.java +++ b/src/main/java/forge/view/toolbox/FSkin.java @@ -45,12 +45,17 @@ import forge.gui.GuiUtils; public class FSkin { /** Properties of various components that make up the skin. */ - public enum SkinProp { - /** These correspond to objects stored HashMaps. */ + public interface SkinProp { } + + /** */ + public enum Backgrounds implements SkinProp { /** */ BG_SPLASH, /** */ BG_TEXTURE, /** */ BG_MATCH, /** */ + } + /** */ + public enum Colors implements SkinProp { /** */ CLR_THEME, /** */ CLR_BORDERS, /** */ CLR_ZEBRA, /** */ @@ -58,30 +63,45 @@ public class FSkin { CLR_ACTIVE, /** */ CLR_INACTIVE, /** */ CLR_TEXT, /** */ + } - ICON_ZONE_HAND, /** */ - ICON_ZONE_LIBRARY, /** */ - ICON_ZONE_EXILE, /** */ - ICON_ZONE_FLASHBACK, /** */ - ICON_ZONE_GRAVEYARD, /** */ - ICON_ZONE_POISON, /** */ + /** */ + public enum ZoneIcons implements SkinProp { /** */ + ICO_HAND, /** */ + ICO_LIBRARY, /** */ + ICO_EXILE, /** */ + ICO_FLASHBACK, /** */ + ICO_GRAVEYARD, /** */ + ICO_POISON, /** */ + } - ICON_MANA_BLACK, /** */ - ICON_MANA_BLUE, /** */ - ICON_MANA_GREEN, /** */ - ICON_MANA_RED, /** */ - ICON_MANA_WHITE, /** */ - ICON_MANA_COLORLESS, /** */ + /** */ + public enum ManaIcons implements SkinProp { /** */ + ICO_BLACK, /** */ + ICO_BLUE, /** */ + ICO_GREEN, /** */ + ICO_RED, /** */ + ICO_WHITE, /** */ + ICO_COLORLESS, /** */ + } - ICON_DOCK_SHORTCUTS, /** */ - ICON_DOCK_SETTINGS, /** */ - ICON_DOCK_ENDTURN, /** */ - ICON_DOCK_CONCEDE, /** */ - ICON_DOCK_DECKLIST, /** */ + /** */ + public enum DockIcons implements SkinProp { /** */ + ICO_SHORTCUTS, /** */ + ICO_SETTINGS, /** */ + ICO_ENDTURN, /** */ + ICO_CONCEDE, /** */ + ICO_DECKLIST, /** */ + } + /** */ + public enum ForgeIcons implements SkinProp { /** */ IMG_LOGO, /** */ IMG_FAVICON, /** */ + } + /** */ + public enum ButtonImages implements SkinProp { /** */ IMG_BTN_START_UP, /** */ IMG_BTN_START_OVER, /** */ IMG_BTN_START_DOWN, /** */ @@ -166,7 +186,7 @@ public class FSkin { final int h = img.getHeight(); final int w = img.getWidth(); - this.setIcon(SkinProp.BG_SPLASH, img.getSubimage(0, 0, w, h - 100)); + this.setIcon(Backgrounds.BG_SPLASH, img.getSubimage(0, 0, w, h - 100)); UIManager.put("ProgressBar.background", this.getColorFromPixel(img.getRGB(25, h - 75))); UIManager.put("ProgressBar.selectionBackground", this.getColorFromPixel(img.getRGB(75, h - 75))); @@ -256,8 +276,8 @@ public class FSkin { // Put various images into map (except sprite and splash). // Exceptions handled inside method. - this.setIcon(SkinProp.BG_TEXTURE, preferredDir + FILE_TEXTURE_BG); - this.setIcon(SkinProp.BG_MATCH, preferredDir + FILE_MATCH_BG); + this.setIcon(Backgrounds.BG_TEXTURE, preferredDir + FILE_TEXTURE_BG); + this.setIcon(Backgrounds.BG_MATCH, preferredDir + FILE_MATCH_BG); // Sprite final File file = new File(preferredDir + FILE_SPRITE); @@ -266,68 +286,68 @@ public class FSkin { try { image = ImageIO.read(file); - this.setColor(SkinProp.CLR_THEME, this.getColorFromPixel(image.getRGB(70, 10))); - this.setColor(SkinProp.CLR_BORDERS, this.getColorFromPixel(image.getRGB(70, 30))); - this.setColor(SkinProp.CLR_ZEBRA, this.getColorFromPixel(image.getRGB(70, 50))); - this.setColor(SkinProp.CLR_HOVER, this.getColorFromPixel(image.getRGB(70, 70))); - this.setColor(SkinProp.CLR_ACTIVE, this.getColorFromPixel(image.getRGB(70, 90))); - this.setColor(SkinProp.CLR_INACTIVE, this.getColorFromPixel(image.getRGB(70, 110))); - this.setColor(SkinProp.CLR_TEXT, this.getColorFromPixel(image.getRGB(70, 130))); + this.setColor(Colors.CLR_THEME, this.getColorFromPixel(image.getRGB(70, 10))); + this.setColor(Colors.CLR_BORDERS, this.getColorFromPixel(image.getRGB(70, 30))); + this.setColor(Colors.CLR_ZEBRA, this.getColorFromPixel(image.getRGB(70, 50))); + this.setColor(Colors.CLR_HOVER, this.getColorFromPixel(image.getRGB(70, 70))); + this.setColor(Colors.CLR_ACTIVE, this.getColorFromPixel(image.getRGB(70, 90))); + this.setColor(Colors.CLR_INACTIVE, this.getColorFromPixel(image.getRGB(70, 110))); + this.setColor(Colors.CLR_TEXT, this.getColorFromPixel(image.getRGB(70, 130))); } catch (final IOException e) { System.err.println(this.notfound + preferredDir + FILE_SPRITE); e.printStackTrace(); } - this.setIconAndIncrement(SkinProp.ICON_ZONE_LIBRARY, 280, 0, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_ZONE_HAND, 280, 40, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_ZONE_FLASHBACK, 280, 80, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_ZONE_GRAVEYARD, 320, 0, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_ZONE_EXILE, 320, 40, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_ZONE_POISON, 320, 80, 40, 40); + this.setIconAndIncrement(ZoneIcons.ICO_LIBRARY, 280, 0, 40, 40); + this.setIconAndIncrement(ZoneIcons.ICO_HAND, 280, 40, 40, 40); + this.setIconAndIncrement(ZoneIcons.ICO_FLASHBACK, 280, 80, 40, 40); + this.setIconAndIncrement(ZoneIcons.ICO_GRAVEYARD, 320, 0, 40, 40); + this.setIconAndIncrement(ZoneIcons.ICO_EXILE, 320, 40, 40, 40); + this.setIconAndIncrement(ZoneIcons.ICO_POISON, 320, 80, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_MANA_BLACK, 360, 160, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_MANA_BLUE, 360, 200, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_MANA_RED, 400, 160, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_MANA_GREEN, 400, 200, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_MANA_COLORLESS, 440, 160, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_MANA_WHITE, 440, 200, 40, 40); + this.setIconAndIncrement(ManaIcons.ICO_BLACK, 360, 160, 40, 40); + this.setIconAndIncrement(ManaIcons.ICO_BLUE, 360, 200, 40, 40); + this.setIconAndIncrement(ManaIcons.ICO_RED, 400, 160, 40, 40); + this.setIconAndIncrement(ManaIcons.ICO_GREEN, 400, 200, 40, 40); + this.setIconAndIncrement(ManaIcons.ICO_COLORLESS, 440, 160, 40, 40); + this.setIconAndIncrement(ManaIcons.ICO_WHITE, 440, 200, 40, 40); - this.setIconAndIncrement(SkinProp.ICON_DOCK_SETTINGS, 80, 640, 80, 80); - this.setIconAndIncrement(SkinProp.ICON_DOCK_SHORTCUTS, 160, 640, 80, 80); - this.setIconAndIncrement(SkinProp.ICON_DOCK_CONCEDE, 240, 640, 80, 80); - this.setIconAndIncrement(SkinProp.ICON_DOCK_ENDTURN, 320, 640, 80, 80); - this.setIconAndIncrement(SkinProp.ICON_DOCK_DECKLIST, 400, 640, 80, 80); + this.setIconAndIncrement(DockIcons.ICO_SETTINGS, 80, 640, 80, 80); + this.setIconAndIncrement(DockIcons.ICO_SHORTCUTS, 160, 640, 80, 80); + this.setIconAndIncrement(DockIcons.ICO_CONCEDE, 240, 640, 80, 80); + this.setIconAndIncrement(DockIcons.ICO_ENDTURN, 320, 640, 80, 80); + this.setIconAndIncrement(DockIcons.ICO_DECKLIST, 400, 640, 80, 80); - this.setIconAndIncrement(SkinProp.IMG_LOGO, 480, 0, 200, 200); - this.setIconAndIncrement(SkinProp.IMG_FAVICON, 0, 720, 80, 80); + this.setIconAndIncrement(ForgeIcons.IMG_LOGO, 480, 0, 200, 200); + this.setIconAndIncrement(ForgeIcons.IMG_FAVICON, 0, 720, 80, 80); - this.setIconAndIncrement(SkinProp.IMG_BTN_START_UP, 480, 200, 160, 80); - this.setIconAndIncrement(SkinProp.IMG_BTN_START_OVER, 480, 280, 160, 80); - this.setIconAndIncrement(SkinProp.IMG_BTN_START_DOWN, 480, 360, 160, 80); + this.setIconAndIncrement(ButtonImages.IMG_BTN_START_UP, 480, 200, 160, 80); + this.setIconAndIncrement(ButtonImages.IMG_BTN_START_OVER, 480, 280, 160, 80); + this.setIconAndIncrement(ButtonImages.IMG_BTN_START_DOWN, 480, 360, 160, 80); - this.setIconAndIncrement(SkinProp.IMG_BTN_UP_LEFT, 80, 0, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_UP_CENTER, 120, 0, 1, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_UP_RIGHT, 160, 0, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_UP_LEFT, 80, 0, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_UP_CENTER, 120, 0, 1, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_UP_RIGHT, 160, 0, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_OVER_LEFT, 80, 40, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_OVER_CENTER, 120, 40, 1, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_OVER_RIGHT, 160, 40, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_OVER_LEFT, 80, 40, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_OVER_CENTER, 120, 40, 1, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_OVER_RIGHT, 160, 40, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_DOWN_LEFT, 80, 80, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_DOWN_CENTER, 120, 80, 1, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_DOWN_RIGHT, 160, 80, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_DOWN_LEFT, 80, 80, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_DOWN_CENTER, 120, 80, 1, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_DOWN_RIGHT, 160, 80, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_FOCUS_LEFT, 80, 120, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_FOCUS_CENTER, 120, 120, 1, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_FOCUS_RIGHT, 160, 120, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_FOCUS_LEFT, 80, 120, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_FOCUS_CENTER, 120, 120, 1, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_FOCUS_RIGHT, 160, 120, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_TOGGLE_LEFT, 80, 160, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_TOGGLE_CENTER, 120, 160, 1, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_TOGGLE_RIGHT, 160, 160, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_TOGGLE_LEFT, 80, 160, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_TOGGLE_CENTER, 120, 160, 1, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_TOGGLE_RIGHT, 160, 160, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_DISABLED_LEFT, 80, 200, 40, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_DISABLED_CENTER, 120, 200, 1, 40); - this.setIconAndIncrement(SkinProp.IMG_BTN_DISABLED_RIGHT, 160, 200, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_DISABLED_LEFT, 80, 200, 40, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_DISABLED_CENTER, 120, 200, 1, 40); + this.setIconAndIncrement(ButtonImages.IMG_BTN_DISABLED_RIGHT, 160, 200, 40, 40); } /** diff --git a/src/main/java/forge/view/toolbox/FTextArea.java b/src/main/java/forge/view/toolbox/FTextArea.java index 379d06ec775..ad3ca895712 100644 --- a/src/main/java/forge/view/toolbox/FTextArea.java +++ b/src/main/java/forge/view/toolbox/FTextArea.java @@ -15,7 +15,7 @@ public class FTextArea extends JTextArea { public FTextArea() { super(); this.skin = Singletons.getView().getSkin(); - this.setForeground(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + this.setForeground(skin.getColor(FSkin.Colors.CLR_TEXT)); this.setOpaque(false); this.setWrapStyleWord(true); this.setLineWrap(true); diff --git a/src/main/java/forge/view/toolbox/FVerticalTabPanel.java b/src/main/java/forge/view/toolbox/FVerticalTabPanel.java index 65a2491bbb0..04016819e57 100644 --- a/src/main/java/forge/view/toolbox/FVerticalTabPanel.java +++ b/src/main/java/forge/view/toolbox/FVerticalTabPanel.java @@ -82,9 +82,9 @@ public class FVerticalTabPanel extends FPanel { this.setOpaque(false); final int size = childPanels.size(); this.skin = Singletons.getView().getSkin(); - this.hoverColor = this.skin.getColor(FSkin.SkinProp.CLR_HOVER); - this.activeColor = this.skin.getColor(FSkin.SkinProp.CLR_ACTIVE); - this.inactiveColor = this.skin.getColor(FSkin.SkinProp.CLR_INACTIVE); + this.hoverColor = this.skin.getColor(FSkin.Colors.CLR_HOVER); + this.activeColor = this.skin.getColor(FSkin.Colors.CLR_ACTIVE); + this.inactiveColor = this.skin.getColor(FSkin.Colors.CLR_INACTIVE); final int pctTabH = ((100 - 2 - 2) / size); final int pctTabW = 11; @@ -101,7 +101,7 @@ public class FVerticalTabPanel extends FPanel { // immediately to define grid. if (tabsOnRightSide) { this.add(this.pnlContent, "span 1 " + (size + 2) + ", w " + (100 - pctTabW) + "%!, h 100%!"); - this.pnlContent.setBorder(new MatteBorder(0, 0, 0, 1, this.skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + this.pnlContent.setBorder(new MatteBorder(0, 0, 0, 1, this.skin.getColor(FSkin.Colors.CLR_BORDERS))); } // Add top spacer in any case. @@ -113,7 +113,7 @@ public class FVerticalTabPanel extends FPanel { // must be added after spacer, which then defines the grid. if (!tabsOnRightSide) { this.add(this.pnlContent, "span 1 " + (size + 2) + ", w " + (100 - pctTabW) + "%!, h 100%!"); - this.pnlContent.setBorder(new MatteBorder(0, 1, 0, 0, this.skin.getColor(FSkin.SkinProp.CLR_BORDERS))); + this.pnlContent.setBorder(new MatteBorder(0, 1, 0, 0, this.skin.getColor(FSkin.Colors.CLR_BORDERS))); } // Add all tabs @@ -250,12 +250,12 @@ public class FVerticalTabPanel extends FPanel { if (tabsOnRightSide) { at.rotate(Math.toRadians(90), 0, 0); g2d.setTransform(at); - g2d.setColor(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + g2d.setColor(skin.getColor(FSkin.Colors.CLR_TEXT)); g2d.drawString(this.msg, 5, -4); } else { at.rotate(Math.toRadians(-90), 0, 0); g2d.setTransform(at); - g2d.setColor(skin.getColor(FSkin.SkinProp.CLR_TEXT)); + g2d.setColor(skin.getColor(FSkin.Colors.CLR_TEXT)); // Rotated, so follows: (this.msg, vertical coord, horizontal coord) g2d.drawString(this.msg, 8 - h, w - 6); }