|
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 | +--com.sun.kjava.ScrollTextBox
A scrolling TextBox object. You need to control this class from a registered Spotlet. In the Spotlet class, implement penDown(), penMove() and keyDown() to call the handlePenDown(), handlePenMove() and handleKeyDown() methods of this class.
Fields inherited from class com.sun.kjava.TextBox |
g,
height,
heightM,
lineEnds,
lineStarts,
text,
width,
widthM,
xPos,
yPos |
Constructor Summary | |
protected |
ScrollTextBox()
|
|
ScrollTextBox(java.lang.String t,
int x,
int y,
int w,
int h)
Create a new ScrollTextBox object. |
Method Summary | |
boolean |
contains(int x,
int y)
Is this point inside the bounds of the object? |
void |
handleKeyDown(int keyCode)
The user pressed a key. |
void |
handlePenDown(int x,
int y)
The pen has gone down at (x, y). |
void |
handlePenMove(int x,
int y)
The pen has moved at (x, y). |
protected void |
init()
Initialize the object. |
void |
paint()
Paint the ScrollTextBox. |
void |
setBounds(int x,
int y,
int w,
int h)
Reset the display bounds of the ScrollTextBox. |
void |
setScrollValue(int val)
Set the current scroll value and repaint. |
void |
setText(java.lang.String t)
Set the text. |
Methods inherited from class com.sun.kjava.TextBox |
getNumLines |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected ScrollTextBox()
public ScrollTextBox(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 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 setText(java.lang.String t)
t
- a String representing the new text.protected void init()
public boolean contains(int x, int y)
x
- the X coordinate of the position to testy
- the Y coordinate of the position to testpublic void handlePenDown(int x, int y)
x
- the X coordinate of the pen positiony
- the Y coordinate of the pen positionpublic void handlePenMove(int x, int y)
x
- the X coordinate of the pen positiony
- the Y coordinate of the pen positionpublic void handleKeyDown(int keyCode)
keyCode
- a code representing the key the user pressedpublic void paint()
public void setScrollValue(int val)
val
- the new scroll value.
|
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 |