FileDocCategorySizeDatePackage
ScreenResources.javaAPI DocphoneME MR2 API (J2ME)5447Wed May 02 18:00:20 BST 2007com.sun.midp.chameleon.skins.resources

ScreenResources

public class ScreenResources extends Object

Fields Summary
private static boolean
init
Constructors Summary
private ScreenResources()

    
Methods Summary
public static voidload()

        load(false);
    
public static voidload(boolean reload)

        if (init && !reload) {
            return;
        }

        if ((ScreenSkin.WIDTH <= 0) || (ScreenSkin.HEIGHT <= 0)) {
            if (Logging.REPORT_LEVEL <= Logging.WARNING) {
                Logging.report(Logging.WARNING, LogChannels.LC_HIGHUI,
                        "Screen dimentions not set.");
            }
        }

        int textOrient = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_TEXT_ORIENT);
        ScreenSkin.TEXT_ORIENT = SkinResources.resourceConstantsToGraphics(
                textOrient);

        ScreenSkin.PAD_FORM_ITEMS = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_PAD_FORM_ITEMS);
        ScreenSkin.PAD_LABEL_VERT = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_PAD_LABEL_VERT);
        ScreenSkin.PAD_LABEL_HORIZ = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_PAD_LABEL_HORIZ);
        ScreenSkin.COLOR_BG = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_BG);
        ScreenSkin.COLOR_HS_BG = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_HS_BG);
        ScreenSkin.COLOR_FG = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_FG);
        ScreenSkin.COLOR_BG_HL = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_BG_HL);
        ScreenSkin.COLOR_FG_HL = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_FG_HL);
        ScreenSkin.COLOR_BORDER = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_BORDER);
        ScreenSkin.COLOR_BORDER_HL = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_BORDER_HL);
        ScreenSkin.COLOR_TRAVERSE_IND = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_COLOR_TRAVERSE_IND);

        int borderStyle = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_BORDER_STYLE);
        ScreenSkin.BORDER_STYLE = SkinResources.resourceConstantsToGraphics(
                borderStyle);

        ScreenSkin.SCROLL_AMOUNT = SkinResources.getInt(
                SkinPropertiesIDs.SCREEN_SCROLL_AMOUNT);
        ScreenSkin.FONT_LABEL = SkinResources.getFont(
                SkinPropertiesIDs.SCREEN_FONT_LABEL);
        ScreenSkin.FONT_INPUT_TEXT = SkinResources.getFont(
                SkinPropertiesIDs.SCREEN_FONT_INPUT_TEXT);
        ScreenSkin.FONT_STATIC_TEXT = SkinResources.getFont(
                SkinPropertiesIDs.SCREEN_FONT_STATIC_TEXT);

        ScreenSkin.IMAGE_WASH = SkinResources.getImage(
                SkinPropertiesIDs.SCREEN_IMAGE_WASH);
        ScreenSkin.IMAGE_BG = SkinResources.getImage(
                SkinPropertiesIDs.SCREEN_IMAGE_BG);

        /*
        Uncomment if 9 pc screen background images are used
        ScreenSkin.IMAGE_BG_W_TITLE = SkinResources.getCompositeImage(
                SkinPropertiesIDs.SCREEN_IMAGE_BG_W_TITLE, 9);
        ScreenSkin.IMAGE_BG_WO_TITLE = SkinResources.getCompositeImage(
                SkinPropertiesIDs.SCREEN_IMAGE_BG_WO_TITLE, 9);
        */

        // IMPL NOTE: There shouldn't be any "Homescreen" resources in
        // ScreenResources. There should be a new window altogether which
        // handles the app manager stuff and its resources should be in a
        // separate resource class all together.

        /*
        Uncomment if background images for "home" screen are used
        ScreenSkin.IMAGE_HS_BG_TILE = SkinResources.getImage(
                SkinPropertiesIDs.SCREEN_IMAGE_HS_BG_TILE);
        ScreenSkin.IMAGE_HS_BG_W_TITLE = SkinResources.getCompositeImage(
                SkinPropertiesIDs.SCREEN_IMAGE_HS_BG_W_TITLE, 9);
        ScreenSkin.IMAGE_HS_BG_WO_TITLE = SkinResources.getCompositeImage(
                SkinPropertiesIDs.SCREEN_IMAGE_HS_BG_WO_TITLE, 9);
        */

        init = true;