|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.ScreenInfo
public class ScreenInfo
Can be used for displaying information on each screen. This needs to be enabled specifically by setting the "polish.ScreenInfo.enable" preprocessing variable to "true":
<variable name="polish.ScreenInfo.enable" value="true" />
If you want to display text you can use the "screeninfo" style for designing this element. Alternatively you can use the setImage( Image, Style ) or setText( String, Style ) methods for changing the style during runtime like this:
if (this.isOnline) {
//#style online
ScreenInfo.setText("on");
} else {
//#style offline
ScreenInfo.setText("off");
}
Copyright (c) Enough Software 2005 - 2009
history
07-Jun-2005 - rob creation
| Field Summary | |
|---|---|
static Item |
item
|
| Method Summary | |
|---|---|
static java.lang.String |
getText()
Retrieves the text contents of the ScreenInfo element. |
static boolean |
isVisible()
Determines whether the ScreenInfo object should be painted. |
static void |
paint(Graphics g,
int titleHeight,
int screenWidth)
Paints this element. |
static void |
setBackground(Background background)
Sets a specific background. |
static void |
setFontColor(int color)
Sets a specific text color. |
static void |
setImage(Image image)
Sets the image for the screen info object. |
static void |
setImage(Image image,
Style style)
Sets the image for the screen info object. |
static void |
setItem(Item newItem,
Style style)
Sets the item that is painted on the screen. |
static void |
setItem(javax.microedition.lcdui.Item newItem)
Sets the item that is painted on the screen. |
static void |
setPosition(int x,
int y)
Sets the position of this ScreenInfo - if not set it will be painted on the left side below the title. |
static void |
setScreen(Screen screen)
Sets the screen which now uses the ScreenInfo element. |
static void |
setText(java.lang.String text)
Sets the text contents of the ScreenInfo. |
static void |
setText(java.lang.String text,
Style style)
Sets the text contents of the ScreenInfo along with a style. |
static void |
setVisible(boolean isVisible)
Paddles the visibility of the ScreenInfo object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Item item
| Method Detail |
|---|
public static void setVisible(boolean isVisible)
isVisible - true when this element should be shown.public static boolean isVisible()
public static void setText(java.lang.String text)
text - the new textpublic static java.lang.String getText()
public static void setText(java.lang.String text,
Style style)
text - the new textstyle - the new style, is ignored when nullpublic static void setImage(Image image)
image - the image, when null is given, no image is painted.
public static void setImage(Image image,
Style style)
image - the image, when null is given, no image is painted.style - the new style of this item, is ignored when nullpublic static void setItem(javax.microedition.lcdui.Item newItem)
newItem - the item that is painted on the screen
public static void setItem(Item newItem,
Style style)
newItem - the item that is painted on the screenstyle - the new style of this item, is ignored when null
public static void setPosition(int x,
int y)
x - the x coordinatey - the y coordinatepublic static void setScreen(Screen screen)
screen - the new screen or null when an old screen deregisters itself (hideNotify())public static void setBackground(Background background)
background - the new background.public static void setFontColor(int color)
color - the new font color.
public static void paint(Graphics g,
int titleHeight,
int screenWidth)
g - the graphics objecttitleHeight - the height of the screen's titlescreenWidth - the width of the screen
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||