APIdia Launch Partner
Top Description Methods
java.awt.peer

public Interface TextAreaPeer

extends TextComponentPeer
Known Direct Implementers
sun.awt.X11.XTextAreaPeer
Imports
java.awt.Dimension, .TextArea

The peer interface for TextArea. 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 Summary

Modifier and TypeMethod and Description
public Dimension

Returns:

the minimum size of a textarea
getMinimumSize
(int
the number of rows
rows
,
int
the number of columns
columns
)

Returns the minimum size of a textarea with the specified number of columns and rows.

public Dimension

Returns:

the preferred size of a textarea
getPreferredSize
(int
the number of rows
rows
,
int
the number of columns
columns
)

Returns the preferred size of a textarea with the specified number of columns and rows.

public void
insert(String
the text to insert
text
,
int
the position to insert
pos
)

Inserts the specified text at the specified position in the document.

public void
replaceRange(String
the replacement string
text
,
int
the begin of the range to replace
start
,
int
the end of the range to replace
end
)

Replaces a range of text by the specified string.

Inherited from java.awt.peer.TextComponentPeer:
getCaretPositiongetInputMethodRequestsgetSelectionEndgetSelectionStartgetTextselectsetCaretPositionsetEditablesetText

Method Detail

getMinimumSizeback to summary
public Dimension getMinimumSize(int rows, int columns)

Returns the minimum size of a textarea with the specified number of columns and rows.

Parameters
rows:int

the number of rows

columns:int

the number of columns

Returns:Dimension

the minimum size of a textarea

See Also
TextArea#getMinimumSize(int, int)
getPreferredSizeback to summary
public Dimension getPreferredSize(int rows, int columns)

Returns the preferred size of a textarea with the specified number of columns and rows.

Parameters
rows:int

the number of rows

columns:int

the number of columns

Returns:Dimension

the preferred size of a textarea

See Also
TextArea#getPreferredSize(int, int)
insertback to summary
public void insert(String text, int pos)

Inserts the specified text at the specified position in the document.

Parameters
text:String

the text to insert

pos:int

the position to insert

See Also
TextArea#insert(String, int)
replaceRangeback to summary
public void replaceRange(String text, int start, int end)

Replaces a range of text by the specified string.

Parameters
text:String

the replacement string

start:int

the begin of the range to replace

end:int

the end of the range to replace

See Also
TextArea#replaceRange(String, int, int)