|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjewl.Window
jewl.Control
jewl.MultiLineControl
The abstract base class for controls containing multiple lines of text.
Multi-line controls allow you to get or set the text of any line in
the control, and to insert and remove items. The user or the program
can select any line using the select() method, and several
other methods implicitly operate on the currently selected line.
| Method Summary | |
void |
appendLine(java.lang.String text)
Append a new line to the end of this control. |
void |
appendLines(java.lang.String[] text)
Append a set of lines to the end of this control. |
abstract void |
clear()
Remove all lines from this control. |
java.lang.String |
getLine()
Get the text of the currently selected line. |
abstract java.lang.String |
getLine(int line)
Get the text of the specified line. |
void |
insertLine(java.lang.String text)
Insert a new line into this control immediately above the currently selected line. |
abstract void |
insertLine(java.lang.String text,
int line)
Insert a new line into this control immediately above the specified line. |
void |
insertLines(java.lang.String[] text)
Insert a set of lines into this control immediately above the currently selected line. |
void |
insertLines(java.lang.String[] text,
int line)
Insert a set of lines into this control immediately above the specified line. |
abstract int |
lines()
Get the number of lines in this control. |
void |
removeLine()
Remove the currently selected line from this control. |
abstract void |
removeLine(int line)
Remove the specified line from this control. |
abstract void |
select(int line)
Select the specified line. |
abstract int |
selection()
Get the number of the the currently selected line in this control. |
void |
setLine(java.lang.String text)
Set the text of the currently selected line. |
abstract void |
setLine(java.lang.String text,
int line)
Set the text of the specified line. |
| Methods inherited from class jewl.Control |
disable, enable, enable, getToolTip, isEnabled, setToolTip |
| Methods inherited from class jewl.Window |
addEventListener, commandAvailable, getCommand, getFont, getHeight, getID, getLeft, getScreenHeight, getScreenWidth, getSource, getTop, getWidth, hide, init, isVisible, nextCommand, parent, root, setFont, setID, setLocation, setSize, show, show |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public abstract int lines()
public abstract int selection()
public abstract void select(int line)
line - the number of the line to be selected as the current line.
java.lang.ArrayIndexOutOfBoundsException - The line number is invalid.public abstract java.lang.String getLine(int line)
line - the number of the line to get.
java.lang.ArrayIndexOutOfBoundsException - the line number is invalid.public java.lang.String getLine()
getLine(selection()).
java.lang.ArrayIndexOutOfBoundsException - there is no currently selected line.
public abstract void setLine(java.lang.String text,
int line)
text - the text to be stored in the specified line.line - the number of the line to set.
java.lang.ArrayIndexOutOfBoundsException - the line number is invalid.public void setLine(java.lang.String text)
setLine(text,selection()).
text - the text to be stored in the current line.
java.lang.ArrayIndexOutOfBoundsException - there is no currently selected line.
public abstract void insertLine(java.lang.String text,
int line)
text - the text of the line to be inserted.line - the line number where the new line should be inserted, or -1 to
append the line to the end of the control.
java.lang.ArrayIndexOutOfBoundsException - the line number is invalid.public void insertLine(java.lang.String text)
insertLine(text,selection()).
text - the text of the line to be inserted.public void appendLine(java.lang.String text)
insertLine(text,-1).
text - the text of the line to be appended.
public void insertLines(java.lang.String[] text,
int line)
text - an array of lines to be inserted.line - the line number where the new line should be inserted, or -1 to
append the lines to the end of the control.
java.lang.ArrayIndexOutOfBoundsException - the line number is invalid.public void insertLines(java.lang.String[] text)
text - an array of lines to be inserted.public void appendLines(java.lang.String[] text)
insertLines(text,-1).
text - an array of lines to be appended.public abstract void removeLine(int line)
line - the number of the line to be removed, or -1 to remove the currently
selected line.
java.lang.ArrayIndexOutOfBoundsException - the line number is invalid.public void removeLine()
java.lang.ArrayIndexOutOfBoundsException - if there is no currently selected line.public abstract void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||