All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.TextArea
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.TextComponent
|
+----java.awt.TextArea
- public class TextArea
- extends TextComponent
A TextArea object is a multi-line area that displays text. It can
be set to allow editing or read-only modes.
-
SCROLLBARS_BOTH
- Create and display both vertical and horizontal scrollbars.
-
SCROLLBARS_HORIZONTAL_ONLY
- Create and display horizontal scrollbar only.
-
SCROLLBARS_NONE
- Do not create or display any scrollbars for the text area.
-
SCROLLBARS_VERTICAL_ONLY
- Create and display vertical scrollbar only.
-
TextArea()
- Constructs a new TextArea.
-
TextArea(int, int)
- Constructs a new empty TextArea with the specified number of
rows and columns.
-
TextArea(String)
- Constructs a new TextArea with the specified text displayed.
-
TextArea(String, int, int)
- Constructs a new TextArea with the specified text and number
of rows and columns.
-
TextArea(String, int, int, int)
- Constructs a new TextArea with the specified text and number
of rows, columns, and scrollbar visibility.
-
addNotify()
- Creates the TextArea's peer.
-
append(String)
- Appends the given text to the end.
-
appendText(String)
-
Deprecated.
-
getColumns()
- Returns the number of columns in the TextArea.
-
getMinimumSize()
- Returns the minimum size Dimensions of the TextArea.
-
getMinimumSize(int, int)
- Returns the specified minimum size Dimensions of the TextArea.
-
getPreferredSize()
- Returns the preferred size Dimensions of the TextArea.
-
getPreferredSize(int, int)
- Returns the specified row and column Dimensions of the TextArea.
-
getRows()
- Returns the number of rows in the TextArea.
-
getScrollbarVisibility()
- Returns the enumerated value describing which scrollbars
the text area has.
-
insert(String, int)
- Inserts the specified text at the specified position.
-
insertText(String, int)
-
Deprecated.
-
minimumSize()
-
Deprecated.
-
minimumSize(int, int)
-
Deprecated.
-
paramString()
- Returns the String of parameters for this TextArea.
-
preferredSize()
-
Deprecated.
-
preferredSize(int, int)
-
Deprecated.
-
replaceRange(String, int, int)
- Replaces text from the indicated start to end position with the
new text specified.
-
replaceText(String, int, int)
-
Deprecated.
-
setColumns(int)
- Sets the number of columns for this TextArea.
-
setRows(int)
- Sets the number of rows for this TextArea.
SCROLLBARS_BOTH
Properties Public Constant
SCROLLBARS_BOTH=int
- Create and display both vertical and horizontal scrollbars.
SCROLLBARS_VERTICAL_ONLY
Properties Public Constant
SCROLLBARS_VERTICAL_ONLY=int
- Create and display vertical scrollbar only.
SCROLLBARS_HORIZONTAL_ONLY
Properties Public Constant
SCROLLBARS_HORIZONTAL_ONLY=int
- Create and display horizontal scrollbar only.
SCROLLBARS_NONE
Properties Public Constant
SCROLLBARS_NONE=int
- Do not create or display any scrollbars for the text area.
TextArea
method TextArea() public
- Constructs a new TextArea.
TextArea
method TextArea(text=String) public
- Constructs a new TextArea with the specified text displayed.
- Parameters:
- text - the text to be displayed
TextArea
method TextArea(rows=int, -
columns=int) public
- Constructs a new empty TextArea with the specified number of
rows and columns.
- Parameters:
- rows - the number of rows
- columns - the number of columns
TextArea
method TextArea(text=String, -
rows=int, -
columns=int) public
- Constructs a new TextArea with the specified text and number
of rows and columns.
- Parameters:
- text - the text to be displayed
- rows - the number of rows
- columns - the number of columns
TextArea
method TextArea(text=String, -
rows=int, -
columns=int, -
scrollbars=int) public
- Constructs a new TextArea with the specified text and number
of rows, columns, and scrollbar visibility.
- Parameters:
- text - the text to be displayed
- rows - the number of rows
- columns - the number of columns
- scrollbars - the visibility of scrollbars
addNotify
method addNotify() public
- Creates the TextArea's peer. The peer allows us to modify
the appearance of the TextArea without changing any of its
functionality.
- Overrides:
- addNotify in class Component
insert
method insert(str=String, -
pos=int) public protect
- Inserts the specified text at the specified position.
- Parameters:
- str - the text to insert.
- pos - the position at which to insert.
- See Also:
- setText, replaceRange
insertText
method insertText(str=String, -
pos=int) public
- Note: insertText() is deprecated.
As of JDK version 1.1,
replaced by insert(String, int).
append
method append(str=String) public protect
- Appends the given text to the end.
- Parameters:
- str - the text to insert
- See Also:
- insert
appendText
method appendText(str=String) public
- Note: appendText() is deprecated.
As of JDK version 1.1,
replaced by append(String).
replaceRange
method replaceRange(str=String, -
start=int, -
end=int) public protect
- Replaces text from the indicated start to end position with the
new text specified.
- Parameters:
- str - the text to use as the replacement.
- start - the start position.
- end - the end position.
- See Also:
- insert, replaceRange
replaceText
method replaceText(str=String, -
start=int, -
end=int) public
- Note: replaceText() is deprecated.
As of JDK version 1.1,
replaced by replaceRange(String, int, int).
getRows
method getRows() returns int public
- Returns the number of rows in the TextArea.
setRows
method setRows(rows=int) public
- Sets the number of rows for this TextArea.
- Parameters:
- rows - the number of rows
- Throws: IllegalArgumentException
- If rows is less than 0.
getColumns
method getColumns() returns int public
- Returns the number of columns in the TextArea.
setColumns
method setColumns(columns=int) public
- Sets the number of columns for this TextArea.
- Parameters:
- columns - the number of columns
- Throws: IllegalArgumentException
- If columns is less than 0.
getScrollbarVisibility
method getScrollbarVisibility() returns int public
- Returns the enumerated value describing which scrollbars
the text area has.
- Returns:
- the display policy for the scrollbars
getPreferredSize
method getPreferredSize(rows=int, -
columns=int) returns Dimension public
- Returns the specified row and column Dimensions of the TextArea.
- Parameters:
- rows - the preferred rows amount
- columns - the preferred columns amount
preferredSize
method preferredSize(rows=int, -
columns=int) returns Dimension public
- Note: preferredSize() is deprecated.
As of JDK version 1.1,
replaced by getPreferredSize(int, int).
getPreferredSize
method getPreferredSize() returns Dimension public
- Returns the preferred size Dimensions of the TextArea.
- Overrides:
- getPreferredSize in class Component
preferredSize
method preferredSize() returns Dimension public
- Note: preferredSize() is deprecated.
As of JDK version 1.1,
replaced by getPreferredSize().
- Overrides:
- preferredSize in class Component
getMinimumSize
method getMinimumSize(rows=int, -
columns=int) returns Dimension public
- Returns the specified minimum size Dimensions of the TextArea.
- Parameters:
- rows - the minimum row size
- columns - the minimum column size
minimumSize
method minimumSize(rows=int, -
columns=int) returns Dimension public
- Note: minimumSize() is deprecated.
As of JDK version 1.1,
replaced by getMinimumSize(int, int).
getMinimumSize
method getMinimumSize() returns Dimension public
- Returns the minimum size Dimensions of the TextArea.
- Overrides:
- getMinimumSize in class Component
minimumSize
method minimumSize() returns Dimension public
- Note: minimumSize() is deprecated.
As of JDK version 1.1,
replaced by getMinimumSize().
- Overrides:
- minimumSize in class Component
paramString
method paramString() returns String Inheritable
- Returns the String of parameters for this TextArea.
- Overrides:
- paramString in class TextComponent
All Packages Class Hierarchy This Package Previous Next Index