01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.midp.chameleon.skins.resources;
28:
29: import com.sun.midp.chameleon.skins.SkinPropertiesIDs;
30: import com.sun.midp.chameleon.skins.StringItemSkin;
31:
32: import javax.microedition.lcdui.Image;
33: import javax.microedition.lcdui.Font;
34:
35: public class StringItemResources {
36: private static boolean init;
37:
38: // private constructor
39: private StringItemResources() {
40: }
41:
42: public static void load() {
43: load(false);
44: }
45:
46: public static void load(boolean reload) {
47: if (init && !reload) {
48: return;
49: }
50:
51: StringItemSkin.PAD_BUTTON_H = SkinResources
52: .getInt(SkinPropertiesIDs.STRINGITEM_PAD_BUTTON_H);
53: StringItemSkin.PAD_BUTTON_V = SkinResources
54: .getInt(SkinPropertiesIDs.STRINGITEM_PAD_BUTTON_V);
55: StringItemSkin.BUTTON_BORDER_W = SkinResources
56: .getInt(SkinPropertiesIDs.STRINGITEM_BUTTON_BORDER_W);
57: StringItemSkin.COLOR_FG_LINK = SkinResources
58: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_FG_LNK);
59: StringItemSkin.COLOR_FG_LINK_FOCUS = SkinResources
60: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_FG_LNK_FOC);
61: StringItemSkin.COLOR_BG_LINK_FOCUS = SkinResources
62: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_BG_LNK_FOC);
63: StringItemSkin.COLOR_FG_BUTTON = SkinResources
64: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_FG_BTN);
65: StringItemSkin.COLOR_BG_BUTTON = SkinResources
66: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_BG_BTN);
67: StringItemSkin.COLOR_BORDER_LT = SkinResources
68: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_BORDER_LT);
69: StringItemSkin.COLOR_BORDER_DK = SkinResources
70: .getInt(SkinPropertiesIDs.STRINGITEM_COLOR_BORDER_DK);
71: StringItemSkin.FONT = SkinResources
72: .getFont(SkinPropertiesIDs.STRINGITEM_FONT);
73: StringItemSkin.FONT_LINK = SkinResources
74: .getFont(SkinPropertiesIDs.STRINGITEM_FONT_LNK);
75: StringItemSkin.FONT_BUTTON = SkinResources
76: .getFont(SkinPropertiesIDs.STRINGITEM_FONT_BTN);
77: StringItemSkin.IMAGE_LINK = SkinResources
78: .getImage(SkinPropertiesIDs.STRINGITEM_IMAGE_LNK);
79: StringItemSkin.IMAGE_BUTTON = SkinResources.getCompositeImage(
80: SkinPropertiesIDs.STRINGITEM_IMAGE_BTN, 9);
81:
82: init = true;
83: }
84: }
|