Package adams.gui.core
Interface TextAreaComponent
-
- All Superinterfaces:
BaseTextComponent
- All Known Subinterfaces:
AppendableTextAreaComponent
- All Known Implementing Classes:
BaseRSyntaxTextArea,BaseTextArea,BaseTextAreaWithButtons,TextEditorPanel.TextEditorArea
public interface TextAreaComponent extends BaseTextComponent
Common interface for TextArea-like components.- 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 caret position.intgetColumns()Returns the columns.DocumentgetDocument()Returns the underlying document.booleangetLineWrap()Returns whether line wrap is enabled.intgetRows()Returns the rows.StringgetSelectedText()Returns the selected text.StringgetText()Returns the text to display.FontgetTextFont()Returns the text font in use.booleangetWrapStyleWord()Returns whether word wrap is enabled.booleanisEditable()Returns whether the text area is editable or not.voidsetCaretPosition(int pos)Sets the caret position.voidsetCaretPositionLast()Sets the position of the cursor at the end.voidsetColumns(int value)Sets the columns.voidsetEditable(boolean value)Sets whether the text area is editable or not.voidsetLineWrap(boolean value)Sets whether to line wrap or not.voidsetRows(int value)Sets the rows.voidsetText(String value)Sets the text to display.voidsetTextFont(Font value)Sets the text font.voidsetWrapStyleWord(boolean value)Sets whether to word wrap or not.
-
-
-
Method Detail
-
setText
void setText(String value)
Sets the text to display.- Specified by:
setTextin interfaceBaseTextComponent- Parameters:
value- the text
-
getText
String getText()
Returns the text to display.- Specified by:
getTextin interfaceBaseTextComponent- Returns:
- the text
-
getSelectedText
String getSelectedText()
Returns the selected text.- Returns:
- the selected text
-
getDocument
Document getDocument()
Returns the underlying document.- Returns:
- the document
-
setRows
void setRows(int value)
Sets the rows.- Parameters:
value- the rows
-
getRows
int getRows()
Returns the rows.- Returns:
- the rows
-
setColumns
void setColumns(int value)
Sets the columns.- Parameters:
value- the columns
-
getColumns
int getColumns()
Returns the columns.- Returns:
- the columns
-
setEditable
void setEditable(boolean value)
Sets whether the text area is editable or not.- Parameters:
value- if true the text area is editable
-
isEditable
boolean isEditable()
Returns whether the text area is editable or not.- Returns:
- true if the text area is editable
-
setLineWrap
void setLineWrap(boolean value)
Sets whether to line wrap or not.- Parameters:
value- if true line wrap is enabled
-
getLineWrap
boolean getLineWrap()
Returns whether line wrap is enabled.- Returns:
- true if line wrap wrap is enabled
-
setWrapStyleWord
void setWrapStyleWord(boolean value)
Sets whether to word wrap or not.- Parameters:
value- if true word wrap is enabled
-
getWrapStyleWord
boolean getWrapStyleWord()
Returns whether word wrap is enabled.- Returns:
- true if word wrap wrap is enabled
-
setTextFont
void setTextFont(Font value)
Sets the text font.- Parameters:
value- the font
-
getTextFont
Font getTextFont()
Returns the text font in use.- Returns:
- the font
-
setCaretPosition
void setCaretPosition(int pos)
Sets the caret position.- Parameters:
pos- the position (0-based)
-
getCaretPosition
int getCaretPosition()
Returns the current caret position.- Returns:
- the position (0-based)
-
setCaretPositionLast
void setCaretPositionLast()
Sets the position of the cursor at the end.
-
-