|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
de.enough.polish.ui.Screen
de.enough.polish.ui.SplashScreen
public class SplashScreen
This component represents a splash screen, which is usually being displayed when the application starts. It waits for a specified amount of time (by default 5000 milliseconds) and then calls specified command listener commandAction method with DISMISS_COMMAND as command parameter.
This version is using CommandListener and static Command pattern, but is still compatible with older version. So if there is no command listener specified, it still can use setNextDisplayable() method to specify the dismiss screen and automatically switch to it.
| Field Summary | |
|---|---|
static javax.microedition.lcdui.Command |
DISMISS_COMMAND
Command fired when the screen is about to be dismissed //TODO add i18n |
static int |
FOREVER
Timeout value which wait forever. |
| Fields inherited from class javax.microedition.lcdui.Canvas |
|---|
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
| Constructor Summary | |
|---|---|
SplashScreen(javax.microedition.lcdui.Display display)
Creates a new instance of SplashScreen |
|
SplashScreen(javax.microedition.lcdui.Display display,
Style style)
Creates a new instance of SplashScreen |
|
| Method Summary | |
|---|---|
protected java.lang.String |
createCssSelector()
Retrieves the CSS selector for this screen. |
int |
getTimeout()
Gets current timeout of the splash screen |
void |
hideNotify()
Unregisters this screen and notifies all items that they will not be shown anymore. |
boolean |
isAllowTimeoutInterrupt()
Can be the splashscreen interrupted (dismissed) by the user pressing a key? |
void |
keyPressed(int keyCode)
keyPressed callback |
protected void |
paintScreen(javax.microedition.lcdui.Graphics g)
Paints the screen. |
void |
pointerPressed(int x,
int y)
pointerPressed callback |
void |
setAllowTimeoutInterrupt(boolean allow)
When set to true, the splashscreen timeout can be interrupted (and thus dismissed) by pressing a key. |
void |
setImage(javax.microedition.lcdui.Image image)
|
void |
setTimeout(int timeout)
Sets the timeout of the splash screen - i.e. |
void |
showNotify()
starts the coundown of the timeout |
| Methods inherited from class javax.microedition.lcdui.Canvas |
|---|
getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints |
| Methods inherited from class javax.microedition.lcdui.Displayable |
|---|
getHeight, getTicker, getWidth, setTicker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final javax.microedition.lcdui.Command DISMISS_COMMAND
public static final int FOREVER
| Constructor Detail |
|---|
public SplashScreen(javax.microedition.lcdui.Display display)
throws java.lang.IllegalArgumentException
display - display - is ignored
java.lang.IllegalArgumentException
public SplashScreen(javax.microedition.lcdui.Display display,
Style style)
throws java.lang.IllegalArgumentException
display - display - is ignoredstyle - the style for the splash screen
java.lang.IllegalArgumentException| Method Detail |
|---|
public void setTimeout(int timeout)
timeout - in millisecondspublic int getTimeout()
public void setAllowTimeoutInterrupt(boolean allow)
allow - true if the user can interrupt the screen, false if the user need to wait
until timeout.public boolean isAllowTimeoutInterrupt()
public void keyPressed(int keyCode)
keyPressed in interface AccessibleCanvaskeyPressed in class ScreenkeyCode -
public void pointerPressed(int x,
int y)
pointerPressed in interface AccessibleCanvaspointerPressed in class Screenx - y - public void showNotify()
showNotify in interface AccessibleCanvasshowNotify in class Screenpublic void hideNotify()
Screen
hideNotify in interface AccessibleCanvashideNotify in class Screenpublic void setImage(javax.microedition.lcdui.Image image)
protected void paintScreen(javax.microedition.lcdui.Graphics g)
Screen
paintScreen in class Screeng - the graphics on which the screen should be paintedScreen.contentX,
Screen.contentY,
Screen.contentWidth,
Screen.contentHeight,
Screen.paintScrollIndicator,
Screen.paintScrollIndicatorUp,
Screen.paintScrollIndicatorDownprotected java.lang.String createCssSelector()
Screen
createCssSelector in class Screen
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||