| Package | org.aswing |
| Interface | public interface Viewportable |
| Implementors | JList, JTable, JTextArea, JTree, JViewport |
JScrollPane,
JScrollBar to view its viewed content in a visible area.
See also
| Method | Defined by | ||
|---|---|---|---|
|
addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a listener to listen the viewpoat state change event.
| Viewportable | ||
|
Returns the size of the visible part of the view in view logic coordinates.
| Viewportable | ||
|
Return the block value for the Horizontal scrolling.
| Viewportable | ||
|
Returns the unit value for the Horizontal scrolling.
| Viewportable | ||
|
Return the block value for the Vertical scrolling.
| Viewportable | ||
|
getVerticalUnitIncrement():int
Returns the unit value for the Vertical scrolling.
| Viewportable | ||
|
Return the component of the viewportable's pane which would added to displayed on the stage.
| Viewportable | ||
|
Returns the view coordinates that appear in the upper left
hand corner of the viewport, or 0,0 if there's no view.
| Viewportable | ||
|
Returns the viewportable view's amount size if view all content in view logic coordinates.
| Viewportable | ||
|
removeStateListener(listener:Function):void
Removes a state listener.
| Viewportable | ||
|
scrollRectToVisible(contentRect:IntRectangle, programmatic:Boolean = true):void
Scrolls the view so that
IntRectangle
within the view becomes visible. | Viewportable | ||
|
setHorizontalBlockIncrement(increment:int):void
Sets the block value for the Horizontal scrolling.
| Viewportable | ||
|
setHorizontalUnitIncrement(increment:int):void
Sets the unit value for the Horizontal scrolling.
| Viewportable | ||
|
setVerticalBlockIncrement(increment:int):void
Sets the block value for the Vertical scrolling.
| Viewportable | ||
|
setVerticalUnitIncrement(increment:int):void
Sets the unit value for the Vertical scrolling.
| Viewportable | ||
|
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.
| Viewportable | ||
|
setViewPosition(p:IntPoint, programmatic:Boolean = true):void
Sets the view coordinates that appear in the upper left
hand corner of the viewport.
| Viewportable | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the viewport's state changed. | Viewportable | |||
| addStateListener | () | method |
public function addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):voidAdd a listener to listen the viewpoat state change event.
When the viewpoat's state changed, the state is all about:
listener:Function — the listener
|
|
priority:int (default = 0) — the priority
|
|
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.
|
See also
| getExtentSize | () | method |
public function getExtentSize():IntDimensionReturns the size of the visible part of the view in view logic coordinates.
ReturnsIntDimension —
a IntDimension object giving the size of the view
|
| getHorizontalBlockIncrement | () | method |
public function getHorizontalBlockIncrement():intReturn the block value for the Horizontal scrolling.
Returnsint |
| getHorizontalUnitIncrement | () | method |
public function getHorizontalUnitIncrement():intReturns the unit value for the Horizontal scrolling.
Returnsint |
| getVerticalBlockIncrement | () | method |
public function getVerticalBlockIncrement():intReturn the block value for the Vertical scrolling.
Returnsint |
| getVerticalUnitIncrement | () | method |
public function getVerticalUnitIncrement():intReturns the unit value for the Vertical scrolling.
Returnsint |
| getViewportPane | () | method |
public function getViewportPane():ComponentReturn the component of the viewportable's pane which would added to displayed on the stage.
ReturnsComponent —
the component of the viewportable pane.
|
| getViewPosition | () | method |
public function getViewPosition():IntPointReturns 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.
ReturnsIntPoint —
a IntPoint object giving the upper left coordinates
|
| getViewSize | () | method |
public function getViewSize():IntDimensionReturns the viewportable view's amount size if view all content in view logic coordinates. Usually the view's preffered size.
ReturnsIntDimension —
the view's size.
|
| removeStateListener | () | method |
public function removeStateListener(listener:Function):voidRemoves a state listener.
Parameterslistener:Function — the listener to be removed.
|
See also
| scrollRectToVisible | () | method |
public function scrollRectToVisible(contentRect:IntRectangle, programmatic:Boolean = true):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.
Parameters
contentRect:IntRectangle — the IntRectangle to display
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
| setHorizontalBlockIncrement | () | method |
public function setHorizontalBlockIncrement(increment:int):voidSets the block value for the Horizontal scrolling.
Parametersincrement:int |
| setHorizontalUnitIncrement | () | method |
public function setHorizontalUnitIncrement(increment:int):voidSets the unit value for the Horizontal scrolling.
Parametersincrement:int |
| setVerticalBlockIncrement | () | method |
public function setVerticalBlockIncrement(increment:int):voidSets the block value for the Vertical scrolling.
Parametersincrement:int |
| setVerticalUnitIncrement | () | method |
public function setVerticalUnitIncrement(increment:int):voidSets the unit value for the Vertical scrolling.
Parametersincrement:int |
| setViewportTestSize | () | method |
public function setViewportTestSize(s:IntDimension):voidBefore JScrollPane analyse the scroll properties(call getExtentSize and getViewSize), it will call this method to set the size of viewport will be to test.
Parameterss:IntDimension — the size to test
|
| setViewPosition | () | method |
public function setViewPosition(p:IntPoint, programmatic:Boolean = true):voidSets the view coordinates that appear in the upper left hand corner of the viewport. in view logic coordinates.
Parametersp:IntPoint — a IntPoint object giving the upper left coordinates
|
|
programmatic:Boolean (default = true) — indicate if this is a programmatic change.
|
| stateChanged | event |
org.aswing.event.InteractiveEvent
org.aswing.event.InteractiveEvent.STATE_CHANGED
Dispatched when the viewport's state changed. the state is all about:
The InteractiveEvent.STATE_CHANGED constant defines the value of the
type property of the event object for a stateChanged event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
isProgrammatic() | True means this event is fired by the programmatic reason, false means user mouse/keyboard interaction reason. |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
comp.addEventListener() to register an event listener,
comp is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |