|
|||||||
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
example.chooser.TextSample
public class TextSample
A Text sample. This screen can be used to display a Sample string. using the Face, Style, Size and foreground and background color.
Field Summary | |
---|---|
(package private) int |
bgcolor
|
(package private) static int |
border
The width of the border. |
(package private) int |
face
|
(package private) int |
fgcolor
|
(package private) int |
size
|
(package private) int |
style
|
(package private) java.lang.String |
text
The sample text |
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 | |
---|---|
TextSample()
Create a new TextSample canvas. |
Method Summary | |
---|---|
int |
getBackgroundColor()
Get the color of font currently being displayed. |
int |
getFace()
Get the face of font currently being displayed. |
int |
getForegroundColor()
Get the color of font currently being displayed. |
int |
getSize()
Get the size of font currently being displayed. |
int |
getStyle()
Get the style of font currently being displayed. |
protected void |
paint(javax.microedition.lcdui.Graphics g)
Paint the canvas with the current color and controls to change it. |
void |
setBackgroundColor(int color)
Set the Color of font to display. |
void |
setFace(int face)
Set the Face of font to display. |
void |
setForegroundColor(int color)
Set the Color of font to display. |
void |
setSize(int size)
Set the Size of font to display. |
void |
setStyle(int style)
Set the Style of font to display. |
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, showNotify, sizeChanged |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int border
int face
int style
int size
int bgcolor
int fgcolor
java.lang.String text
Constructor Detail |
---|
public TextSample()
Method Detail |
---|
public void setStyle(int style)
style
- to which to set the fontFont.getStyle()
public int getStyle()
Font.getStyle()
public void setFace(int face)
face
- to which to set the fontFont.getFace()
public int getFace()
Font.getFace()
public void setSize(int size)
size
- to which the font should be setFont.getSize()
public int getSize()
Font.getSize()
public void setForegroundColor(int color)
color
- a new foreground colorpublic int getForegroundColor()
public void setBackgroundColor(int color)
color
- a new background colorpublic int getBackgroundColor()
protected void paint(javax.microedition.lcdui.Graphics g)
paint
in class javax.microedition.lcdui.Canvas
g
- the graphics context to which to paint
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |