|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbuoy.event.EventSource
buoy.widget.Widget
buoy.widget.TextWidget
public abstract class TextWidget
A TextWidget is a Widget that allows the user to view and edit text. This is an abstract class. Subclasses implement specific types of text editing Widgets
Method Summary | |
---|---|
int |
getCaretPosition()
Get the current position of the caret. |
javax.swing.text.JTextComponent |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
int |
getLength()
Get the number of characters in the text contained in the Widget. |
java.lang.String |
getSelectedText()
Get the selected text. |
int |
getSelectionEnd()
Get the end of the selected range. |
int |
getSelectionStart()
Get the start of the selected range. |
java.lang.String |
getText()
Get the text contained in the Widget. |
boolean |
isEditable()
Determine whether the user can edit the text contained in this text field. |
void |
setCaretPosition(int pos)
Set the current position of the caret. |
void |
setEditable(boolean editable)
Set whether the user can edit the text contained in this text field. |
void |
setSelectionEnd(int pos)
Set the end of the selected range. |
void |
setSelectionStart(int pos)
Set the start of the selected range. |
void |
setText(java.lang.String text)
Set the text contained in the Widget. |
Methods inherited from class buoy.widget.Widget |
---|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible |
Methods inherited from class buoy.event.EventSource |
---|
addEventLink, addEventLink, removeEventLink |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public javax.swing.text.JTextComponent getComponent()
Widget
getComponent
in class Widget
public java.lang.String getText()
public void setText(java.lang.String text)
This method can be safely called from any thread, not just the event dispatch thread.
public int getLength()
public int getCaretPosition()
public void setCaretPosition(int pos)
public int getSelectionStart()
public void setSelectionStart(int pos)
public int getSelectionEnd()
public void setSelectionEnd(int pos)
public java.lang.String getSelectedText()
public boolean isEditable()
public void setEditable(boolean editable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |