|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcontrol.ui.vole.Component | +--jcontrol.ui.vole.TextArea
This class TextArea.class
implements a text area for JControl's
VOLE user interface.
The text can be scrolled, rows can be added, inserted and deleted.
ScrollBar
Field Summary | |
static int |
DOWN
Scroll down |
protected int |
fontheight
|
protected int |
lastDirection
|
static boolean |
NO
Scrollbar - no |
protected int |
oldScrollBarValue
|
protected boolean |
scrollbar
|
protected int |
scrollBarValue
|
protected int |
scrollValue
|
protected java.util.Vector |
textData
|
protected int |
textheight
|
static int |
UP
Scroll up |
static boolean |
YES
Scrollbar - yes |
Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
TextArea()
Creates a new empty TextArea without a scroll bar. |
|
TextArea(int x,
int y,
int width,
int height,
boolean scrollbar)
Constructor for TextArea. |
|
TextArea(java.lang.String[] text,
int x,
int y,
int width,
int height,
boolean scrollbar)
Constructor for TextArea. |
Method Summary | |
void |
add(java.lang.String text)
Add a row to the end of the text field. |
void |
insert(int row,
java.lang.String text)
Insert a row of text in the text field. |
boolean |
onKeyEvent(KeyEvent e)
Handle KeyEvents. |
void |
paint()
Redraws this text field. |
void |
paintScrollbar()
Paint the ScrollBar. |
void |
remove()
Remove the text field. |
void |
remove(int row)
Removes a row from the text field. |
void |
scroll(int about,
int direction)
Scrolls the text. |
void |
setActionListener(ActionListener listener)
Add an ActionListener to the button. |
void |
setScrollPos(int pos)
Sets the absolute scroll position of the text area. |
Methods inherited from class jcontrol.ui.vole.Component |
getBounds, getParent, isVisible, onActionEvent, removeFocus, requestFocus, setBounds, setFont, setGraphics, setLocation, setParent, setVisible, transferFocus, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
Field Detail |
public static final int DOWN
protected int fontheight
protected int lastDirection
public static final boolean NO
protected int oldScrollBarValue
protected boolean scrollbar
protected int scrollBarValue
protected int scrollValue
protected java.util.Vector textData
protected int textheight
public static final int UP
public static final boolean YES
Constructor Detail |
public TextArea()
public TextArea(int x, int y, int width, int height, boolean scrollbar)
x
- The x coordinate on the display.y
- The y coordinate on the display.width
- The text field width.height
- The tet field height.scrollbar
- Select whether a scrollbar should be displayed.public TextArea(java.lang.String[] text, int x, int y, int width, int height, boolean scrollbar)
x
- The x coordinate on the display.y
- The y coordinate on the display.width
- The text field width. height
- The text field height. text
- The text as String array.scrollbar
- Select whether a scrollbar should be displayed.
Method Detail |
public void add(java.lang.String text)
text
- The text to add.public void insert(int row, java.lang.String text)
row
- The row to insert.text
- The text for the row.public boolean onKeyEvent(KeyEvent e)
onKeyEvent
in class Component
e
- the KeyEvent
Container
.public void paint()
paint
in class Component
Component
public void paintScrollbar()
public void remove()
remove
in class Component
Component
public void remove(int row)
row
- The row to remove.public void scroll(int about, int direction)
about
- the amount the text has to be scrolled.direction
- UP or DOWN
public void setActionListener(ActionListener listener)
listener
- The new ActionListener or null.public void setScrollPos(int pos)
pos
- The new scroll position.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |