Packagecom.yworks.ui
Classpublic class GraphOverviewComponent
InheritanceGraphOverviewComponent Inheritance CanvasComponent Inheritance mx.core.UIComponent

Convenience component implementation that shows an overview of an IGraph contained in another GraphCanvasComponent

This control displays the graph in a preview mode and uses an OverviewInputMode to allow for easily navigating in the GraphCanvasComponent.

There are two different display modes available:

See also

GraphCanvasComponent
com.yworks.graph.drawing.OverviewGraphPaintable
com.yworks.canvas.input.OverviewInputMode


Public Properties
 PropertyDefined By
 InheritedautoDrag : Boolean
Gets or sets a property that causes the canvas to automatically pan the view when the mouse gets dragged within the autoDragInsets of the canvas.
CanvasComponent
 InheritedautoDragInsets : ImmutableRectangle
Gets or sets the auto drag insets.
CanvasComponent
 InheritedautoMouseWheelZoom : Boolean
Determines whether the mouse wheel should be used for zooming.
CanvasComponent
 InheritedbackgroundAlpha : Number
[write-only] Sets the alpha value of the canvas background color.
CanvasComponent
 InheritedbackgroundColor : uint
[write-only] Sets the background color of the canvas.
CanvasComponent
 InheritedbridgeManager : BridgeManager
CanvasComponent
 Inheritedcenter : Point
The world coordinate at the center of the canvas component.
CanvasComponent
 InheritedcontentRect : Rectangle
Gets and sets the Rectangle in world coordinates that holds the contents.
CanvasComponent
 Inheritedcontext : ICanvasContext
[read-only] Returns an implementation of ICanvasContext that describes the state of this canvas control.
CanvasComponent
 Inheritedcursor : Cursor
Get or set the cursor instance that will be displayed for this canvas.
CanvasComponent
 InheriteddoubleClickSize : ISize
The size of the area within which the user must click twice for the two clicks to be considered a double-click.
CanvasComponent
 InheriteddoubleClickTime : int
The time that may elapse between two consecutive mouse clicks so the last click is still considered a double click.
CanvasComponent
 InheriteddragSize : ISize
The area in view coordinates the mouse may stay in before a movement is considered a drag.
CanvasComponent
 InheriteddragTime : int
The value of the drag time.
CanvasComponent
 Inheritededitable : Boolean
Property that sets the editable state of this canvas.
CanvasComponent
 InheritedenableMouseChildren : int
Determines whether to propagate mouse events to the children in the display list.
CanvasComponent
  graph : IGraph
[write-only] The graph that is rendered in the overview.
GraphOverviewComponent
  graphCanvas : GraphCanvasComponent
The client control that will be used to retrieve the graph from and that will be used for navigating.
GraphOverviewComponent
  graphPaintable : IDisplayObjectCreator
[read-only] The IDisplayObjectCreator that is used to render the overview graph.
GraphOverviewComponent
 InheritedhasHorizontalScrollBar : Boolean
[read-only]
CanvasComponent
 InheritedhasVerticalScrollBar : Boolean
[read-only]
CanvasComponent
  highPerformanceModeEnabled : Boolean
Whether a high-performing OverviewGraphPaintable is used to preview the graph instead of the more flexible OverviewGraphDisplayObjectCreator.
GraphOverviewComponent
 InheritedhitTestRadius : Number
Specifies the radius of the area around the mouse in view coordinates in which an IHitTestable may lie to be considered a valid hit.
CanvasComponent
 InheritedhorizontalLineScrollSize : Number
The amount to scroll when an arrow button of the horizontal scrollbar is pressed, in pixels.
CanvasComponent
 InheritedhorizontalPageScrollSize : Number
Specifies the amount to scroll when the horizontal scroll bar track is pressed, in pixels.
CanvasComponent
 InheritedhorizontalScrollPolicy : String
Specifies the visibility policy for the horizontal scrollbar.
CanvasComponent
 InheritedhorizontalScrollPosition : Number
The current position of the horizontal scroll bar.
CanvasComponent
 InheritedinputMode : IInputMode
Specifies the single IInputMode instance that shall be installed for this canvas.
CanvasComponent
 InheritedinputModeContext : IInputModeContext
The InputModeContext property.
CanvasComponent
 InheritedinputModeContextLookupChain : LookupChain
[read-only] Retrieves the LookupChain that can be used to decorate the lookup call in the inputModeContext.
CanvasComponent
 InheritedinputModes : List
[read-only] Returns the internal list of currently installed IInputModes.
CanvasComponent
 InheritedlastCanvasMouseEvent : CanvasMouseEvent
[read-only] Gets the last CanvasMouseEvent that was dispatched by this instance.
CanvasComponent
 InheritedlimitedMinZoom : Number
[read-only] Returns the minimum zoom value for the current canvas size and viewport limits
CanvasComponent
 InheritedmaxHorizontalScrollPosition : Number
[read-only] If the canvas component currently has a horizontal scroll bar, returns the maxScrollPosition of the horizontal scroll bar.
CanvasComponent
 InheritedmaxVerticalScrollPosition : Number
[read-only] If the canvas component currently has a vertical scroll bar, returns the maxScrollPosition of the vertical scroll bar.
CanvasComponent
 InheritedmaxZoom : Number
The maxZoom property.
CanvasComponent
 InheritedminHorizontalScrollPosition : Number
[read-only] If the canvas component currently has a horizontal scroll bar, returns the minScrollPosition of the horizontal scroll bar.
CanvasComponent
 InheritedminVerticalScrollPosition : Number
[read-only] If the canvas component currently has a vertical scroll bar, returns the minScrollPosition of the vertical scroll bar.
CanvasComponent
 InheritedminZoom : Number
The minZoom property.
CanvasComponent
 InheritedmouseInterval : Number
Time interval in milliseconds after which a mouse move (MouseEvent.MOUSE_MOVE) is processed.
CanvasComponent
 InheritedmouseWheelZoomCenteredRecognizer : Function
The recognizer used to determine if the mouse event passed to the mouseWheelZoom method should trigger a zoom action that uses the center of the view port as fixed coordinate during zooming.
CanvasComponent
 InheritedmouseWheelZoomFactor : Number
The factor by which the zoom level changes when the mouse wheel is turned.
CanvasComponent
 InheritedmouseWheelZoomMouseLocationRecognizer : Function
The recognizer used to determine if the mouse event passed to the mouseWheelZoom method should trigger a zoom action that uses the current mouse location as fixed coordinate during zooming.
CanvasComponent
  overviewInputMode : OverviewInputMode
The OverviewInputMode that is used to navigate the client control.
GraphOverviewComponent
 InheritedtreeDirty : Boolean
Property that determines whether the whole canvasObjectTree is redrawn upon the next invocation of updateDisplayList().
CanvasComponent
 InheritedtreePartiallyDirty : Boolean
Property that determines whether the canvasObjectTree is redrawn partially upon the next invocation of updateDisplayList().
CanvasComponent
 InheritedverticalLineScrollSize : Number
The amount to scroll when an arrow button of the vertical scrollbar is pressed, in pixels.
CanvasComponent
 InheritedverticalPageScrollSize : Number
Specifies the amount to scroll when the vertical scroll bar track is pressed, in pixels.
CanvasComponent
 InheritedverticalScrollPolicy : String
Specifies the visibility policy for the vertical scrollbar.
CanvasComponent
 InheritedverticalScrollPosition : Number
The current position of the vertical scroll bar.
CanvasComponent
 InheritedviewPoint : Point
The current view point.
CanvasComponent
 InheritedviewPort : IRectangle
[read-only] Returns the currently visible viewing region in world coordinates.
CanvasComponent
 InheritedviewportLimiter : ViewportLimiter
Gets or sets the viewport limiter instance that can be used to limit the explorable region.
CanvasComponent
 Inheritedzoom : Number
The zoom factor for this canvas control.
CanvasComponent
 InheritedzoomIfCanvasHit : Boolean
Whether the mouse wheel triggers zooming whenever the mouse is over the canvas area (true) or whether the canvas needs focus to trigger zooming (false).
CanvasComponent
Protected Properties
 PropertyDefined By
 Inherited_viewPoint : Point
CanvasComponent
Public Methods
 MethodDefined By
  
Creates a new instance that is initially bound to the given control.
GraphOverviewComponent
 Inherited
addCanvasObject(userObject:Object, descriptor:ICanvasObjectDescriptor = null, group:ICanvasObjectGroup = null):ICanvasObject
Adds an element to the internal canvas object tree to the specified group.
CanvasComponent
 Inherited
Adds an IDisplayObjectCreator instance to the scene graph using CanvasObjectDescriptor.Instance as the ICanvasObjectDescriptor.
CanvasComponent
 Inherited
Adds a new ICanvasObjectGroup to the root of the canvas object tree.
CanvasComponent
 Inherited
Adds a new ICanvasObjectGroup to the specified group in the current canvas object tree.
CanvasComponent
 Inherited
Deprecated Since 1.7: Please Use addDisplayObjectCreator
Adds an IPaintable instance to the scene graph using CanvasObjectDescriptor.Instance as the ICanvasObjectDescriptor.
CanvasComponent
 Inherited
collectCanvasObjects(x:Number, y:Number, elementFoundCallback:Function):void
Collects all canvas object instances that are hit at the given coordinate set.
CanvasComponent
 Inherited
Creates a sprite containing a complete copy of the current canvas object tree.
CanvasComponent
 Inherited
decreaseZoom(factor:Number = 1.2):void
Descrease the current zoom level using the provided factor.
CanvasComponent
 Inherited
fitContent():void
Adjusts the view port to fully encompass the current content rectangle.
CanvasComponent
 Inherited
fitGraphBounds(margins:IRectangle = null):void
Updates the content rectangle and adjusts the viewport to encompass the contents.
CanvasComponent
 Inherited
Invalidates this canvas component and causes a repaint of all display objects that are visible in this canvas component.
CanvasComponent
 Inherited
getCanvasObject(worldX:Number, worldY:Number):ICanvasObject
Returns the top most canvas object instance that is hit at the given coordinate set.
CanvasComponent
 Inherited
getCanvasObjects(worldX:Number, worldY:Number):Iterable
Returns a list of all canvas objects in hit order at the given world coordinate location.
CanvasComponent
 Inherited
getCanvasRect():Rectangle
Returns a rectangle defined by the available space for displaying the CanvasObjectTree within this Component, in stage coordinates.
CanvasComponent
 Inherited
getHits(stageX:Number, stageY:Number, useShape:Boolean = true):Array
Returns an array of ICanvasObjects that are hit by the given coords.
CanvasComponent
 Inherited
increaseZoom(factor:Number = 1.2):void
Increase the current zoom level using the provided factor.
CanvasComponent
 Inherited
Forces a repaint of all canvas objects.
CanvasComponent
 Inherited
Forces a repaint of the dirty canvas objects.
CanvasComponent
 Inherited
[override] Marks a component so that its updateDisplayList() method gets called during a later screen update.
CanvasComponent
 Inherited
isCanvasHit(target:DisplayObject, stageX:Number, stageY:Number):Boolean
Checks whether the point at stageX,stageY is within the canvas bounds and target is a child of the canvas.
CanvasComponent
 Inherited
iterateHits(x:Number, y:Number, root:ICanvasObjectGroup = null, filter:Function = null):Iterator
Iterates all hit elements in the canvas below the given group that are accepted by a given filter.
CanvasComponent
 Inherited
lookup(type:Class):Object
CanvasComponent
 Inherited
print(bitmap:Boolean = true, borderSize:uint = 5, backgroundFill:* = 0xFFFFFF, printRect:Rectangle = null, canvasSprite:Sprite = null):void
Prints the current canvas object tree or a pre-calculated copy of it.
CanvasComponent
 Inherited
setLimitedCenter(center:Point):void
Sets the provided center unless this would cause the viewport to exceed the limits of the viewportLimiter.
CanvasComponent
 Inherited
setLimitedViewpoint(vp:Point):void
Sets the provided viewpoint unless this would cause the viewport to exceed the limits of the viewportLimiter.
CanvasComponent
 Inherited
Sets the provided viewport unless this would cause the viewport to exceed the limits of the viewportLimiter.
CanvasComponent
 Inherited
setLimitedZoom(newZoom:Number):void
Sets the provided zoom value unless this would cause the viewport to exceed the limits of the viewportLimiter.
CanvasComponent
 Inherited
Converts a point in world coordinates to view coordinates.
CanvasComponent
 Inherited
Converts a point in view coordinates to world coordinates.
CanvasComponent
 Inherited
updateContentRect(margins:IRectangle = null):void
Updates the contentRect to encompass the bounds by all elements in the current scene graph upon the next invocation of updateDisplayList.
CanvasComponent
 Inherited
zoomTo(px:Number, py:Number, theZoom:Number):void
Sets the zoom level and view port center to the given values.
CanvasComponent
 Inherited
zoomToRect(rect:Rectangle, maxZoom:Number):void
Adjusts the view port to fit in the given rectangle.
CanvasComponent
Protected Methods
 MethodDefined By
 Inherited
Adjusts the mouse cursor based on the given mouse event and the cursor property.
CanvasComponent
 Inherited
[override]
CanvasComponent
  
Factory method that creates the display object creator that renders the preview of the graph if highPerformanceModeEnabled is false.
GraphOverviewComponent
  
Factory method that creates the paintable that renders the preview of the graph if highPerformanceModeEnabled is true.
GraphOverviewComponent
 Inherited
Factory method for the InputModeContext property.
CanvasComponent
 Inherited
disposeListeners(eventDispatcher:IEventDispatcher):void
Unregister all event listeners that were registered with the stage.
CanvasComponent
 Inherited
doEvent(e:Event = null):void
Delayed processing of a MouseEvent.MOUSE_MOVE.
CanvasComponent
 Inherited
When fitContent() is called, this method is invoked in the next updateDisplayList() execution to actually fit the content rectangle into the viewport.
CanvasComponent
 Inherited
initListeners(eventDispatcher:IEventDispatcher):void
Initialize all event listeners that should be registered with the stage.
CanvasComponent
 Inherited
inputModeContextLookup(type:Class):Object
Callback that is used by the default implementation of inputModeContext to resolve lookup calls.
CanvasComponent
 Inherited
measure():void
[override] Calculates the default size and the default minimum size of the component.
CanvasComponent
 Inherited
If the autoMouseWheelZoom property is set to true, this method will adjust the current zoom level.
CanvasComponent
 Inherited
onAdd(event:FlexEvent):void
Called when the component is added to the display list.
CanvasComponent
 Inherited
onAutoDragChanged(oldValue:Boolean, newValue:Boolean):void
Called when the autoDrag property changes.
CanvasComponent
 Inherited
Called when the autoDragInsets property changes.
CanvasComponent
 Inherited
Callback method that is called when the mouse has been clicked.
CanvasComponent
 Inherited
Callback method that is called when a mouse button has been pressed.
CanvasComponent
 Inherited
Callback method that is called when the mouse gets dragged.
CanvasComponent
 Inherited
Callback method that is called when the mouse has been moved and the mouse button has not been pressed.
CanvasComponent
 Inherited
Callback method that is called when a mouse button has been released.
CanvasComponent
 Inherited
Callback method that is called when the mouse wheel has been turned.
CanvasComponent
 Inherited
Callback that is invoked when the ContentRect property changes.
CanvasComponent
 Inherited
Callback that is called when the editable property changes.
CanvasComponent
 Inherited
onHitTestRadiusChanged(oldValue:Number, newValue:Number):void
Callback that is invoked when the hitTestRadius property changed.
CanvasComponent
 Inherited
onInputModeChanged(oldValue:IInputMode, newValue:IInputMode):void
Callback that is invoked when the inputMode property changes.
CanvasComponent
 Inherited
onInputModeContextChanged(oldInputModeContext:IInputModeContext, newInputModeContext:IInputModeContext):void
Called when the inputModeContext property value changes and after initialization of the field.
CanvasComponent
 Inherited
onMouseDown(evt:MouseEvent):void
Tries to gain the focus, if the canvas area was hit.
CanvasComponent
 Inherited
onMouseEvent(evt:MouseEvent):void
Deprecated: Use the various onCanvasMouseXXX hooks or event listeners for CanvasMouseEvents instead.
Called when this component receives a MouseEvent.
CanvasComponent
 Inherited
onMouseMove(evt:MouseEvent):void
Calls onCanvasMouseDragged or onCanvasMouseMoved with the corresponding CanvasMouseEvent.
CanvasComponent
 Inherited
onMouseUp(evt:MouseEvent):void
Calls onCanvasMouseUp and possibly onCanvasMouseClicked with the corresponding CanvasMouseEvent.
CanvasComponent
 Inherited
onMouseWheel(evt:MouseEvent):void
Calls onCanvasMouseWheel with the corresponding CanvasMouseEvent.
CanvasComponent
 Inherited
onRemove(event:FlexEvent):void
Called when the component is removed from the display list.
CanvasComponent
 Inherited
Callback that is invoked when the view port property changes.
CanvasComponent
 Inherited
processEvent(event:Event):void
Processes a mouse event.
CanvasComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
CanvasComponent
 Inherited
updateTree(partially:Boolean = false):void
Repaints the display list
CanvasComponent
 Inherited
update the viewport bounds upon the next invocation of updateDisplayList.
CanvasComponent
Events
 Event Summary Defined By
 InheritedDispatched when the autoDrag property changes.CanvasComponent
 InheritedDispatched when the autoDragInsets property changes.CanvasComponent
 InheritedDispatched when the mouse is clicked.CanvasComponent
 InheritedDispatched when the mouse is double clicked.CanvasComponent
 InheritedDispatched when the mouse is pressed.CanvasComponent
 InheritedDispatched when the mouse is dragged.CanvasComponent
 InheritedDispatched when the mouse is moved.CanvasComponent
 InheritedDispatched when the mouse is released.CanvasComponent
 InheritedDispatched when the mousewheel moves.CanvasComponent
 InheritedDispatched when the contentRect property changes.CanvasComponent
 InheritedDispatched when the editable property changes.CanvasComponent
 InheritedDispatched when the inputMode property changes.CanvasComponent
 InheritedDispatched when the inputModeContext property changes.CanvasComponent
 InheritedDispatched when the canvas has been invalidated.CanvasComponent
 InheritedDispatched when one of the scrollbars changes its scroll position.CanvasComponent
 InheritedDispatched when the canvas object tree is repainted.CanvasComponent
 InheritedDispatched when the viewPoint property changes.CanvasComponent
 InheritedDispatched when the viewPort property changes.CanvasComponent
 InheritedDispatched when the zoom property changes.CanvasComponent
Public Constants
 ConstantDefined By
 InheritedAUTO_DRAG_CHANGED : String = autoDragChanged
[static] Dispatched when the autoDrag property changes.
CanvasComponent
 InheritedAUTO_DRAG_INSETS_CHANGED : String = autoDragInsetsChanged
[static] Dispatched when the autoDragInsets property changes.
CanvasComponent
 InheritedCONTENT_RECT_CHANGED : String = contentRectChanged
[static] Dispatched when the contentRect property changes.
CanvasComponent
 InheritedEDITABLE_CHANGED : String = editableChanged
[static] Dispatched when the editable property changes.
CanvasComponent
 InheritedINPUT_MODE_CHANGED : String = inputModeChanged
[static] Dispatched when the inputMode property changes.
CanvasComponent
 InheritedINPUT_MODE_CONTEXT_CHANGED : String = inputModeContextChanged
[static] Dispatched when the inputModeContext property changes.
CanvasComponent
 InheritedINVALIDATED : String = invalidated
[static] Dispatched when the canvas has been invalidated.
CanvasComponent
 InheritedMOUSE_CHILDREN_ALWAYS : int = 1
[static] Mouse events will always be propagated to child DisplayObjects.
CanvasComponent
 InheritedMOUSE_CHILDREN_AUTO : int = -1
[static] Mouse events will only be propagated to child DisplayObjects if they may need interactivity.
CanvasComponent
 InheritedMOUSE_CHILDREN_NEVER : int = 0
[static] Mouse events will never be propagated to child DisplayObjects.
CanvasComponent
 InheritedVIEWPORT_CHANGED : String = viewPortChanged
[static] Kept for backward compatibility.
CanvasComponent
Property Detail
graphproperty
graph:IGraph  [write-only]

The graph that is rendered in the overview.


Implementation
    public function set graph(value:IGraph):void
graphCanvasproperty 
graphCanvas:GraphCanvasComponent

The client control that will be used to retrieve the graph from and that will be used for navigating.


Implementation
    public function get graphCanvas():GraphCanvasComponent
    public function set graphCanvas(value:GraphCanvasComponent):void
graphPaintableproperty 
graphPaintable:IDisplayObjectCreator  [read-only]

The IDisplayObjectCreator that is used to render the overview graph.


Implementation
    public function get graphPaintable():IDisplayObjectCreator
highPerformanceModeEnabledproperty 
highPerformanceModeEnabled:Boolean

Whether a high-performing OverviewGraphPaintable is used to preview the graph instead of the more flexible OverviewGraphDisplayObjectCreator.

The default value is true.


Implementation
    public function get highPerformanceModeEnabled():Boolean
    public function set highPerformanceModeEnabled(value:Boolean):void

See also

overviewInputModeproperty 
overviewInputMode:OverviewInputMode

The OverviewInputMode that is used to navigate the client control.


Implementation
    public function get overviewInputMode():OverviewInputMode
    public function set overviewInputMode(value:OverviewInputMode):void
Constructor Detail
GraphOverviewComponent()Constructor
public function GraphOverviewComponent(canvas:GraphCanvasComponent = null)

Creates a new instance that is initially bound to the given control.

If the canvas parameter is null, either the graphCanvas or graph property has to be set to be useful.

Parameters
canvas:GraphCanvasComponent (default = null) — The GraphCanvasComponent to create an overview for.
Method Detail
createGraphDisplayObjectCreator()method
protected function createGraphDisplayObjectCreator(graph:IGraph):IDisplayObjectCreator

Factory method that creates the display object creator that renders the preview of the graph if highPerformanceModeEnabled is false.

Parameters

graph:IGraph — The graph to draw.

Returns
IDisplayObjectCreator — A overview display object creator.
createGraphPaintable()method 
protected function createGraphPaintable(graph:IGraph):OverviewGraphPaintable

Factory method that creates the paintable that renders the preview of the graph if highPerformanceModeEnabled is true.

Parameters

graph:IGraph — The graph to draw.

Returns
OverviewGraphPaintable — A overview paintable.