|
||||||||||
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. |
static interface |
TextArea.TextBindMapping
Translates between text and context data during data binding. |
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(boolean backspace)
|
Bounds |
getCharacterBounds(int offset)
|
int |
getCharacterCount()
Returns character count of the document. |
Document |
getDocument()
Returns the document that backs the text area. |
int |
getInsertionPoint(int x,
int y)
|
int |
getNextInsertionPoint(int x,
int from,
FocusTraversalDirection 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<TextAreaBindingListener> |
getTextAreaBindingListeners()
|
ListenerList<TextAreaCharacterListener> |
getTextAreaCharacterListeners()
|
ListenerList<TextAreaListener> |
getTextAreaListeners()
|
ListenerList<TextAreaSelectionListener> |
getTextAreaSelectionListeners()
|
TextArea.TextBindMapping |
getTextBindMapping()
|
BindType |
getTextBindType()
|
String |
getTextKey()
Returns the text area's text key. |
void |
insert(char character)
|
void |
insert(String text)
|
void |
insertImage(Image image)
|
void |
insertParagraph()
|
boolean |
isEditable()
Returns the text area's editable flag. |
void |
load(Object context)
Copies bound values from the bind context to the component. |
void |
paste()
|
void |
redo()
|
void |
selectAll()
Selects all text. |
void |
setDocument(Document document)
Sets the document that backs the text area. |
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 |
setTextBindMapping(TextArea.TextBindMapping textBindMapping)
|
void |
setTextBindType(BindType textBindType)
|
void |
setTextBindType(String textBindType)
|
void |
setTextKey(String textKey)
Sets the text area's text key. |
void |
store(Object 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)
document
- public String getText()
public void setText(String text)
public void setText(URL text)
public void insert(char character)
public void insert(String text)
public void insertImage(Image image)
public void insertParagraph()
public int getCharacterCount()
public void delete(boolean backspace)
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 BindType getTextBindType()
public void setTextBindType(BindType textBindType)
public final void setTextBindType(String textBindType)
public TextArea.TextBindMapping getTextBindMapping()
public void setTextBindMapping(TextArea.TextBindMapping textBindMapping)
public void load(Object context)
Component
load
in class Component
public void store(Object 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, FocusTraversalDirection 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()
public ListenerList<TextAreaBindingListener> getTextAreaBindingListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |