Viewportable
new JViewport()
static public ON_STATE_CHANGED:String
public function updateUI():Void
Description copied from Component
Resets the UI property to a value from the current look and feel.
Component
subclasses must override this method
like this:
public void updateUI() { setUI((SliderUI)UIManager.getUI(this); }
public function setUI(newUI:ViewportUI):Void
Description copied from Component
Sets the look and feel delegate for this component.
Component
subclasses generally override this method
to narrow the argument type. For example, in JSlider
:
public void setUI(SliderUI newUI) { super.setUI(newUI); }
Additionally Component
subclasses must provide a
getUI
method that returns the correct type. For example:
public SliderUI getUI() { return (SliderUI)ui; }
public function getUIClassID():String
Description copied from Component
Returns the UIDefaults
key used to
look up the name of the org.aswing.plaf.ComponentUI
class that defines the look and feel
for this component. Most applications will never need to
call this method. Subclasses of Component
that support
pluggable look and feel should override this method to
return a UIDefaults
key that maps to the
ComponentUI
subclass that defines their look and feel.
public function setView(view:Component):Void
Sets the view component.
The view is the visible content of the JViewPort.
JViewport use to manage the scroll view of a component.
the component will be set size to its preferred size, then scroll in the viewport.
If the component's isTracksViewportWidth method is defined and return true, when the viewport's show size is larger than the component's, the component will be widen to the show size, otherwise, not widen. Same as isTracksViewportHeight method.
public function setVerticalUnitIncrement(increment:Number):Void
Sets the unit value for the Vertical scrolling.
public function setVerticalBlockIncrement(increment:Number):Void
Sets the block value for the Vertical scrolling.
public function setHorizontalUnitIncrement(increment:Number):Void
Sets the unit value for the Horizontal scrolling.
public function setHorizontalBlockIncrement(increment:Number):Void
Sets the block value for the Horizontal scrolling.
public function append(com:Component, constraints:Object):Void
public function insert(i:Number, com:Component, constraints:Object):Void
public function getVerticalUnitIncrement():Number
Returns the unit value for the Vertical scrolling.
public function getVerticalBlockIncrement():Number
Return the block value for the Vertical scrolling.
public function getHorizontalUnitIncrement():Number
Returns the unit value for the Horizontal scrolling.
public function getHorizontalBlockIncrement():Number
Return the block value for the Horizontal scrolling.
public function setViewportTestSize(s:Dimension):Void
Description copied from Viewportable
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.
public function getExtentSize():Dimension
Description copied from Viewportable
Returns the size of the visible part of the view in view logic coordinates.
public function getViewSize():Dimension
Usually the view's preffered size.
the view's size, (0, 0) if view is null.
public function getViewPosition():Point
Returns the view's position, if there is not any view, return null.
the view's position, null if view is null.
public function setViewPosition(p:Point):Void
Description copied from Viewportable
Sets the view coordinates that appear in the upper left hand corner of the viewport. in view logic coordinates.
public function scrollRectToVisible(contentRect:Rectangle):Void
Description copied from Viewportable
Scrolls the view so that Rectangle
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.
public 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
.
public 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
.
public 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
.
public 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
.
public function toViewCoordinatesSize(size:Dimension):Dimension
Converts a size in screen pixel coordinates to view ligic coordinates. Subclasses of viewport that support "logical coordinates" will override this method.
size | a Dimension object using screen pixel coordinates
|
a Dimension
object converted to view logic coordinates
public function toViewCoordinatesLocation(p:Point):Point
Converts a point in screen pixel coordinates to view coordinates. Subclasses of viewport that support "logical coordinates" will override this method.
p | a Point object using screen pixel coordinates
|
a Point
object converted to view coordinates
public function toScreenCoordinatesSize(size:Dimension):Dimension
Converts a size in view logic coordinates to screen pixel coordinates. Subclasses of viewport that support "logical coordinates" will override this method.
size | a Dimension object using view logic coordinates
|
a Dimension
object converted to screen pixel coordinates
public function toScreenCoordinatesLocation(p:Point):Point
Converts a point in view logic coordinates to screen pixel coordinates. Subclasses of viewport that support "logical coordinates" will override this method.
p | a Point object using view logic coordinates
|
a Point
object converted to screen pixel coordinates
public function addChangeListener(func:Function, obj:Object):Object
Description copied from Viewportable
Add a listener to listen the viewpoat state change event.
When the viewpoat's state changed, the state is all about:
public function getViewportPane():Component
Description copied from Viewportable
Return the component of the viewportable's pane which would added to displayed on the stage.