|
Ascent Phase Corp. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.ascentphase.suit.Widget
|
+--org.ascentphase.suit.Field
A Field displays one or more rows of text that is underlined with a dotted line.
| Field Summary | |
protected java.lang.StringBuffer |
buffer
|
protected int |
height
|
protected int |
maxLength
|
protected int |
rows
|
protected int |
width
|
| Fields inherited from class org.ascentphase.suit.Widget |
cmdToThrow |
| Constructor Summary | |
Field(int rows,
int width)
Creates a Field with no text and an unlimited length. |
|
Field(java.lang.String text,
int rows,
int width)
Creates a Field with the given text and an unlimited length. |
|
Field(java.lang.String text,
int maxLen,
int rows,
int width)
Creates a Field with the given text and the given maximum text length. |
|
| Method Summary | |
void |
append(char c)
Adds the given character to the Field text. |
void |
append(java.lang.String text)
Adds the given String to the Field text. |
boolean |
contains(int x,
int y)
Returns whether the given coordinate lies within this widget's area of interest. |
java.lang.String |
getText()
|
Command |
keyPressed(int keycode)
Method called by the widget's containing Panel when a key is pressed and the widget has the Panel's focus. |
void |
paint(Graphics g)
Draws the widget. |
void |
setText(java.lang.String text)
|
| Methods inherited from class org.ascentphase.suit.Widget |
getCommand, keyReleased, pointerDragged, pointerPressed, pointerReleased, setCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.StringBuffer buffer
protected int maxLength
protected int rows
protected int width
protected int height
| Constructor Detail |
public Field(int rows,
int width)
rows - the number of rows of text.width - the width of the field in pixels.
public Field(java.lang.String text,
int rows,
int width)
text - the initial String displayed in the Field.rows - the number of rows of text.width - the width of the field in pixels.
public Field(java.lang.String text,
int maxLen,
int rows,
int width)
text - the initial String displayed in the Field.maxLen - the maximum length of the Field.rows - the number of rows of text.width - the width of the field in pixels.| Method Detail |
public void append(char c)
c - the character to add.public void append(java.lang.String text)
text - the String to add.public void paint(Graphics g)
paint in class Widgetg - the Graphics object to draw with.
public boolean contains(int x,
int y)
Widget
contains in class Widgetx - the x coordinate.y - the y coordinate.public Command keyPressed(int keycode)
Widget
keyPressed in class Widgetkeycode - the keycode of key pressed.
public java.lang.String getText()
public void setText(java.lang.String text)
|
Ascent Phase Corp. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||