Package adams.gui.core
Interface TextAreaComponent
-
- All Known Subinterfaces:
AppendableTextAreaComponent
- All Known Implementing Classes:
BaseTextArea
,BaseTextAreaWithButtons
,TextEditorPanel.TextEditorArea
public interface TextAreaComponent
Common interface for TextArea-like components.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getCaretPosition()
Returns the current caret position.int
getColumns()
Returns the columns.Document
getDocument()
Returns the underlying document.boolean
getLineWrap()
Returns whether line wrap is enabled.int
getRows()
Returns the rows.String
getSelectedText()
Returns the selected text.String
getText()
Returns the text to display.Font
getTextFont()
Returns the text font in use.boolean
getWrapStyleWord()
Returns whether word wrap is enabled.boolean
isEditable()
Returns whether the text area is editable or not.void
setCaretPosition(int pos)
Sets the caret position.void
setCaretPositionLast()
Sets the position of the cursor at the end.void
setColumns(int value)
Sets the columns.void
setEditable(boolean value)
Sets whether the text area is editable or not.void
setLineWrap(boolean value)
Sets whether to line wrap or not.void
setRows(int value)
Sets the rows.void
setText(String value)
Sets the text to display.void
setTextFont(Font value)
Sets the text font.void
setWrapStyleWord(boolean value)
Sets whether to word wrap or not.
-
-
-
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
-
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.
-
-