|
|||||||||
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
public class 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.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
ScrollBar
Field Summary | |
---|---|
static int |
SCROLL_DOWN
Scroll down |
static int |
SCROLL_UP
Scroll up |
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, 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 showScrollbar)
Constructor for TextArea. |
|
TextArea(String[] items,
int x,
int y,
int width,
int height,
boolean showScrollbar)
Constructor for TextArea. |
Method Summary | |
---|---|
void |
add(String item)
Add a row to the end of the text field. |
void |
insert(int row,
String item)
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(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, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setParent, setVisible, transferFocus, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
public static final int SCROLL_UP
public static final int SCROLL_DOWN
Constructor Detail |
---|
public TextArea()
public TextArea(String[] items, int x, int y, int width, int height, boolean showScrollbar)
items
- The text as String array.x
- The x coordinate on the display.y
- The y coordinate on the display.width
- The text field width. height
- The text field height. showScrollbar
- Selects whether a scrollbar should be displayed or not.public TextArea(int x, int y, int width, int height, boolean showScrollbar)
x
- The x coordinate on the display.y
- The y coordinate on the display.width
- The text field width.height
- The tet field height.showScrollbar
- Selects whether a scrollbar should be displayed or not.Method Detail |
---|
public void insert(int row, String item)
row
- The row to insert.text
- The text for the row.public void add(String item)
item
- The text to add.public void remove(int row)
row
- The row to remove.public void setScrollPos(int pos)
pos
- The new scroll position.public void scroll(int about, int direction)
about
- the amount the text has to be scrolled.direction
- SCROLL_UP or SCROLL_DOWNpublic void paint()
paint
in class Component
Component
public void paintScrollbar()
public void setActionListener(ActionListener listener)
listener
- The new ActionListener or null.public boolean onKeyEvent(KeyEvent e)
onKeyEvent
in class Component
e
- the KeyEvent
Container
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |