Viewportable
new JViewport()static public ON_STATE_CHANGED:Stringpublic function updateUI():VoidDescription 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):VoidDescription 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():StringDescription 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):VoidSets the unit value for the Vertical scrolling.
public function setVerticalBlockIncrement(increment:Number):VoidSets the block value for the Vertical scrolling.
public function setHorizontalUnitIncrement(increment:Number):VoidSets the unit value for the Horizontal scrolling.
public function setHorizontalBlockIncrement(increment:Number):VoidSets the block value for the Horizontal scrolling.
public function append(com:Component, constraints:Object):Voidpublic function insert(i:Number, com:Component, constraints:Object):Voidpublic function getVerticalUnitIncrement():NumberReturns the unit value for the Vertical scrolling.
public function getVerticalBlockIncrement():NumberReturn the block value for the Vertical scrolling.
public function getHorizontalUnitIncrement():NumberReturns the unit value for the Horizontal scrolling.
public function getHorizontalBlockIncrement():NumberReturn the block value for the Horizontal scrolling.
public function setViewportTestSize(s:Dimension):VoidDescription 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():DimensionDescription copied from Viewportable
Returns the size of the visible part of the view in view logic coordinates.
public function getViewSize():DimensionUsually the view's preffered size.
the view's size, (0, 0) if view is null.
public function getViewPosition():PointReturns 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):VoidDescription 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):VoidDescription 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):DimensionConverts 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):PointConverts 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):DimensionConverts 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):PointConverts 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):ObjectDescription 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():ComponentDescription copied from Viewportable
Return the component of the viewportable's pane which would added to displayed on the stage.