KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > nextapp > echo2 > testapp > interactive > Styles


1 /*
2  * This file is part of the Echo Web Application Framework (hereinafter "Echo").
3  * Copyright (C) 2002-2005 NextApp, Inc.
4  *
5  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6  *
7  * The contents of this file are subject to the Mozilla Public License Version
8  * 1.1 (the "License"); you may not use this file except in compliance with
9  * the License. You may obtain a copy of the License at
10  * http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14  * for the specific language governing rights and limitations under the
15  * License.
16  *
17  * Alternatively, the contents of this file may be used under the terms of
18  * either the GNU General Public License Version 2 or later (the "GPL"), or
19  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
20  * in which case the provisions of the GPL or the LGPL are applicable instead
21  * of those above. If you wish to allow use of your version of this file only
22  * under the terms of either the GPL or the LGPL, and not to allow others to
23  * use your version of this file under the terms of the MPL, indicate your
24  * decision by deleting the provisions above and replace them with the notice
25  * and other provisions required by the GPL or the LGPL. If you do not delete
26  * the provisions above, a recipient may use your version of this file under
27  * the terms of any one of the MPL, the GPL or the LGPL.
28  */

29
30 package nextapp.echo2.testapp.interactive;
31
32 import nextapp.echo2.app.FillImage;
33 import nextapp.echo2.app.ImageReference;
34 import nextapp.echo2.app.ResourceImageReference;
35 import nextapp.echo2.app.StyleSheet;
36 import nextapp.echo2.app.componentxml.ComponentXmlException;
37 import nextapp.echo2.app.componentxml.StyleSheetLoader;
38
39 /**
40  *
41  */

42 public class Styles {
43     
44     public static final String JavaDoc IMAGE_PATH = "/nextapp/echo2/testapp/interactive/resource/image/";
45     public static final String JavaDoc STYLE_PATH = "/nextapp/echo2/testapp/interactive/resource/style/";
46
47     public static final ImageReference ICON_24_MAIL_COMPOSE = new ResourceImageReference(IMAGE_PATH + "Icon24MailCompose.gif");
48     public static final ImageReference ICON_24_NO = new ResourceImageReference(IMAGE_PATH + "Icon24No.gif");
49     public static final ImageReference ICON_24_YES = new ResourceImageReference(IMAGE_PATH + "Icon24Yes.gif");
50     public static final ImageReference ECHO2_IMAGE = new ResourceImageReference(IMAGE_PATH + "Echo2.png");
51     public static final ImageReference INTERACTIVE_TEST_APPLICATION_IMAGE
52             = new ResourceImageReference(IMAGE_PATH + "InteractiveTestApplication.png");
53     public static final ImageReference NEXTAPP_LOGO = new ResourceImageReference(IMAGE_PATH + "NextAppLogo.png");
54     
55     public static final FillImage BG_SHADOW_DARK_BLUE = new FillImage(new ResourceImageReference(
56             IMAGE_PATH + "ShadowBackgroundDarkBlue.png"), null, null, FillImage.NO_REPEAT);
57     public static final FillImage BG_SHADOW_LIGHT_BLUE = new FillImage(new ResourceImageReference(
58             IMAGE_PATH + "ShadowBackgroundLightBlue.png"), null, null, FillImage.NO_REPEAT);
59     
60     public static final ImageReference RG_STATE_ICON = new ResourceImageReference(
61             IMAGE_PATH + "RGStateIcon.gif");
62     public static final ImageReference RG_SELECTED_STATE_ICON = new ResourceImageReference(
63             IMAGE_PATH + "RGSelectedStateIcon.gif");
64     public static final ImageReference RG_ROLLOVER_STATE_ICON = new ResourceImageReference(
65             IMAGE_PATH + "RGRolloverStateIcon.gif");
66     public static final ImageReference RG_ROLLOVER_SELECTED_STATE_ICON = new ResourceImageReference(
67             IMAGE_PATH + "RGRolloverSelectedStateIcon.gif");
68     public static final ImageReference RG_PRESSED_STATE_ICON = new ResourceImageReference(
69             IMAGE_PATH + "RGPressedStateIcon.gif");
70     public static final ImageReference RG_PRESSED_SELECTED_STATE_ICON = new ResourceImageReference(
71             IMAGE_PATH + "RGPressedSelectedStateIcon.gif");
72     
73     public static final FillImage BUTTON_BACKGROUND_IMAGE = new FillImage(new ResourceImageReference(
74             IMAGE_PATH + "ButtonBackground.png"));
75     public static final FillImage BUTTON_PRESSED_BACKGROUND_IMAGE = new FillImage(new ResourceImageReference(
76             IMAGE_PATH + "ButtonPressedBackground.png"));
77     public static final FillImage BUTTON_DISABLED_BACKGROUND_IMAGE = new FillImage(new ResourceImageReference(
78             IMAGE_PATH + "ButtonDisabledBackground.png"));
79     public static final FillImage BUTTON_ROLLOVER_BACKGROUND_IMAGE = new FillImage(new ResourceImageReference(
80             IMAGE_PATH + "ButtonRolloverBackground.png"));
81     
82     
83     public static final ImageReference ICON_LOGO = new ResourceImageReference(IMAGE_PATH + "Logo.png");
84     public static final ImageReference DISABLED_ICON_LOGO = new ResourceImageReference(IMAGE_PATH + "LogoDisabled.png");
85     public static final ImageReference ROLLOVER_ICON_LOGO
86             = new ResourceImageReference(IMAGE_PATH + "LogoRollover.png");
87     public static final ImageReference PRESSED_ICON_LOGO
88             = new ResourceImageReference(IMAGE_PATH + "LogoPressed.png");
89
90     public static final StyleSheet DEFAULT_STYLE_SHEET;
91     public static final StyleSheet GREEN_STYLE_SHEET;
92     static {
93         try {
94             DEFAULT_STYLE_SHEET = StyleSheetLoader.load(STYLE_PATH + "Default.stylesheet",
95                     Thread.currentThread().getContextClassLoader());
96             GREEN_STYLE_SHEET = StyleSheetLoader.load(STYLE_PATH + "Green.stylesheet",
97                     Thread.currentThread().getContextClassLoader());
98         } catch (ComponentXmlException ex) {
99             throw new RuntimeException JavaDoc(ex);
100         }
101     }
102 }
103
Popular Tags