class org.aswing.JTextArea extends JTextComponent
Interfaces | |||
![]() | Viewportable |
|
Sub classes | ||||||
![]() | RegExFormattedTextArea, MultilineLabel |
|
A JTextArea
is a multi-line area that displays text.
With JScrollPane, it's easy to be a scrollable text area, for example:
var ta:JTextArea = new JTextArea(); var sp:JScrollPane = new JScrollPane(ta);@author paling @see org.aswing.JScrollPane
![]() | Show Events | Hide Events
|
Class Fields
Instance Fields
A number of columns in this JTextArea
, if it changed then call parent to do layout.
If columns is set to zero or min than zero, the preferred width will be matched just to view all of the text.
A number of rows in this JTextArea
, if it changed then call parent to do layout.
If rows is set to zero or min than zero, the preferred height will be matched just to view all of the text.
var viewPosition:IntPoint
The view's position.
It returns (0,0) if view is null.
@see setViewPosition to set view position loudly (to trigger events). @see Viewportable.setViewPosition
function addStateListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void
Add a listener to listen the viewpoat state change event.
When the viewpoat's state changed, the state is all about:
- viewPosition
- verticalUnitIncrement
- verticalBlockIncrement
- horizontalUnitIncrement
- horizontalBlockIncrement
listener | the listener |
priority | the priority |
useWeakReference | Determines whether the reference to the listener is strong or weak. |
function removeStateListener(listener:Dynamic ->Void): Void
Removes a state listener. @see org.aswing.event.AWEvent#STATE_CHANGED
listener | the listener to be removed. |
function scrollRectToVisible(contentRect:IntRectangle, ?programmatic:Bool = true): Void
@see Viewportable.scrollRectToVisible
function scrollToBottomLeft(): Void
Scrolls to view bottom left content.
This will make the scrollbars of JScrollPane
scrolled automatically,
if it is located in a JScrollPane
.
function scrollToBottomRight(): Void
Scrolls to view bottom right content.
This will make the scrollbars of JScrollPane
scrolled automatically,
if it is located in a JScrollPane
.
function scrollToTopLeft(): Void
Scrolls to view top left content.
This will make the scrollbars of JScrollPane
scrolled automatically,
if it is located in a JScrollPane
.
function scrollToTopRight(): Void
Scrolls to view to right content.
This will make the scrollbars of JScrollPane
scrolled automatically,
if it is located in a JScrollPane
.
function setViewPosition(p:IntPoint, ?programmatic:Bool = true): Void
@see Viewportable.setViewPosition