|
||||||||||
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. When this screen is displayed, it can display either supplied text or image. The current implementation shows both, text and image, centered in the middle of the display. > Please note, in previous version this component automatically switched to displayables specified by setNextDisplayable() method, but this approach has been deprecated in favor of using static command and calling CommandListener's commandAction() method when an action happens. This gives the developer much higher flexibility for processing the action - it is no longer limited to switching to another displayable, but it can do whatever developer wants.
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 |
|
AbstractInfoScreen(javax.microedition.lcdui.Display display,
ColorSchema colorSchema)
Creates a new instance of AbstractInfoScreen |
Method Summary | |
---|---|
ColorSchema |
getColorSchema()
Gets ColorSchema currently in use |
protected javax.microedition.lcdui.CommandListener |
getCommandListener()
Gets command listener assigned to this displayable |
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()
Deprecated. - use static Commands and CommandListener pattern from the actual implementation class |
protected javax.microedition.lcdui.Displayable |
getNextDisplayable()
Deprecated. - use static Commands and CommandListener pattern from the actual implementation class |
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 |
setColorSchema(ColorSchema colorSchema)
Sets ColorSchema |
void |
setCommandListener(javax.microedition.lcdui.CommandListener commandListener)
Sets command listener to this component |
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)
Deprecated. - use static Commands and CommandListener pattern from the actual implementation class |
void |
setNextDisplayable(javax.microedition.lcdui.Displayable nextDisplayable)
Deprecated. - use static Commands and CommandListener from the actual implementation |
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)
Deprecated. - use SplashScreen.DISMISS_COMMAND or WaitScreen.SUCCESS_COMMAND in CommandListener.commandAction() to handle this event for specific implementation of the info screen. |
protected void |
switchToNextDisplayable()
Deprecated. - use static Commands and CommandListener pattern from the actual implementation class |
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, 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 nullpublic AbstractInfoScreen(javax.microedition.lcdui.Display display, ColorSchema colorSchema)
display
- display parameter. Cannot be nullcolorSchema
- color schema to be used for this component. If null, SystemColorSchema is used.
java.lang.IllegalArgumentException
- if the display parameter is nullMethod Detail |
---|
public ColorSchema getColorSchema()
public void setColorSchema(ColorSchema colorSchema)
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()
protected final javax.microedition.lcdui.CommandListener getCommandListener()
public void setCommandListener(javax.microedition.lcdui.CommandListener commandListener)
setCommandListener
in class javax.microedition.lcdui.Displayable
commandListener
- - command listener to be usedpublic 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 |