|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.TextArea
public class TextArea
Component that allows a user to enter and edit multiple lines of (optionally formatted) text.
Nested Class Summary | |
---|---|
static interface |
TextArea.Skin
Text area skin interface. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
TextArea()
|
Method Summary | |
---|---|
void |
clear()
Clears any bound values in the component. |
void |
clearSelection()
Clears the selection. |
void |
copy()
|
void |
cut()
|
void |
delete(Direction direction)
|
Bounds |
getCharacterBounds(int offset)
|
Document |
getDocument()
|
int |
getInsertionPoint(int x,
int y)
|
int |
getNextInsertionPoint(int x,
int from,
Direction direction)
|
int |
getRowCount()
|
int |
getRowIndex(int offset)
|
String |
getSelectedText()
Returns the currently selected text. |
Span |
getSelection()
Returns a span representing the current selection. |
int |
getSelectionLength()
Returns the length of the selection. |
int |
getSelectionStart()
Returns the starting index of the selection. |
String |
getText()
|
ListenerList<TextAreaCharacterListener> |
getTextAreaCharacterListeners()
|
ListenerList<TextAreaListener> |
getTextAreaListeners()
|
ListenerList<TextAreaSelectionListener> |
getTextAreaSelectionListeners()
|
String |
getTextKey()
Returns the text area's text key. |
void |
insertImage(Image image)
|
void |
insertParagraph()
|
void |
insertText(char character)
|
void |
insertText(String text)
|
boolean |
isEditable()
Returns the text area's editable flag. |
void |
load(Dictionary<String,?> context)
Copies bound values from the bind context to the component. |
void |
paste()
|
void |
redo()
|
void |
selectAll()
Selects all text. |
void |
setDocument(Document document)
|
void |
setEditable(boolean editable)
Sets the text area's editable flag. |
void |
setSelection(int selectionStart,
int selectionLength)
Sets the selection. |
void |
setSelection(Span selection)
Sets the selection. |
protected void |
setSkin(Skin skin)
Sets the skin, replacing any previous skin. |
void |
setText(String text)
|
void |
setText(URL text)
|
void |
setTextKey(String textKey)
Sets the text area's text key. |
void |
store(Dictionary<String,?> context)
Copies bound values from the component to the bind context. |
void |
undo()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextArea()
Method Detail |
---|
protected void setSkin(Skin skin)
Component
setSkin
in class Component
skin
- The new skin.public Document getDocument()
public void setDocument(Document document)
public String getText()
public void setText(String text)
public void setText(URL text)
public void insertText(char character)
public void insertText(String text)
public void insertImage(Image image)
public void insertParagraph()
public void delete(Direction direction)
public void cut()
public void copy()
public void paste()
public void undo()
public void redo()
public int getSelectionStart()
public int getSelectionLength()
public Span getSelection()
public void setSelection(int selectionStart, int selectionLength)
selectionStart
- The starting index of the selection.selectionLength
- The length of the selection.public final void setSelection(Span selection)
selection
- setSelection(int, int)
public void selectAll()
public void clearSelection()
public String getSelectedText()
public boolean isEditable()
public void setEditable(boolean editable)
editable
- public String getTextKey()
public void setTextKey(String textKey)
textKey
- The text key, or null to clear the binding.public void load(Dictionary<String,?> context)
Component
load
in class Component
public void store(Dictionary<String,?> context)
Component
store
in class Component
public void clear()
Component
clear
in class Component
public int getInsertionPoint(int x, int y)
public int getNextInsertionPoint(int x, int from, Direction direction)
public int getRowIndex(int offset)
public int getRowCount()
public Bounds getCharacterBounds(int offset)
public ListenerList<TextAreaListener> getTextAreaListeners()
public ListenerList<TextAreaCharacterListener> getTextAreaCharacterListeners()
public ListenerList<TextAreaSelectionListener> getTextAreaSelectionListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |