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.BasicStroke;
18  import java.awt.Color;
19  import java.awt.Font;
20  import java.awt.Paint;
21  import java.awt.Stroke;
22  
23  /**
24   * An object of this class represents the prefcount Creme skin -
25   * the Substance's <code>org.jvnet.substance.skin.CremeSkin</code>.
26   * <p/>
27   * Created date: Jun 14, 2007
28   *
29   * @author Yevgeny Nyden
30   */
31  public class CremeSkin implements PrefSkin {
32  
33    /** Resource key for the skin name and the skins unique ID. */
34    public static final String NAME_KEY = "pref.skinMenu.creme";
35  
36    /** Main background color. */
37    public static final Color COLOR_BACKGROUND_MAIN = new Color(237, 241, 229);
38  
39    /** Board background paint. */
40    public static final Color PAINT_BACKGROUND_BOARD = new Color(255, 255, 255);
41  
42    /** Color for players names. */
43    private static final Color COLOR_PLAYER_NAME = new Color(0, 0, 0);
44  
45    /** Font for players names. */
46    private static final Font FONT_PLAYER_NAME = new Font("Arial Black", Font.PLAIN, 16);
47  
48    /** Stroke for players names. */
49    private static final Stroke STROKE_PLAYER_NAME = new BasicStroke(2);
50  
51    /** Color for players scores. */
52    private static final Color COLOR_PLAYER_SCORE = new Color(0, 0, 0);
53  
54    /** Font for players scores. */
55    private static final Font FONT_PLAYER_SCORE = new Font("Arial Black", Font.PLAIN, 16);
56  
57    /** Stroke for players scores. */
58    private static final Stroke STROKE_PLAYER_SCORE = new BasicStroke(1);
59  
60    /** Color for players totals (scores). */
61    private static final Color COLOR_PLAYER_TOTALS = new Color(0, 0, 0);
62  
63    /** Font for players totals (scores). */
64    private static final Font FONT_PLAYER_TOTALS = new Font("Arial Black", Font.PLAIN, 16);
65  
66    /** Stroke for players totals (scores). */
67    private static final Stroke STROKE_PLAYER_TOTALS = new BasicStroke(2);
68  
69    /** Color for the board lines. */
70    private static final Color COLOR_BOARD_LINES = new Color(0, 0, 0);
71  
72    /** Color for the board lines. */
73    private static final Stroke STROKE_BOARD_LINES = new BasicStroke(1);
74  
75    /** Paint to heighlight final score polygon. */
76    private static final Paint PAINT_FINAL_SCORE_BACKGROUND = new Color(150, 150, 150, 60);
77  
78    /** Paint for the main player section division lines. */
79    private static final Paint PAINT_MAIN_SECTION_LINES = new Color(0, 0, 0);
80  
81    /** {@inheritDoc} */
82    public String getSubstanceSkinClassName() {
83      return org.jvnet.substance.skin.CremeSkin.class.getName();
84    }
85  
86    /** {@inheritDoc} */
87    public String getNameResourceKey() {
88      return NAME_KEY;
89    }
90  
91    /** {@inheritDoc} */
92    public Color getMainBackgroundColor() {
93      return COLOR_BACKGROUND_MAIN;
94    }
95  
96    /** {@inheritDoc} */
97    public Paint getBoardBackgroundPaint() {
98      return PAINT_BACKGROUND_BOARD;
99    }
100 
101   /** {@inheritDoc} */
102   public Color getPlayerNameColor() {
103     return COLOR_PLAYER_NAME;
104   }
105 
106   /** {@inheritDoc} */
107   public Font getPlayerNameFont() {
108     return FONT_PLAYER_NAME;
109   }
110 
111   /** {@inheritDoc} */
112   public Stroke getPlayerNameStroke() {
113     return STROKE_PLAYER_NAME;
114   }
115 
116   /** {@inheritDoc} */
117   public Color getPlayerScoreColor() {
118     return COLOR_PLAYER_SCORE;
119   }
120 
121   /** {@inheritDoc} */
122   public Font getPlayerScoreFont() {
123     return FONT_PLAYER_SCORE;
124   }
125 
126   /** {@inheritDoc} */
127   public Stroke getPlayerScoreStroke() {
128     return STROKE_PLAYER_SCORE;
129   }
130 
131   /** {@inheritDoc} */
132   public Color getPlayerTotalsColor() {
133     return COLOR_PLAYER_TOTALS;
134   }
135 
136   /** {@inheritDoc} */
137   public Font getPlayerTotalsFont() {
138     return FONT_PLAYER_TOTALS;
139   }
140 
141   /** {@inheritDoc} */
142   public Stroke getPlayerTotalsStroke() {
143     return STROKE_PLAYER_TOTALS;
144   }
145 
146   /** {@inheritDoc} */
147   public Color getBoardLineColor() {
148     return COLOR_BOARD_LINES;
149   }
150 
151   /** {@inheritDoc} */
152   public Stroke getBoardLineStroke() {
153     return STROKE_BOARD_LINES;
154   }
155 
156   /** {@inheritDoc} */
157   public Paint getFinalScoreBackgroundPaint() {
158     return PAINT_FINAL_SCORE_BACKGROUND;
159   }
160 
161   /** {@inheritDoc} */
162   public Paint getMainSectionLinesPain() {
163     return PAINT_MAIN_SECTION_LINES;
164   }
165 
166 }