001: /*
002: *
003: *
004: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License version
009: * 2 only, as published by the Free Software Foundation.
010: *
011: * This program is distributed in the hope that it will be useful, but
012: * WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * General Public License version 2 for more details (a copy is
015: * included at /legal/license.txt).
016: *
017: * You should have received a copy of the GNU General Public License
018: * version 2 along with this work; if not, write to the Free Software
019: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA
021: *
022: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023: * Clara, CA 95054 or visit www.sun.com if you need additional
024: * information or have any questions.
025: */
026:
027: package com.sun.midp.chameleon.skins.resources;
028:
029: import com.sun.midp.chameleon.skins.SkinPropertiesIDs;
030: import com.sun.midp.chameleon.skins.DateEditorSkin;
031: import com.sun.midp.chameleon.skins.ScreenSkin;
032:
033: import javax.microedition.lcdui.Image;
034: import javax.microedition.lcdui.Font;
035:
036: public class DateEditorResources {
037: private static boolean init;
038:
039: // private constructor
040: private DateEditorResources() {
041: }
042:
043: public static void load() {
044: load(false);
045: }
046:
047: public static void load(boolean reload) {
048: if (init && !reload) {
049: return;
050: }
051:
052: DateEditorSkin.HEIGHT = SkinResources
053: .getInt(SkinPropertiesIDs.DATEEDITOR_HEIGHT);
054: DateEditorSkin.HEIGHT_POPUPS = SkinResources
055: .getInt(SkinPropertiesIDs.DATEEDITOR_HEIGHT_POPUPS);
056: DateEditorSkin.WIDTH_DATE = SkinResources
057: .getInt(SkinPropertiesIDs.DATEEDITOR_WIDTH_D);
058: DateEditorSkin.WIDTH_TIME = SkinResources
059: .getInt(SkinPropertiesIDs.DATEEDITOR_WIDTH_T);
060: DateEditorSkin.WIDTH_DATETIME = SkinResources
061: .getInt(SkinPropertiesIDs.DATEEDITOR_WIDTH_DT);
062: DateEditorSkin.COLOR_BG = SkinResources
063: .getInt(SkinPropertiesIDs.DATEEDITOR_COLOR_BG);
064: DateEditorSkin.COLOR_POPUPS_BG = SkinResources
065: .getInt(SkinPropertiesIDs.DATEEDITOR_COLOR_POPUPS_BG);
066: DateEditorSkin.COLOR_BORDER = SkinResources
067: .getInt(SkinPropertiesIDs.DATEEDITOR_COLOR_BRDR);
068: DateEditorSkin.COLOR_TRAVERSE_IND = SkinResources
069: .getInt(SkinPropertiesIDs.DATEEDITOR_COLOR_TRAV_IND);
070: DateEditorSkin.COLOR_CLOCKHAND_LT = SkinResources
071: .getInt(SkinPropertiesIDs.DATEEDITOR_COLOR_CLK_LT);
072: DateEditorSkin.COLOR_CLOCKHAND_DK = SkinResources
073: .getInt(SkinPropertiesIDs.DATEEDITOR_COLOR_CLK_DK);
074: DateEditorSkin.FONT_POPUPS = SkinResources
075: .getFont(SkinPropertiesIDs.DATEEDITOR_FONT_POPUPS);
076: /*
077: Uncomment if background image is used
078: DateEditorSkin.IMAGE_BG = SkinResources.getCompositeImage(
079: SkinPropertiesIDs.DATEEDITOR_IMAGE_BG, 9);
080: */
081: DateEditorSkin.IMAGE_MONTH_BG = SkinResources
082: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_MON_BG);
083: DateEditorSkin.IMAGE_YEAR_BG = SkinResources
084: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_YR_BG);
085: DateEditorSkin.IMAGE_CAL_BG = SkinResources
086: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_CAL_BG);
087: DateEditorSkin.IMAGE_DATES = SkinResources
088: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_DATES);
089: DateEditorSkin.IMAGE_TIME_BG = SkinResources
090: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_TIME_BG);
091: DateEditorSkin.IMAGE_RADIO = SkinResources.getCompositeImage(
092: SkinPropertiesIDs.DATEEDITOR_IMAGE_RADIO, 2);
093: DateEditorSkin.IMAGE_AMPM = SkinResources
094: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_AMPM);
095: DateEditorSkin.IMAGE_CLOCK_BG = SkinResources
096: .getImage(SkinPropertiesIDs.DATEEDITOR_IMAGE_CLOCK_BG);
097:
098: init = true;
099: }
100: }
|