|
Palm API Beta 2 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.kjava.TextBox
A box displaying text on the screen. This class flows the text in the box. It doesn't break words, and therefore isn't graceful handling words larger than the width of the box.
Field Summary | |
protected Graphics |
g
|
protected int |
height
|
protected static int |
heightM
|
protected IntVector |
lineEnds
|
protected IntVector |
lineStarts
|
protected java.lang.String |
text
|
protected int |
width
|
protected static int |
widthM
|
protected int |
xPos
|
protected int |
yPos
|
Constructor Summary | |
TextBox()
Create a new TextBox object. |
|
TextBox(java.lang.String t,
int x,
int y,
int w,
int h)
Create a new TextBox object. |
Method Summary | |
int |
getNumLines()
How many lines of text does the TextBox currently hold? |
void |
paint()
Paint the TextBox on the screen. |
void |
setBounds(int x,
int y,
int w,
int h)
Reset the display bounds of the TextBox. |
void |
setText(java.lang.String t)
Set the text. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.String text
protected IntVector lineStarts
protected IntVector lineEnds
protected int xPos
protected int yPos
protected int width
protected int height
protected Graphics g
protected static int widthM
protected static int heightM
Constructor Detail |
public TextBox()
public TextBox(java.lang.String t, int x, int y, int w, int h)
t
- the initial textx
- the X coordinate of the ScrollTextBox's positiony
- the Y coordinate of the ScrollTextBox's positionw
- the widthh
- the heightMethod Detail |
public int getNumLines()
public void setText(java.lang.String t)
t
- a String representing the new text.public void setBounds(int x, int y, int w, int h)
x
- the new X coordinate of the ScrollTextBox's positiony
- the new Y coordinate of the ScrollTextBox's positionw
- the new widthh
- the new heightpublic void paint()
|
Submit a bug or feature The GUI classes provided with this release are NOT part of CLDC, and they will be removed in later releases of this software. Official GUI classes for Java 2 Micro Edition will be defined separately through the Java Community Process and included in J2ME profiles. Java is trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |