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