interface org.aswing.Viewportable
Implementors | ||||||||||||
JList, JTable, JTextArea, JTree, JViewport |
|
A viewportable object can scrolled by JScrollPane
,
JScrollBar
to view its viewed content in a visible area.
See JScrollPane
, JViewport
, JList
, JTextArea
Authors: paling, ngrebenshikov
Show Events | Hide Events
|
Instance Fields
function addStateListener(listener:Dynamic ->Void?priority:Int, ?useWeakReference:Bool): Void
Add a listener to listen the viewpoat state change event.
When the viewpoat's state changed, the state is all about:
- viewPosition
listener | the listener |
priority | the priority |
useWeakReference | Determines whether the reference to the listener is strong or weak. |
function getExtentSize(): IntDimension
Returns the size of the visible part of the view in view logic coordinates.
returns | a |
function getViewPosition(): IntPoint
Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view. in view logic coordinates.
returns | a |
function getViewSize(): IntDimension
Returns the viewportable view's amount size if view all content in view logic coordinates. Usually the view's preffered size.
returns | the view's size. |
function getViewportPane(): Component
Return the component of the viewportable's pane which would added to displayed on the stage.
returns | the component of the viewportable pane. |
function removeStateListener(listener:Dynamic ->Void): Void
Removes a state listener. @see org.aswing.event.InteractiveEvent#STATE_CHANGED
listener | the listener to be removed. |
function scrollRectToVisible(contentRect:IntRectangle, ?programmatic:Bool): Void
Scrolls the view so that IntRectangle
within the view becomes visible. in view logic coordinates.
Note that this method will not scroll outside of the
valid viewport; for example, if contentRect
is larger
than the viewport, scrolling will be confined to the viewport's
bounds.
contentRect | the |
programmatic | indicate if this is a programmatic change. |
function setHorizontalBlockIncrement(increment:Int): Void
Sets the block value for the Horizontal scrolling.
function setHorizontalUnitIncrement(increment:Int): Void
Sets the unit value for the Horizontal scrolling.
function setVerticalBlockIncrement(increment:Int): Void
Sets the block value for the Vertical scrolling.
function setVerticalUnitIncrement(increment:Int): Void
Sets the unit value for the Vertical scrolling.
function setViewPosition(p:IntPoint, ?programmatic:Bool): Void
Sets the view coordinates that appear in the upper left hand corner of the viewport. in view logic coordinates.
p | a |
programmatic | indicate if this is a programmatic change. |
function setViewportTestSize(s:IntDimension): Void
Before JScrollPane analyse the scroll properties(call getExtentSize and getViewSize), it will call this method to set the size of viewport will be to test.
s | the size to test |