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.ScrollIndSkin;
31:
32: import javax.microedition.lcdui.Image;
33: import javax.microedition.lcdui.Font;
34:
35: public class ScrollIndResources {
36: private static boolean init;
37:
38: // private constructor
39: private ScrollIndResources() {
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: ScrollIndSkin.MODE = SkinResources
52: .getInt(SkinPropertiesIDs.SCROLL_MODE);
53: ScrollIndSkin.WIDTH = SkinResources
54: .getInt(SkinPropertiesIDs.SCROLL_WIDTH);
55:
56: ScrollIndSkin.COLOR_BG = SkinResources
57: .getInt(SkinPropertiesIDs.SCROLL_COLOR_BG);
58: ScrollIndSkin.COLOR_FG = SkinResources
59: .getInt(SkinPropertiesIDs.SCROLL_COLOR_FG);
60: ScrollIndSkin.COLOR_FRAME = SkinResources
61: .getInt(SkinPropertiesIDs.SCROLL_COLOR_FRAME);
62: ScrollIndSkin.COLOR_DN_ARROW = SkinResources
63: .getInt(SkinPropertiesIDs.SCROLL_COLOR_DN_ARROW);
64: ScrollIndSkin.COLOR_UP_ARROW = SkinResources
65: .getInt(SkinPropertiesIDs.SCROLL_COLOR_UP_ARROW);
66:
67: /*
68: Uncomment if background/foreground images are used
69: ScrollIndSkin.IMAGE_BG = SkinResources.getCompositeImage(
70: SkinPropertiesIDs.SCROLL_IMAGE_BG, 3);
71: ScrollIndSkin.IMAGE_FG = SkinResources.getCompositeImage(
72: SkinPropertiesIDs.SCROLL_IMAGE_FG, 3);
73: */
74: ScrollIndSkin.IMAGE_UP = SkinResources
75: .getImage(SkinPropertiesIDs.SCROLL_IMAGE_UP);
76: ScrollIndSkin.IMAGE_DN = SkinResources
77: .getImage(SkinPropertiesIDs.SCROLL_IMAGE_DN);
78:
79: ScrollIndSkin.COLOR_AU_BG = SkinResources
80: .getInt(SkinPropertiesIDs.SCROLL_COLOR_AU_BG);
81: ScrollIndSkin.COLOR_AU_FG = SkinResources
82: .getInt(SkinPropertiesIDs.SCROLL_COLOR_AU_FG);
83: /*
84: Uncomment if background/foreground images are used for an Alert
85: ScrollIndSkin.IMAGE_AU_BG = SkinResources.getCompositeImage(
86: SkinPropertiesIDs.SCROLL_IMAGE_AU_BG, 3);
87: ScrollIndSkin.IMAGE_AU_FG = SkinResources.getCompositeImage(
88: SkinPropertiesIDs.SCROLL_IMAGE_AU_FG, 3);
89: */
90: ScrollIndSkin.IMAGE_AU_UP = SkinResources
91: .getImage(SkinPropertiesIDs.SCROLL_IMAGE_AU_UP);
92: ScrollIndSkin.IMAGE_AU_DN = SkinResources
93: .getImage(SkinPropertiesIDs.SCROLL_IMAGE_AU_DN);
94:
95: init = true;
96: }
97: }
|