Package adams.gui.core
Interface TextPaneComponent
-
- All Known Implementing Classes:
BaseTextPane,BaseTextPaneWithButtons,BaseTextPaneWithWordWrap,DiffTextPane
public interface TextPaneComponentTODO: What class does.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCaretPosition()Returns the current position of the cursor.DocumentgetDocument()Returns the underlying document.StringgetSelectedText()Returns the selected text.StringgetText()Returns the text to display.booleanisEditable()Returns whether the text pane is editable or not.voidsetCaretPosition(int value)Sets the position of the cursor.voidsetCaretPositionLast()Sets the position of the cursor at the end.voidsetEditable(boolean value)Sets whether the text pane is editable or not.voidsetText(String value)Sets the text to display.
-
-
-
Method Detail
-
setText
void setText(String value)
Sets the text to display.- Parameters:
value- the text
-
getText
String getText()
Returns the text to display.- Returns:
- the text
-
getSelectedText
String getSelectedText()
Returns the selected text.- Returns:
- the selected text
-
setEditable
void setEditable(boolean value)
Sets whether the text pane is editable or not.- Parameters:
value- if true the text pane is editable
-
isEditable
boolean isEditable()
Returns whether the text pane is editable or not.- Returns:
- true if the text pane is editable
-
getDocument
Document getDocument()
Returns the underlying document.- Returns:
- the document
-
setCaretPosition
void setCaretPosition(int value)
Sets the position of the cursor.- Parameters:
value- the position
-
getCaretPosition
int getCaretPosition()
Returns the current position of the cursor.- Returns:
- the cursor position
-
setCaretPositionLast
void setCaretPositionLast()
Sets the position of the cursor at the end.
-
-