Packagecom.yworks.ui
Classpublic class GraphCanvasComponent
InheritanceGraphCanvasComponent Inheritance CanvasComponent Inheritance mx.core.UIComponent
ImplementsINodeBoundsChangedListener

An UIComponent that displays and animates IGraphs.



Public Properties
 PropertyDefined by
  animate : Boolean
This property defines whether invoking morphGraph will trigger an animated transition of the current graph to a different layout or if the layout will just change instantly.
GraphCanvasComponent
 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
Sets the alpha value of the canvas background color.
CanvasComponent
 InheritedbackgroundColor : uint
Sets the background color of the canvas.
CanvasComponent
  backgroundGroup : ICanvasObjectGroup
Gets or sets the BackgroundGroup property.
GraphCanvasComponent
 Inheritedcenter : Point
The world coordinate at the center of the canvas component.
CanvasComponent
  clipboard : GraphClipboard
The GraphClipboard associated with this control.
GraphCanvasComponent
  contentGroup : ICanvasObjectGroup
Gets or sets the contentGroup property.
GraphCanvasComponent
 InheritedcontentRect : Rectangle
Gets and sets the Rectangle in world coordinates that holds the contents.
CanvasComponent
 Inheritedcontext : ICanvasContext
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
  graph : IGraph
The graph property.
GraphCanvasComponent
  highlightGroup : ICanvasObjectGroup
Gets or sets the highlightGroup property.
GraphCanvasComponent
  highlightPaintManager : HighlightPaintManager
Gets or sets the HighlightPaintManager property.
GraphCanvasComponent
 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
Retrieves the LookupChain that can be used to decorate the lookup call in the inputModeContext.
CanvasComponent
  inputModeGroup : ICanvasObjectGroup
Gets or sets the InputModeGroup property.
GraphCanvasComponent
 InheritedinputModes : List
Returns the internal list of currently installed IInputModes.
CanvasComponent
 InheritedlastCanvasMouseEvent : CanvasMouseEvent
Gets the last CanvasMouseEvent that was dispatched by this instance.
CanvasComponent
 InheritedmaxZoom : Number
The maxZoom property.
CanvasComponent
 InheritedminZoom : Number
The minZoom property.
CanvasComponent
 InheritedmouseWheelZoomFactor : Number
The factor by which the zoom level changes when the mouse wheel is turned.
CanvasComponent
  selection : IGraphSelection
Gets or sets the selection model that is used for this control.
GraphCanvasComponent
  selectionGroup : ICanvasObjectGroup
Gets or sets the SelectionGroup property.
GraphCanvasComponent
  selectionPaintManager : SelectionPaintManager
Gets or sets the SelectionPaintManager property.
GraphCanvasComponent
 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
Returns the currently visible viewing region in world coordinates.
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
  
Constructor.
GraphCanvasComponent
  
addCanvasObject(userObject:Object, descriptor:ICanvasObjectDescriptor = null, group:ICanvasObjectGroup = null):ICanvasObject
Adds an element to the internal canvas object tree to the specified group.
GraphCanvasComponent
 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
Adds an IPaintable instance to the scene graph using CanvasObjectDescriptor.Instance as the ICanvasObjectDescriptor.
CanvasComponent
  
canRedo():Boolean
Determines whether a call to redo() will succeed.
GraphCanvasComponent
  
canUndo():Boolean
Determines whether a call to undo() will succeed.
GraphCanvasComponent
 Inherited
collectCanvasObjects(x:Number, y:Number, elementFoundCallback:Function):void
Collects all canvas object instances that are hit at the given coordinate set.
CanvasComponent
  
copy():void
Copies the selected items into the clipboard.
GraphCanvasComponent
  
Factory method for the graph property.
GraphCanvasComponent
 Inherited
createSprite():Sprite
Creates a sprite containing a complete copy of the current canvas object tree.
CanvasComponent
  
cut():void
Cuts the selected items into the clipboard.
GraphCanvasComponent
 Inherited
fitContent():void
Adjusts the view port to fully encompass the current content rectangle.
CanvasComponent
 Inherited
Updates the content rectangle and adjusts the viewport to encompass the contents.
CanvasComponent
 Inherited
forceRepaint():void
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
  
Returns a canvas group provider instance that yields the highlightGroup.
GraphCanvasComponent
 Inherited
getHits(stageX:Number, stageY:Number, useShape:Boolean = true):Array
Returns an array of ICanvasObjects that are hit by the given coords.
CanvasComponent
  
Returns a canvas group provider instance that yields a SelectionGroup.
GraphCanvasComponent
  
Retrieves the UndoEngine associated with the current graph instance.
GraphCanvasComponent
 Inherited
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
  
loadGraphFromURL(URL:String, ioHandler:IOHandler = null, theGraph:IGraph = null):void
Load a GraphML file from an URL, parse the GraphML file and display the graph.
GraphCanvasComponent
  
loadGraphFromXML(xml:XML, ioHandler:GraphMLIOHandler = null, theGraph:IGraph = null):void
Parse and display a graph from a GraphML file.
GraphCanvasComponent
 Inherited
lookup(type:Class):Object
CanvasComponent
  
morphGraph(newGraph:IGraph, copyMask:uint):void
Morphs the graph from the current state to a different state.
GraphCanvasComponent
  
nodeBoundsChanged(node:INode, oldBounds:IRectangle):void
GraphCanvasComponent
  
paste():void
Pastes the clipboard's contents into the actual graph.
GraphCanvasComponent
 Inherited
print(bitmap:Boolean = true, borderSize:uint = 5, backgroundFill:* = 0xFFFFFF):void
Prints the current canvas object tree.
CanvasComponent
  
redo():void
Redoes the last operation.
GraphCanvasComponent
 Inherited
Converts a point in world coordinates to view coordinates.
CanvasComponent
 Inherited
Converts a point in view coordinates to world coordinates.
CanvasComponent
  
undo():void
Undoes the last operation.
GraphCanvasComponent
 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
  
writeGraph(ioHandler:GraphMLIOHandler = null):XML
Convenience method that exports the graph to XML using the GraphML format.
GraphCanvasComponent
 Inherited
zoomTo(px:Number, py:Number, theZoom:Number):void
Sets the zoom level and view port center to the given values.
CanvasComponent
Protected Methods
 MethodDefined by
 Inherited
Adjusts the mouse cursor based on the given mouse event and the cursor property.
CanvasComponent
  
copyRegisteredData(updateGraph:IGraph, copyMask:uint):void
Copies data stored in registered IMappers from updateGraph's mapperRegistry to the mapper registry of the current graph instance.
GraphCanvasComponent
  
Factory method for the BackgroundGroup property.
GraphCanvasComponent
  
Factory method for the canvasObjectDependencyManager property.
GraphCanvasComponent
  
GraphCanvasComponent
  
Factory method for the contentGroup property.
GraphCanvasComponent
  
Creates the default instance to use if no custom instance has been set.
GraphCanvasComponent
  
Factory method for the GraphModelManager property.
GraphCanvasComponent
  
Factory method for the highlightGroup property.
GraphCanvasComponent
  
Factory method for the highlightPaintManager property.
GraphCanvasComponent
 Inherited
Factory method for the InputModeContext property.
CanvasComponent
  
Factory method for the inputModeGroup property.
GraphCanvasComponent
  
Creates an IOHandler that is used when a graph is loaded from an URL or from a XML instance.
GraphCanvasComponent
  
Factory method which will create the selection model that is used for this control.
GraphCanvasComponent
  
Factory method for the SelectionGroup property.
GraphCanvasComponent
  
Factory method for the selectionPaintManager property.
GraphCanvasComponent
 Inherited
disposeListeners(eventDispatcher:IEventDispatcher):void
Unregister all event listeners that were registered with the stage.
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
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
  
Called when an animation triggered by morphGraph ends.
GraphCanvasComponent
 Inherited
onAutoDragChanged(oldValue:Boolean, newValue:Boolean):void
Called when the autoDrag property changes.
CanvasComponent
 Inherited
Called when the autoDragInsets property changes.
CanvasComponent
  
onBackgroundGroupChanged(oldBackgroundGroup:ICanvasObjectGroup, newBackgroundGroup:ICanvasObjectGroup):void
Called when the backgroundGroup property value changes and after initialization of the field.
GraphCanvasComponent
 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
  
Called when the canvasObjectDependencyManager property value changes.
GraphCanvasComponent
  
onContentGroupChanged(oldContentGroup:ICanvasObjectGroup, newContentGroup:ICanvasObjectGroup):void
Called when the contentGroup property value changes and after initialization of the field.
GraphCanvasComponent
 Inherited
Callback that is invoked when the ContentRect property changes.
CanvasComponent
 Inherited
Callback that is called when the editable property changes.
CanvasComponent
  
onGraphChanged(oldGraph:IGraph, newGraph:IGraph):void
Called when the graph property value changes and after initialization of the field.
GraphCanvasComponent
  
Called when the graph has to be repainted
GraphCanvasComponent
  
onGraphModelManagerChanged(oldGraphModelManager:GraphModelManager, newGraphModelManager:GraphModelManager):void
Called when the graphModelManager property value changes.
GraphCanvasComponent
  
onHighlightGroupChanged(oldHighlightGroup:ICanvasObjectGroup, newHighlightGroup:ICanvasObjectGroup):void
Called when the highlightGroup property value changes and after initialization of the field.
GraphCanvasComponent
  
onHighlightPaintManagerChanged(oldHighlightPaintManager:HighlightPaintManager, newHighlightPaintManager:HighlightPaintManager):void
Called when the highlightPaintManager property value changes and after initialization of the field.
GraphCanvasComponent
 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
  
onInputModeGroupChanged(oldInputModeGroup:ICanvasObjectGroup, newInputModeGroup:ICanvasObjectGroup):void
Called when the inputModeGroup property value changes and after initialization of the field.
GraphCanvasComponent
 Inherited
onMouseDown(evt:MouseEvent):void
Tries to gain the focus, if the canvas area was hit.
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
  
onSelectionChanged(oldGraphSelection:IGraphSelection, newGraphSelection:IGraphSelection):void
Called when the selection property value changes and after initialization of the field.
GraphCanvasComponent
  
onSelectionGroupChanged(oldSelectionGroup:ICanvasObjectGroup, newSelectionGroup:ICanvasObjectGroup):void
Called when the selectionGroup property value changes and after initialization of the field.
Triggers the selectionGroupChanged event.
GraphCanvasComponent
  
onSelectionPaintManagerChanged(oldSelectionPaintManager:SelectionPaintManager, newSelectionPaintManager:SelectionPaintManager):void
Called when the selectionPaintManager property value changes and after initialization of the field.
GraphCanvasComponent
 Inherited
Callback that is invoked when the view port property changes.
CanvasComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
CanvasComponent
  
updateTree(partially:Boolean = false):void
Repaints the display list
GraphCanvasComponent
 Inherited
update the viewport bounds upon the next invocation of updateDisplayList.
CanvasComponent
Events
 EventSummaryDefined by
 Inherited Dispatched when the autoDrag property changes.CanvasComponent
 Inherited Dispatched when the autoDragInsets property changes.CanvasComponent
   Dispatched when the backgroundModeGroup property changed.GraphCanvasComponent
 Inherited Dispatched when the mouse is clicked.CanvasComponent
 Inherited Dispatched when the mouse is double clicked.CanvasComponent
 Inherited Dispatched when the mouse is pressed.CanvasComponent
 Inherited Dispatched when the mouse is dragged.CanvasComponent
 Inherited Dispatched when the mouse is moved.CanvasComponent
 Inherited Dispatched when the mouse is released.CanvasComponent
 Inherited Dispatched when the mousewheel moves.CanvasComponent
   Dispatched when the contentGroup property changed.GraphCanvasComponent
 Inherited Dispatched when the contentRect property changes.CanvasComponent
 Inherited Dispatched when the editable property changes.CanvasComponent
   Dispatched when the graph property changed.GraphCanvasComponent
   Dispatched when the graphModelManager property changed.GraphCanvasComponent
   Dispatched when the highlightGroup property changed.GraphCanvasComponent
   Dispatched when the highlightPaintManager property changed.GraphCanvasComponent
 Inherited Dispatched when the inputMode property changes.CanvasComponent
 Inherited Dispatched when the inputModeContext property changes.CanvasComponent
   Dispatched when the inputModeGroup property changed.GraphCanvasComponent
 Inherited Dispatched when the canvas has been invalidated.CanvasComponent
   Dispatched when an io error occurs while loading a graph from an URL.GraphCanvasComponent
   Dispatched just before a context menu is to be created for a graph item.GraphCanvasComponent
   Dispatched after the graph morphs to a different layout.GraphCanvasComponent
   Dispatched before the graph morphs to a different layout.GraphCanvasComponent
 Inherited Dispatched when one of the scrollbars changes its scroll position.CanvasComponent
   Dispatched when a security error occurs while loading a graph from an URL.GraphCanvasComponent
   Dispatched when the selection property changed.GraphCanvasComponent
   Dispatched when the selectionGroup property changed.GraphCanvasComponent
   Dispatched when the selectionPaintManager property changed.GraphCanvasComponent
 Inherited Dispatched when the viewPoint property changes.CanvasComponent
 Inherited Dispatched when the viewPort property changes.CanvasComponent
 Inherited Dispatched when the zoom property changes.CanvasComponent
