Home » openjdk-7 » java » awt » peer » [javadoc | source]
public interface: TextComponentPeer [javadoc | source]

All Implemented Interfaces:

All Known Implementing Classes:
    TextFieldPeer, TextAreaPeer

The peer interface for TextComponent . The peer interfaces are intended only for use in porting the AWT. They are not intended for use by application developers, and developers should not implement peers nor invoke any of the peer methods directly on the peer instances.
Method from java.awt.peer.TextComponentPeer Summary:
getCaretPosition,   getInputMethodRequests,   getSelectionEnd,   getSelectionStart,   getText,   select,   setCaretPosition,   setEditable,   setText
Method from java.awt.peer.TextComponentPeer Detail:
 public int getCaretPosition()
    Returns the current caret position.
 public InputMethodRequests getInputMethodRequests()
    Returns the input method requests.
 public int getSelectionEnd()
    Returns the end index of the current selection.
 public int getSelectionStart()
    Returns the start index of the current selection.
 public String getText()
    Returns the current content of the text component.
 public  void select(int selStart,
    int selEnd)
    Selects an area of the text component.
 public  void setCaretPosition(int pos)
    Sets the caret position of the text component.
 public  void setEditable(boolean editable)
    Sets if the text component should be editable or not.
 public  void setText(String l)
    Sets the content for the text component.