|
||||||||||
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
org.netbeans.microedition.lcdui.AbstractInfoScreen
public abstract class AbstractInfoScreen
An abstract class serving as a parent for SplashScreen
and WaitScreen
. This class provides the basic visualization
of the screen and can perform automatic switch to a next displayable when
the screen is dismissed (either programatically or by user action).
Field Summary |
---|
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 | |
---|---|
AbstractInfoScreen(javax.microedition.lcdui.Display display)
Creates a new instance of AbstractInfoScreen |
Method Summary | |
---|---|
protected javax.microedition.lcdui.Display |
getDisplay()
Gets the used display object |
javax.microedition.lcdui.Image |
getImage()
Gets the image to be painted on the screen. |
protected javax.microedition.lcdui.Alert |
getNextAlert()
gets the next alert |
protected javax.microedition.lcdui.Displayable |
getNextDisplayable()
Gets the next displayable |
java.lang.String |
getText()
Gets the text to be painted on the screen. |
javax.microedition.lcdui.Font |
getTextFont()
Gets the current font used to paint the text. |
protected void |
paint(javax.microedition.lcdui.Graphics g)
implementation of abstract method |
void |
setImage(javax.microedition.lcdui.Image image)
Sets image to be painted on the screen. |
void |
setNextDisplayable(javax.microedition.lcdui.Alert nextAlert,
javax.microedition.lcdui.Displayable nextDisplayable)
Requests that the specified Alert is going to be shown in the case of screen dismiss, and nextDisplayable be made current after the Alert is dismissed. |
void |
setNextDisplayable(javax.microedition.lcdui.Displayable nextDisplayable)
Sets the displayable to be used to switch when the screen is being dismissed. |
void |
setText(java.lang.String text)
Sets the text to be painted on the screen. |
void |
setTextFont(javax.microedition.lcdui.Font font)
Sets the font to be used to paint the specified text. |
protected void |
showNotify()
sets value of previous displayable. |
protected void |
sizeChanged(int w,
int h)
repaints the screen whem a size has changed. |
protected static void |
switchToDisplayable(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Alert alert,
javax.microedition.lcdui.Displayable displayable)
Switch to the given displayable and alert |
protected void |
switchToNextDisplayable()
switch to the next displayable (or alert) |
Methods inherited from class javax.microedition.lcdui.Canvas |
---|
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, setFullScreenMode |
Methods inherited from class javax.microedition.lcdui.Displayable |
---|
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractInfoScreen(javax.microedition.lcdui.Display display) throws java.lang.IllegalArgumentException
display
- display parameter. Cannot be null
java.lang.IllegalArgumentException
- if the display parameter is nullMethod Detail |
---|
public void setText(java.lang.String text)
text
- text to be painter, or null if no text should be shownpublic java.lang.String getText()
public javax.microedition.lcdui.Image getImage()
public void setImage(javax.microedition.lcdui.Image image)
image
- image to be painted. Can be null.public void setTextFont(javax.microedition.lcdui.Font font)
font
- font to be used to paint the text. May be null.public javax.microedition.lcdui.Font getTextFont()
public void setNextDisplayable(javax.microedition.lcdui.Displayable nextDisplayable)
nextDisplayable
- displayable, or null if the component should switch back
to the screen from which was displayed prior showing this component.public void setNextDisplayable(javax.microedition.lcdui.Alert nextAlert, javax.microedition.lcdui.Displayable nextDisplayable) throws java.lang.IllegalArgumentException
nextAlert
- alert to be shown, or null if the component should return back to the original screennextDisplayable
- a displayable to be shown after the alert is being dismissed. This displayable
cannot be null if the nextAlert
is not null and it also cannot be
Alert.
java.lang.IllegalArgumentException
- If the nextAlert is not null and nextDisplayable is null at the same time, or
if the nextDisplayable is instance of Alert
protected void paint(javax.microedition.lcdui.Graphics g)
paint
in class javax.microedition.lcdui.Canvas
g
- protected void sizeChanged(int w, int h)
sizeChanged
in class javax.microedition.lcdui.Canvas
protected javax.microedition.lcdui.Display getDisplay()
protected javax.microedition.lcdui.Displayable getNextDisplayable()
protected javax.microedition.lcdui.Alert getNextAlert()
protected void switchToNextDisplayable()
protected static void switchToDisplayable(javax.microedition.lcdui.Display display, javax.microedition.lcdui.Alert alert, javax.microedition.lcdui.Displayable displayable)
display
- alert
- displayable
- protected void showNotify()
showNotify
in class javax.microedition.lcdui.Canvas
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |