|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.StyleSheet
public final class StyleSheet
Manages all defined styles of a specific project.
This class is actually pre-processed to get the styles specific for the project and the device.
history
05-Jan-2004 - rob creation
| Field Summary | |
|---|---|
static AnimationThread |
animationThread
Access to the AnimationThread responsible for animating all user interface components |
static javax.microedition.lcdui.Command |
CANCEL_CMD
default CANCEL command |
static Screen |
currentScreen
Access to the currently shown J2ME Polish screen, if any |
static Style |
defaultStyle
default style |
static javax.microedition.lcdui.Display |
display
Access to the application's Display |
static boolean |
enableScreenChangeAnimations
Allows you to disable or enable screen change animations. |
static Style |
focusedStyle
default style for focused/hovered items |
protected static java.util.Hashtable |
imagesByName
|
static Style |
labelStyle
default style for labels |
static Style |
menuStyle
default style for the commands menu |
static javax.microedition.midlet.MIDlet |
midlet
Access to the currently running MIDlet |
static javax.microedition.lcdui.Command |
OK_CMD
default OK command |
| Constructor Summary | |
|---|---|
StyleSheet()
|
|
| Method Summary | |
|---|---|
static Style[] |
getDynamicStyles()
|
static javax.microedition.lcdui.Image |
getImage(java.lang.String url,
java.lang.Object parent,
boolean cache)
Retrieves the image with the given name. |
static Style |
getStyle(Item item)
Retrieves the style for the given item. |
static Style |
getStyle(Screen screen)
Retrieves a dynamic style for the given screen. |
static Style |
getStyle(java.lang.String name)
Gets the style with the specified name. |
static java.util.Hashtable |
getStyles()
Retrieves all registered styles in a Hashtable. |
static void |
notifyImageConsumers(java.lang.String name,
javax.microedition.lcdui.Image image)
Notifies the GUI items which requested images about the successful loading of thoses images. |
static void |
releaseResources()
Releases all (memory intensive) resources such as images or RGB arrays of this style sheet. |
static void |
setCurrent(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable nextDisplayable)
Includes an animation while changing the screen. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.Hashtable imagesByName
public static Style defaultStyle
public static Style focusedStyle
public static Style labelStyle
public static Style menuStyle
public static Screen currentScreen
public static javax.microedition.lcdui.Display display
public static javax.microedition.midlet.MIDlet midlet
public static AnimationThread animationThread
public static javax.microedition.lcdui.Command OK_CMD
public static javax.microedition.lcdui.Command CANCEL_CMD
public static boolean enableScreenChangeAnimations
polish.ScreenChangeAnimation.allowConfiguration to true.
| Constructor Detail |
|---|
public StyleSheet()
| Method Detail |
|---|
public static javax.microedition.lcdui.Image getImage(java.lang.String url,
java.lang.Object parent,
boolean cache)
throws java.io.IOException
url - the URL of the Image, e.g. "/background.png"parent - the object which needs the image, when the image should be loaded
in the background, the parent need to implement
the ImageConsumer interface when it wants to be notified when
the picture has been loaded.cache - true when the image should be cached for later retrieval.
This costs RAM obviously, so you should decide carefully if
large images should be cached.
java.io.IOException - when the image could not be loaded directlyImageConsumer.setImage(String, Image)
public static void notifyImageConsumers(java.lang.String name,
javax.microedition.lcdui.Image image)
name - the URL of the imageimage - the imagepublic static Style getStyle(java.lang.String name)
name - the name of the style
public static java.util.Hashtable getStyles()
public static Style getStyle(Item item)
item - the item for which the style should be retrieved
public static Style getStyle(Screen screen)
screen - the screen for which a style should be retrieved
public static void setCurrent(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable nextDisplayable)
display - the displaynextDisplayable - the new screen, animations are only included for de.enough.polish.ui.Screen classespublic static void releaseResources()
public static Style[] getDynamicStyles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||