TextComponentNameTextComponent
DescriptionThe abstract TextComponent class provides the base class for the text input components, TextArea and TextField. Class Definition
public abstract class java.awt.TextComponent extends java.awt.Component { // Instance Methods public void addTextListener (TextListener l); public int getCaretPosition(); public synchronized String getSelectedText(); public synchronized int getSelectionEnd(); public synchronized int getSelectionStart(); public synchronized String getText(); public boolean isEditable(); public void removeNotify(); public void removeTextListener (TextListener l); public synchronized void select (int selectionStart, int selectionEnd); public synchronized void selectAll(); public void setCaretPosition (int position); public synchronized void setEditable (boolean state); public synchronized void setSelectionEnd (int selectionEnd); public synchronized void setSelectionStart (int selectionStart); public synchronized void setText (String text); // Protected Instance Methods protected String paramString(); protected void processEvent (AWTEvent e); protected void processTextEvent (TextEvent e); } Instance MethodsaddTextListenerpublic void addTextListener (TextListener l)
getCaretPositionpublic int getCaretPosition()
getSelectedTextpublic synchronized String getSelectedText()
getSelectionEndpublic synchronized int getSelectionEnd()
getSelectionStartpublic synchronized int getSelectionStart()
getTextpublic synchronized String getText()
isEditablepublic boolean isEditable()
removeNotifypublic void removeNotify()
removeTextListenerpublic void removeTextListener (TextListener l)
selectpublic synchronized void select (int selectionStart, int selectionEnd)
selectAllpublic synchronized void selectAll()
setCaretPositionpublic void setCaretPosition (int position)
setEditablepublic synchronized void setEditable (boolean state)
setSelectionEndpublic synchronized void setSelectionEnd (int selectionEnd)
setSelectionStartpublic synchronized void setSelectionStart (int selectionStart)
setTextpublic synchronized void setText (String text)
Protected Instance MethodsparamStringprotected String paramString()
processEventprotected void processEvent (AWTEvent e)
processTextEventprotected void processTextEvent (TextEvent e)
See AlsoComponent, TextArea, TextField, String |
|