View Javadoc

1   /**
2    * This program is free software: you can redistribute it and/or modify
3    * it under the terms of the GNU General Public License as published by
4    * the Free Software Foundation, version 3.
5    *
6    * This program is distributed in the hope that it will be useful,
7    * but WITHOUT ANY WARRANTY; without even the implied warranty of
8    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9    * GNU General Public License for more details.
10   *
11   * You should have received a copy of the GNU General Public License
12   * along with this program. If not, see <http://www.gnu.org/licenses/>.
13   */
14  
15  package net.curre.prefcount.gui.theme.skin;
16  
17  import java.awt.*;
18  
19  import net.curre.prefcount.util.Utilities;
20  
21  /**
22   * An object of this class represents the prefcount Business skin -
23   * the Substance's <code>org.jvnet.substance.skin.BusinessSkin</code>.
24   * <p/>
25   * Created date: Jun 13, 2007
26   *
27   * @author Yevgeny Nyden
28   */
29  public class BusinessSkin implements PrefSkin {
30  
31    /** Resource key for the skin name and the skins unique ID. */
32    public static final String NAME_KEY = "pref.skinMenu.business";
33  
34    /** Main background color. */
35    public static final Color COLOR_BACKGROUND_MAIN = new Color(209, 214, 220);
36  
37    /** Board background paint. */
38    public static final Color PAINT_BACKGROUND_BOARD = new Color(173, 180, 188);
39  
40    /** Color for players names. */
41    private static final Color COLOR_PLAYER_NAME = new Color(255, 255, 255);
42  
43    /** Font for players names. */
44    private static final Font FONT_PLAYER_NAME = new Font("Arial Black", Font.BOLD, 16);
45  
46    /** Stroke for players names. */
47    private static final Stroke STROKE_PLAYER_NAME = new BasicStroke(2);
48  
49    /** Color for players scores. */
50    private static final Color COLOR_PLAYER_SCORE = new Color(255, 255, 255);
51  
52    /** Font for players scores. */
53    private static final Font FONT_PLAYER_SCORE = new Font("Arial Black", Font.BOLD, 16);
54  
55    /** Stroke for players scores. */
56    private static final Stroke STROKE_PLAYER_SCORE = new BasicStroke(2);
57  
58    /** Color for players totals (scores). */
59    private static final Color COLOR_PLAYER_TOTALS = new Color(255, 255, 255);
60  
61    /** Font for players totals (scores). */
62    private static final Font FONT_PLAYER_TOTALS = new Font("Arial Black", Font.BOLD, 16);
63  
64    /** Stroke for players totals (scores). */
65    private static final Stroke STROKE_PLAYER_TOTALS = new BasicStroke(2);
66  
67    /** Color for the board lines. */
68    private static final Color COLOR_BOARD_LINES = new Color(255, 255, 255);
69  
70    /** Color for the board lines. */
71    private static final Stroke STROKE_BOARD_LINES = new BasicStroke(1);
72  
73    /** {@inheritDoc} */
74    public String getSubstanceSkinClassName() {
75      return org.jvnet.substance.skin.BusinessSkin.class.getName();
76    }
77  
78    /** {@inheritDoc} */
79    public String getNameResourceKey() {
80      return NAME_KEY;
81    }
82  
83    /** {@inheritDoc} */
84    public Color getMainBackgroundColor() {
85      return COLOR_BACKGROUND_MAIN;
86    }
87  
88    /** {@inheritDoc} */
89    public Paint getBoardBackgroundPaint() {
90      return new GradientPaint(200f, 200f, PAINT_BACKGROUND_BOARD,
91                               500f, 500f, Utilities.createDarkerColor(PAINT_BACKGROUND_BOARD, 30));
92    }
93  
94    /** {@inheritDoc} */
95    public Color getPlayerNameColor() {
96      return COLOR_PLAYER_NAME;
97    }
98  
99    /** {@inheritDoc} */
100   public Font getPlayerNameFont() {
101     return FONT_PLAYER_NAME;
102   }
103 
104   /** {@inheritDoc} */
105   public Stroke getPlayerNameStroke() {
106     return STROKE_PLAYER_NAME;
107   }
108 
109   /** {@inheritDoc} */
110   public Color getPlayerScoreColor() {
111     return COLOR_PLAYER_SCORE;
112   }
113 
114   /** {@inheritDoc} */
115   public Font getPlayerScoreFont() {
116     return FONT_PLAYER_SCORE;
117   }
118 
119   /** {@inheritDoc} */
120   public Stroke getPlayerScoreStroke() {
121     return STROKE_PLAYER_SCORE;
122   }
123 
124   /** {@inheritDoc} */
125   public Color getPlayerTotalsColor() {
126     return COLOR_PLAYER_TOTALS;
127   }
128 
129   /** {@inheritDoc} */
130   public Font getPlayerTotalsFont() {
131     return FONT_PLAYER_TOTALS;
132   }
133 
134   /** {@inheritDoc} */
135   public Stroke getPlayerTotalsStroke() {
136     return STROKE_PLAYER_TOTALS;
137   }
138 
139   /** {@inheritDoc} */
140   public Color getBoardLineColor() {
141     return COLOR_BOARD_LINES;
142   }
143 
144   /** {@inheritDoc} */
145   public Stroke getBoardLineStroke() {
146     return STROKE_BOARD_LINES;
147   }
148 
149 }