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.ImageItemSkin;
31:
32: import javax.microedition.lcdui.Image;
33: import javax.microedition.lcdui.Font;
34:
35: public class ImageItemResources {
36: private static boolean init;
37:
38: // private constructor
39: private ImageItemResources() {
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: ImageItemSkin.COLOR_BG_LINK_FOCUS = SkinResources
52: .getInt(SkinPropertiesIDs.IMAGEITEM_COLOR_BG_LNK_FOC);
53: ImageItemSkin.COLOR_BG_BUTTON = SkinResources
54: .getInt(SkinPropertiesIDs.IMAGEITEM_COLOR_BG_BTN);
55: ImageItemSkin.COLOR_BORDER_LT = SkinResources
56: .getInt(SkinPropertiesIDs.IMAGEITEM_COLOR_BORDER_LT);
57: ImageItemSkin.COLOR_BORDER_DK = SkinResources
58: .getInt(SkinPropertiesIDs.IMAGEITEM_COLOR_BORDER_DK);
59: ImageItemSkin.PAD_LINK_H = SkinResources
60: .getInt(SkinPropertiesIDs.IMAGEITEM_PAD_LNK_H);
61: ImageItemSkin.PAD_LINK_V = SkinResources
62: .getInt(SkinPropertiesIDs.IMAGEITEM_PAD_LNK_V);
63: ImageItemSkin.PAD_BUTTON_H = SkinResources
64: .getInt(SkinPropertiesIDs.IMAGEITEM_PAD_BTN_H);
65: ImageItemSkin.PAD_BUTTON_V = SkinResources
66: .getInt(SkinPropertiesIDs.IMAGEITEM_PAD_BTN_V);
67: ImageItemSkin.BUTTON_BORDER_W = SkinResources
68: .getInt(SkinPropertiesIDs.IMAGEITEM_BTN_BORDER_W);
69: ImageItemSkin.IMAGE_LINK_H = SkinResources
70: .getImage(SkinPropertiesIDs.IMAGEITEM_IMAGE_LNK_H);
71: ImageItemSkin.IMAGE_LINK_V = SkinResources
72: .getImage(SkinPropertiesIDs.IMAGEITEM_IMAGE_LNK_V);
73: /*
74: Uncomment if background image for button is used
75: ImageItemSkin.IMAGE_BUTTON = SkinResources.getCompositeImage(
76: SkinPropertiesIDs.IMAGEITEM_IMAGE_BUTTON, 9);
77: */
78:
79: init = true;
80: }
81: }
|