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