Public Constants
 ConstantDefined by
 InheritedAUTO_DRAG_CHANGED : String = "autoDragChanged"
[static]
CanvasComponent
 InheritedAUTO_DRAG_INSETS_CHANGED : String = "autoDragInsetsChanged"
[static]
CanvasComponent
  BACKGROUND_GROUP_CHANGED : String = "backgroundGroupChanged"
[static]
GraphCanvasComponent
  CONTENT_GROUP_CHANGED : String = "contentGroupChanged"
[static]
GraphCanvasComponent
 InheritedCONTENT_RECT_CHANGED : String = "contentRectChanged"
[static]
CanvasComponent
 InheritedEDITABLE_CHANGED : String = "editableChanged"
[static]
CanvasComponent
  GRAPH_CHANGED : String = "graphChanged"
[static]
GraphCanvasComponent
  GRAPH_MODEL_MANAGER_CHANGED : String = "graphModelManagerChanged"
[static]
GraphCanvasComponent
  HIGHLIGHT_GROUP_CHANGED : String = "highlightGroupChanged"
[static]
GraphCanvasComponent
  HIGHLIGHT_PAINT_MANAGER_CHANGED : String = "highlightPaintManagerChanged"
[static]
GraphCanvasComponent
 InheritedINPUT_MODE_CHANGED : String = "inputModeChanged"
[static]
CanvasComponent
 InheritedINPUT_MODE_CONTEXT_CHANGED : String = "inputModeContextChanged"
[static]
CanvasComponent
  INPUT_MODE_GROUP_CHANGED : String = "inputModeGroupChanged"
[static]
GraphCanvasComponent
 InheritedINVALIDATED : String = "invalidated"
[static]
CanvasComponent
  OPTION_COPY_ALL : uint = 255
[static] Option constant for the morphGraph function that will cause the morphing function to copy everything that can be copied.
GraphCanvasComponent
  OPTION_COPY_EDGE_DATA : uint = 2
[static] Option constant for the morphGraph function that will cause the morphing function to copy all data associated with edges using the mapper registry.
GraphCanvasComponent
  OPTION_COPY_EDGE_STYLE : uint = 8
[static] Option constant for the morphGraph function that will cause the morphing function to copy all styles associated with edges.
GraphCanvasComponent
  OPTION_COPY_GRAPH_DATA : uint = 64
[static] Option constant for the morphGraph function that will cause the morphing function to copy all data associated with the graph instance using the mapper registry.
GraphCanvasComponent
  OPTION_COPY_LABEL_STYLE : uint = 32
[static] Option constant for the morphGraph function that will cause the morphing function to copy all styles associated with labels.
GraphCanvasComponent
  OPTION_COPY_NODE_AND_EDGE_DATA : uint = 3
[static] Option constant for the morphGraph function that will cause the morphing function to copy all data associated with both nodes and edges using the mapper registry.
GraphCanvasComponent
  OPTION_COPY_NODE_DATA : uint = 1
[static] Option constant for the morphGraph function that will cause the morphing function to copy all data associated with nodes using the mapper registry.
GraphCanvasComponent
  OPTION_COPY_NODE_STYLE : uint = 4
[static] Option constant for the morphGraph function that will cause the morphing function to copy all styles associated with nodes.
GraphCanvasComponent
  OPTION_COPY_NONE : uint = 0
[static] Option constant for the morphGraph function that will prevent the morphing function from copying any data associated with graph items by the mapper registry.
GraphCanvasComponent
  OPTION_COPY_PORT_STYLE : uint = 16
[static] Option constant for the morphGraph function that will cause the morphing function to copy all styles associated with ports.
GraphCanvasComponent
  SELECTION_CHANGED : String = "selectionChanged"
[static]
GraphCanvasComponent
  SELECTION_GROUP_CHANGED : String = "selectionGroupChanged"