Packagecom.yworks.graph.input
Classpublic class GraphEditorInputMode
InheritanceGraphEditorInputMode Inheritance MainInputMode Inheritance MultiplexingInputMode Inheritance AbstractInputMode Inheritance flash.events.EventDispatcher

A complex IInputMode that can be used in a GraphCanvasComponent to edit an IGraph instance.

This class delegates most of the work to minor IInputMode implementations.



Public Properties
 PropertyDefined by
  autoAdjustContentRect : Boolean
Gets or sets a property that determines whether this instance should automatically adjust the canvas' contentRect if the graph changes.
GraphEditorInputMode
  autoRemoveEmptyLabels : Boolean
Gets or sets a value indicating whether this mode should automatically remove labels from the graph when a label text has been edited and the label text is empty.
GraphEditorInputMode
 Inheritedcanvas : CanvasComponent
The canvas instance this mode is currently installed in or null
AbstractInputMode
 InheritedclickInputMode : ClickInputMode
The ClickInputMode property.
MainInputMode
 InheritedclickModePriority : int
The click mode priority.
MainInputMode
  clickSelectableItems : uint
Gets or sets a property that determines which types of items should be selectable through mouse clicks.
GraphEditorInputMode
  clipboardOperationsAllowed : Boolean
Determines whether clipboard operations with the usual shortcuts are enabled on the canvas.
GraphEditorInputMode
 InheritedcollectionModel : ICollectionModel
Gets or sets the ICollectionModel of the IModelItem that make up the elements in the view this mode is acting upon.
MainInputMode
  contentRectMargins : ImmutableRectangle
Gets or sets the margins to use for CanvasComponent.updateContentRect() in adjustContentRect() calls.
GraphEditorInputMode
 InheritedcontextMenuInputMode : ContextMenuInputMode
The contextMenuInputMode property.
MainInputMode
 InheritedcontextMenuModePriority : int
The context menu mode priority.
MainInputMode
  createBendInputMode : CreateBendInputMode
Gets or sets the createBendInputMode property.
GraphEditorInputMode
  createBendModePriority : Number
Gets or sets the CreateBendInputModePriority property.
GraphEditorInputMode
  createEdgeInputMode : CreateEdgeInputMode
Gets or sets the createEdgeInputMode property.
GraphEditorInputMode
  createEdgeModePriority : Number
Gets or sets the CreateEdgeInputModePriority property.
GraphEditorInputMode
  deletableItems : uint
Gets or sets a property that determines which types of items may be deleted using the deleteSelection action.
GraphEditorInputMode
  deleteElementsAllowed : Boolean
Gets or sets the property that determines whether the user is allowed to delete currently selected elements using the Delete key.
GraphEditorInputMode
  detailSelectionRecognizer : Function
Gets or sets the event recognizer function that will be queried to decide if a click should select the item that is currently visible under the mouse cursor, without giving more important items higher priority.
GraphEditorInputMode
  graph : IGraph
[read-only] Gets the Graph this mode is acting upon.
GraphEditorInputMode
  graphCanvas : GraphCanvasComponent
[read-only] Gets the GraphControl this mode is working on or null.
GraphEditorInputMode
  graphSelection : IGraphSelection
[read-only] Returns the selectionModel as an IGraphSelection.
GraphEditorInputMode
  groupSelectionAllowed : Boolean
Determines whether Ctrl-G-presses should result in calls to groupSelection().
GraphEditorInputMode
 InheritedhandleInputMode : HandleInputMode
The HandleInputMode property.
MainInputMode
 InheritedhandleModePriority : int
The handle mode priority.
MainInputMode
  hitTestIterator : IHitTestIterator
Gets or sets the HitTestEnumerator property.
GraphEditorInputMode
  hitTestOrdering : Array
Gets or sets the hitTestOrdering.
GraphEditorInputMode
 InheritedinputModeCanvasGroup : ICanvasObjectGroup
The canvas group that can be used by input modes to add temporary top-level canvas objects to.
MainInputMode
 InheritedinputModeContext : IInputModeContext
The context instance this mode is currently installed in or null if this instance is not installed.
AbstractInputMode
 Inheritedinstalled : Boolean
Whether this mode is currently installed, i.e.
AbstractInputMode
 InheritedkeyboardInputMode : KeyboardInputMode
The keyboard input mode.
MainInputMode
 InheritedkeyboardModePriority : int
The keyboard mode priority.
MainInputMode
  labelEditingAllowed : Boolean
Gets or sets the LabelEditingAllowed property that determines whether the label editor will be automatically invoked if the F2 key is pressed.
GraphEditorInputMode
  marqueeSelectableItems : uint
Gets or set a property that determines which types of items should be selected during marquee selections.
GraphEditorInputMode
 InheritedmarqueeSelectionInputMode : MarqueeSelectionInputMode
The MarqueeSelectionInputMode property.
MainInputMode
 InheritedmarqueeSelectionModePriority : int
The marquee selection mode priority.
MainInputMode
  movableItems : uint
Gets or sets a property that determines which types of items should movable using the moveInputMode.
GraphEditorInputMode
 InheritedmoveInputMode : MoveInputMode
The MoveInputMode property.
MainInputMode
  moveLabelInputMode : MoveLabelInputMode
Gets or sets the MoveLabelInputMode property.
GraphEditorInputMode
 InheritedmoveModePriority : int
The move mode priority.
MainInputMode
  nodeCreationAllowed : Boolean
Gets or sets whether createNode will be called when the canvas is clicked.
GraphEditorInputMode
  nodeCreator : Function
Gets or sets the callback that is responsible for creating a new node, e.g.
GraphEditorInputMode
  pasteDelta : IPoint
The offset for paste operation if clipboard operations are enabled.
GraphEditorInputMode
  reparentNodeHandler : IReparentNodeHandler
ets or sets the reparentNodeHandler property.
GraphEditorInputMode
  reparentNodesAllowed : Boolean
Gets or sets a property that determines whether the user may reparent nodes using a move gesture.
GraphEditorInputMode
  selectableItems : uint
Gets or sets a property that determines which types of items should be selectable at all.
GraphEditorInputMode
 InheritedselectionModel : ISelectionModel
Gets or sets the selectionModel property
MainInputMode
  showHandleItems : uint
Gets or sets a property that determines which types of items should have their IHandles shown.
GraphEditorInputMode
  textEditorInputMode : TextEditorInputMode
Gets or sets the textEditorInputMode property.
GraphEditorInputMode
  textEditorModePriority : Number
Gets or sets the TextEditorInputModePriority property.
GraphEditorInputMode
  undoOperationsAllowed : Boolean
Determines whether undo/redo operations with the usual shortcuts are enabled on the canvas.
GraphEditorInputMode
  ungroupSelectionAllowed : Boolean
Determines whether Ctrl-U-presses should result in calls to ungroupSelection().
GraphEditorInputMode
Protected Properties
 PropertyDefined by
 InheritedinputModeController : InputModeController
Gets or sets the input mode controller helper instance.
MainInputMode
Public Methods
 MethodDefined by
  
Creates a new instance.
GraphEditorInputMode
 Inherited
add(inputMode:IInputMode, priority:int = 0):void
Adds an input mode using the given priority to this compound mode.
MultiplexingInputMode
 Inherited
addConcurrent(inputMode:IConcurrentInputMode, priority:int):void
Adds an input mode as a concurrent mode using the given priority to this compound mode.
MultiplexingInputMode
  
Updates the canvas' contentRect using CanvasComponent#updateContentRect() and contentRectMargins.
GraphEditorInputMode
 Inherited
adjustCursor():void
Adjusts the cursor of the CanvasControl according to the current input mutex owner or the first mode in the list that returns a non-null preferredCursor.
MultiplexingInputMode
 Inherited
cancel():void
Cancels all modes.
MultiplexingInputMode
 Inherited
Clears the selection on the current selectionModel.
MainInputMode
  
closeLabelEditor(cancel:Boolean):void
Closes the label editor if it is currently open.
GraphEditorInputMode
  
copy():void
Copies the currently selected elements to the clipboard.
GraphEditorInputMode
  
createLabel(labeledItem:ILabeledItem):void
Interactively creates a new label for the provided labeled item.
GraphEditorInputMode
  
createNode(clickPoint:IPoint):INode
Creates a node given a certain click point.
GraphEditorInputMode
  
cut():void
Cuts and inserts the currently selected elements to the clipboard.
GraphEditorInputMode
  
This method deletes the currently selected elements.
GraphEditorInputMode
  
dispose():void
Disposes this input mode.
GraphEditorInputMode
  
dragBend(bend:IBend):void
Initiates the handleInputMode to drag the given bend.
GraphEditorInputMode
  
editLabel(label:ILabel):void
Triggers the editing of the given label.
GraphEditorInputMode
  
findHits(clickPoint:IPoint, tests:Array):IModelItem
Used as a callback to find hits underneath a certain clicked point.
GraphEditorInputMode
 Inherited
Returns an ICanvasGroupProvider instance for this input mode
MainInputMode
 Inherited
Finds the IConcurrentInputMode that currently owns the mutex or null.
MultiplexingInputMode
  
Creates a new group for all of the currently selected elements.
GraphEditorInputMode
  
install(context:IInputModeContext):void
Installs this mode into the given canvas.
GraphEditorInputMode
 Inherited
marqueeSelect(marqueeRectangle:IRectangle, items:ICollectionModel):void
Selects the given elements in the editor inside the provided marquee selection rectangle.
MainInputMode
  
marqueeSelectElements(marqueeRectangle:IRectangle):void
This method will marquee select the items in the graph.
GraphEditorInputMode
  
paste():void
Pastes the current clipboard contents.
GraphEditorInputMode
  
redo():void
Redoes the last Redoable change.
GraphEditorInputMode
 Inherited
remove(mode:IInputMode):void
Removes the given mode from this compound mode.
MultiplexingInputMode
  
selectAll():void
Clears the current selection and selects all nodes and bends in this graph.
GraphEditorInputMode
  
setLabelText(label:ILabel, text:String):void
Sets the label's text after it has been edited using editLabel.
GraphEditorInputMode
 Inherited
setSelected(item:IModelItem, selected:Boolean):void
Uses the selectionModel to select the given item.
MainInputMode
 Inherited
Returns a list of all modes managed by this instance in sorted order.
MultiplexingInputMode
 Inherited
stop():Boolean
Tries to stop all modes.
MultiplexingInputMode
  
undo():void
Undoes the last undoable change.
GraphEditorInputMode
  
Makes each of the currently selected nodes a direct child of the root group (if not already).
GraphEditorInputMode
 Inherited
MultiplexingInputMode
Protected Methods
 MethodDefined by
  
childInputModeContextLookup(type:Class):Object
Callback lookup method that will be used by the child IInputModeContext
GraphEditorInputMode
 Inherited
Callback that creates the IInputModeContext for the child modes of this mode.
MultiplexingInputMode
 Inherited
Factory method for the ClickInputMode property.
MainInputMode
 Inherited
Factory method for the contextMenuInputMode property.
MainInputMode
  
Factory method for the createBendInputMode property.
GraphEditorInputMode
  
Factory method for the createEdgeInputMode property.
GraphEditorInputMode
  
Callback method to create a custom label configuration when a new label should be created.
GraphEditorInputMode
 Inherited
Factory method for the HandleInputMode property.
MainInputMode
  
Factory method for the hitTestEnumerator property.
GraphEditorInputMode
 Inherited
Creates the inputModeController that will be used to coordinate the selection and the handles, etc.
MainInputMode
 Inherited
Factory method that creates the keyboard input mode instance.
MainInputMode
 Inherited
Factory method for the marqueeSelectionInputMode property.
MainInputMode
  
Factory method for the MoveInputMode property.
GraphEditorInputMode
  
Factory method for the MoveLabelInputMode property.
GraphEditorInputMode
  
Factory method for the ReparentNodeHandler property.
GraphEditorInputMode
  
Factory method for the textEditorInputMode property.
GraphEditorInputMode
  
initialize():void
Performs one-time initialization of this instance.
GraphEditorInputMode
 Inherited
invalidate():void
Convenience method for subclass implementations that invalidates the canvasComponent this mode is currently installed in.
AbstractInputMode
 Inherited
onClickInputModeChanged(oldClickInputMode:ClickInputMode, newClickInputMode:ClickInputMode):void
Called when the clickInputMode property value changes and after initialization of the field.
MainInputMode
  
Called when the mouse has been clicked at a given location.
GraphEditorInputMode
 Inherited
onCollectionModelChanged(oldCollectionModel:ICollectionModel, newCollectionModel:ICollectionModel):void
Callback that gets triggered once the collectionModel property changes.
MainInputMode
 Inherited
onContextMenuInputModeChanged(oldContextMenuInputMode:ContextMenuInputMode, newContextMenuInputMode:ContextMenuInputMode):void
Called when the contextMenuInputMode property value changes
MainInputMode
  
Callback that is triggered on a CanvasContextMenuEvent
GraphEditorInputMode
  
Callback that is called as soon as createBendInputMode created a new bend.
GraphEditorInputMode
  
onCreateBendInputModeChanged(oldCreateBendInputMode:CreateBendInputMode, newCreateBendInputMode:CreateBendInputMode):void
Called when the createBendInputMode property value changes.
GraphEditorInputMode
  
onCreateEdgeInputModeChanged(oldCreateEdgeInputMode:CreateEdgeInputMode, newCreateEdgeInputMode:CreateEdgeInputMode):void
Called when the createEdgeInputMode property value changes
GraphEditorInputMode
  
onCtrlAPressed(evt:KeyboardEvent):void
Callback that delegates to selectAll if selectElementsAllowed is true.
GraphEditorInputMode
  
onDeletePressed(evt:KeyboardEvent):void
Callback that delegates to deleteSelection if deleteElementsAllowed is true.
GraphEditorInputMode
  
onEditLabel():void
Callback that is invoked if the F2 key is pressed and labelEditingAllowed is set to true.
GraphEditorInputMode
  
onF2KeyPressed(evt:KeyboardEvent):void
Callback that triggers OnEditLabel.
GraphEditorInputMode
  
Called when the gaphControl property changes.
GraphEditorInputMode
  
onGraphChanged(oldGraph:IGraph, newGraph:IGraph):void
Called when the graph property changes.
GraphEditorInputMode
  
onGraphSelectionChanged(oldSelection:IGraphSelection, newSelection:IGraphSelection):void
Called when the graphSelection property changes.
GraphEditorInputMode
  
onHandleInputModeChanged(oldHandleInputMode:HandleInputMode, newHandleInputMode:HandleInputMode):void
Called when the handleInputMode property value changes and after initialization of the field.
GraphEditorInputMode
 Inherited
Called when the inputModeCanvasGroup property changes.
MainInputMode
  
onKeyboardInputModeChanged(oldKeyboardInputMode:KeyboardInputMode, newKeyboardInputMode:KeyboardInputMode):void
Called when the keyboard input mode changed.
GraphEditorInputMode
 Inherited
onMarqueeSelectionInputModeChanged(oldMarqueeSelectionInputMode:MarqueeSelectionInputMode, newMarqueeSelectionInputMode:MarqueeSelectionInputMode):void
Called when the marqueeSelectionInputMode property value changes and after initialization of the field.
MainInputMode
 Inherited
Callback used by MarqueeSelectionInputMode if the user has finished creating the marquee selection.
MainInputMode
  
onMoveInputModeChanged(oldMoveInputMode:MoveInputMode, newMoveInputMode:MoveInputMode):void
Called when the moveInputMode property value changes
GraphEditorInputMode
 Inherited
Callback method that will be triggered when a drag has been finished.
MainInputMode
  
Called when the a drag operation is finished
GraphEditorInputMode
  
onMoveLabelInputModeChanged(oldMoveLabelInputMode:MoveLabelInputMode, newMoveLabelInputMode:MoveLabelInputMode):void
Called when the moveLabelInputMode property value changes and after initialization of the field.
GraphEditorInputMode
  
Called when the reparentNodeHandler property value changes and after initialization of the field.
GraphEditorInputMode
 Inherited
onSelectionModelChanged(oldSelectionModel:ISelectionModel, newSelectionModel:ISelectionModel):void
Callback that gets triggered once the selectionModel property changes.
MainInputMode
  
onTextEditorInputModeChanged(oldTextEditorInputMode:TextEditorInputMode, newTextEditorInputMode:TextEditorInputMode):void
Called when the textEditorInputMode property value changes
GraphEditorInputMode
  
Called when a label's text was edited by the TextEditorInputMode
GraphEditorInputMode
  
setGraph(newGraph:IGraph):void
Set a new Graph for this mode.
GraphEditorInputMode
  
Sets the GraphCanvasComponent that is associated with this instance.
GraphEditorInputMode
  
Set a new GraphSelection for this mode.
GraphEditorInputMode
  
Determines whether the item should be deleted.
GraphEditorInputMode
  
Determines whether to make the item movable using the moveInputMode.
GraphEditorInputMode
  
Determines whether to show the handles for the given item.
GraphEditorInputMode
Property detail
autoAdjustContentRectproperty
autoAdjustContentRect:Boolean  [read-write]

Gets or sets a property that determines whether this instance should automatically adjust the canvas' contentRect if the graph changes.

The adjustContentRect method is called whenever the content changes and autoAdjustContentRect is set to true.

The default value is true.

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

See also

autoRemoveEmptyLabelsproperty 
autoRemoveEmptyLabels:Boolean  [read-write]

Gets or sets a value indicating whether this mode should automatically remove labels from the graph when a label text has been edited and the label text is empty.

The default value is false.

Implementation
    public function get autoRemoveEmptyLabels():Boolean
    public function set autoRemoveEmptyLabels(value:Boolean):void
clickSelectableItemsproperty 
clickSelectableItems:uint  [read-write]

Gets or sets a property that determines which types of items should be selectable through mouse clicks.

The default value is GraphItemTypes.ALL.

Implementation
    public function get clickSelectableItems():uint
    public function set clickSelectableItems(value:uint):void

See also

clipboardOperationsAllowedproperty 
clipboardOperationsAllowed:Boolean  [read-write]

Determines whether clipboard operations with the usual shortcuts are enabled on the canvas.

The default value is true.

Implementation
    public function get clipboardOperationsAllowed():Boolean
    public function set clipboardOperationsAllowed(value:Boolean):void
contentRectMarginsproperty 
contentRectMargins:ImmutableRectangle  [read-write]

Gets or sets the margins to use for CanvasComponent.updateContentRect() in adjustContentRect() calls.

Implementation
    public function get contentRectMargins():ImmutableRectangle
    public function set contentRectMargins(value:ImmutableRectangle):void

See also

createBendInputModeproperty 
createBendInputMode:CreateBendInputMode  [read-write]

Gets or sets the createBendInputMode property.

If the field has not yet been initialized upon first access, the factory method createCreateBendInputMode will be called. Upon change the onCreateBendInputModeChanged method will be called.

Implementation
    public function get createBendInputMode():CreateBendInputMode
    public function set createBendInputMode(value:CreateBendInputMode):void
createBendModePriorityproperty 
createBendModePriority:Number  [read-write]

Gets or sets the CreateBendInputModePriority property.

The default value is 42.

Implementation
    public function get createBendModePriority():Number
    public function set createBendModePriority(value:Number):void
createEdgeInputModeproperty 
createEdgeInputMode:CreateEdgeInputMode  [read-write]

Gets or sets the createEdgeInputMode property.

If the field has not yet been initialized upon first access, the factory method createCreateEdgeInputMode will be called. Upon change the onCreateEdgeInputModeChanged method will be called.

Implementation
    public function get createEdgeInputMode():CreateEdgeInputMode
    public function set createEdgeInputMode(value:CreateEdgeInputMode):void
createEdgeModePriorityproperty 
createEdgeModePriority:Number  [read-write]

Gets or sets the CreateEdgeInputModePriority property.

The default value is 45.

Implementation
    public function get createEdgeModePriority():Number
    public function set createEdgeModePriority(value:Number):void
deletableItemsproperty 
deletableItems:uint  [read-write]

Gets or sets a property that determines which types of items may be deleted using the deleteSelection action.

The default value is GraphItemTypes.ALL.

Implementation
    public function get deletableItems():uint
    public function set deletableItems(value:uint):void

See also

deleteElementsAllowedproperty 
deleteElementsAllowed:Boolean  [read-write]

Gets or sets the property that determines whether the user is allowed to delete currently selected elements using the Delete key.

The default value is true.

Implementation
    public function get deleteElementsAllowed():Boolean
    public function set deleteElementsAllowed(value:Boolean):void
detailSelectionRecognizerproperty 
detailSelectionRecognizer:Function  [read-write]

Gets or sets the event recognizer function that will be queried to decide if a click should select the item that is currently visible under the mouse cursor, without giving more important items higher priority.

An event recognizer function takes an Event as its only argument and returns a Boolean that indicates whether the event was recognized.

If the value recognizes that the user wanted to use the detail clicking behavior, the hitTestIterator will be queried for the given item and the first item that is returned will be considered a hit. Otherwise all hit items are examined and are priorized by item type. E.g. by default clicking on a node will select the node, even if there is a node label which has been clicked at the same point. If detail selection is recognized, the label will be selected.

The default implementation will recognizer events of type com.yworks.canvas.input.ClickEvent, if the ctrl key was pressed.

Implementation
    public function get detailSelectionRecognizer():Function
    public function set detailSelectionRecognizer(value:Function):void
graphproperty 
graph:IGraph  [read-only]

Gets the Graph this mode is acting upon.

Implementation
    public function get graph():IGraph
graphCanvasproperty 
graphCanvas:GraphCanvasComponent  [read-only]

Gets the GraphControl this mode is working on or null.

his property is set by setGraphControl which is triggered if this mode is installed in a GraphCanvasComponent.

Implementation
    public function get graphCanvas():GraphCanvasComponent
graphSelectionproperty 
graphSelection:IGraphSelection  [read-only]

Returns the selectionModel as an IGraphSelection.

Implementation
    public function get graphSelection():IGraphSelection
groupSelectionAllowedproperty 
groupSelectionAllowed:Boolean  [read-write]

Determines whether Ctrl-G-presses should result in calls to groupSelection().

The default value is true.

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

See also

hitTestIteratorproperty 
hitTestIterator:IHitTestIterator  [read-write]

Gets or sets the HitTestEnumerator property.

The enumerator will be queried for hit tests if the user clicks on the canvas. If the field has not yet been initialized upon first access, the factory method createHitTestEnumerator will be called.

Implementation
    public function get hitTestIterator():IHitTestIterator
    public function set hitTestIterator(value:IHitTestIterator):void
hitTestOrderingproperty 
hitTestOrdering:Array  [read-write]

Gets or sets the hitTestOrdering.

The hitTestOrdering is an array of HitTest constants that determines the ordering in which items are tested for click hits.

Implementation
    public function get hitTestOrdering():Array
    public function set hitTestOrdering(value:Array):void
labelEditingAllowedproperty 
labelEditingAllowed:Boolean  [read-write]

Gets or sets the LabelEditingAllowed property that determines whether the label editor will be automatically invoked if the F2 key is pressed.

If this flag is set to true pressing F2 will start the label editor.

The default value is true.

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

See also

marqueeSelectableItemsproperty 
marqueeSelectableItems:uint  [read-write]

Gets or set a property that determines which types of items should be selected during marquee selections.

The default value is A combination of GraphItemTypes.NODE, GraphItemTypes.EDGE and GraphItemTypes.BEND..

Implementation
    public function get marqueeSelectableItems():uint
    public function set marqueeSelectableItems(value:uint):void

See also

movableItemsproperty 
movableItems:uint  [read-write]

Gets or sets a property that determines which types of items should movable using the moveInputMode.

The default value is GraphItemTypes.ALL.

Implementation
    public function get movableItems():uint
    public function set movableItems(value:uint):void

See also

moveLabelInputModeproperty 
moveLabelInputMode:MoveLabelInputMode  [read-write]

Gets or sets the MoveLabelInputMode property.

This mode is responsible for moving labels to another candidate position. If the field has not yet been initialized upon first access, the factory method createMoveLabelInputMode will be called. Upon change the onMoveLabelInputModeChanged method will be called.

Implementation
    public function get moveLabelInputMode():MoveLabelInputMode
    public function set moveLabelInputMode(value:MoveLabelInputMode):void
nodeCreationAllowedproperty 
nodeCreationAllowed:Boolean  [read-write]

Gets or sets whether createNode will be called when the canvas is clicked.

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

See also

nodeCreatorproperty 
nodeCreator:Function  [read-write]

Gets or sets the callback that is responsible for creating a new node, e.g. in response to a mouse click.

The node creator function has to take the current context and IGraph instance and the IPoint location as arguments, and returns the created node:

   var nodeCreator:Function = function( context:IInputModeContext, graph:IGraph, location:IPoint ):INode {
     var node:INode = ..
     ..
     return node;
   }
   

Implementation
    public function get nodeCreator():Function
    public function set nodeCreator(value:Function):void
pasteDeltaproperty 
pasteDelta:IPoint  [read-write]

The offset for paste operation if clipboard operations are enabled.

The default value is (15, 15).

Implementation
    public function get pasteDelta():IPoint
    public function set pasteDelta(value:IPoint):void
reparentNodeHandlerproperty 
reparentNodeHandler:IReparentNodeHandler  [read-write]

ets or sets the reparentNodeHandler property.

This handler will be delegated to by an implementation of the IReparentNodeHandler interface that this class puts into the childInputModeContextLookup.
The child input modes will query this interface to perform node reparenting operations if the graph is an IGroupedGraph. If the field has not yet been initialized upon first access, the factory method createReparentNodeHandler will be called. Upon change the onReparentNodeHandlerChanged method will be called.

Implementation
    public function get reparentNodeHandler():IReparentNodeHandler
    public function set reparentNodeHandler(value:IReparentNodeHandler):void

See also

reparentNodesAllowedproperty 
reparentNodesAllowed:Boolean  [read-write]

Gets or sets a property that determines whether the user may reparent nodes using a move gesture.

This setting is only of relevance if the graph is a hierarchic graph. This setting overrides the currently set reparentNodeHandler if set to false.

The default value is true.

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

See also

selectableItemsproperty 
selectableItems:uint  [read-write]

Gets or sets a property that determines which types of items should be selectable at all.

The default value is GraphItemTypes.ALL.

Implementation
    public function get selectableItems():uint
    public function set selectableItems(value:uint):void

See also

showHandleItemsproperty 
showHandleItems:uint  [read-write]

Gets or sets a property that determines which types of items should have their IHandles shown.

The default value is GraphItemTypes.ALL.

Implementation
    public function get showHandleItems():uint
    public function set showHandleItems(value:uint):void

See also

textEditorInputModeproperty 
textEditorInputMode:TextEditorInputMode  [read-write]

Gets or sets the textEditorInputMode property.

If the field has not yet been initialized upon first access, the factory method createTextEditorInputMode will be called. Upon change the onTextEditorInputModeChanged method will be called.

Implementation
    public function get textEditorInputMode():TextEditorInputMode
    public function set textEditorInputMode(value:TextEditorInputMode):void
textEditorModePriorityproperty 
textEditorModePriority:Number  [read-write]

Gets or sets the TextEditorInputModePriority property.

The default value is 100.

Implementation
    public function get textEditorModePriority():Number
    public function set textEditorModePriority(value:Number):void
undoOperationsAllowedproperty 
undoOperationsAllowed:Boolean  [read-write]

Determines whether undo/redo operations with the usual shortcuts are enabled on the canvas.

The default value is true.

Implementation
    public function get undoOperationsAllowed():Boolean
    public function set undoOperationsAllowed(value:Boolean):void
ungroupSelectionAllowedproperty 
ungroupSelectionAllowed:Boolean  [read-write]

Determines whether Ctrl-U-presses should result in calls to ungroupSelection().

The default value is true.

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

See also

Constructor detail
GraphEditorInputMode()constructor
public function GraphEditorInputMode(graph:IGraph, selectionModel:ISelectionModel)

Creates a new instance.

Parameters
graph:IGraph — The IGraph to work on.
 
selectionModel:ISelectionModel — The ISelectionModel to work with.

See also

Method detail
adjustContentRect()method
public function adjustContentRect():void

Updates the canvas' contentRect using CanvasComponent#updateContentRect() and contentRectMargins.

This method is called whenever the content changes and autoAdjustContentRect is set to true.

See also

childInputModeContextLookup()method 
protected override function childInputModeContextLookup(type:Class):Object

Callback lookup method that will be used by the child IInputModeContext

Parameters
type:Class — The class to lookup

Returns
Object — An implementation of the given type, or null
closeLabelEditor()method 
public function closeLabelEditor(cancel:Boolean):void

Closes the label editor if it is currently open.

Parameters
cancel:Boolean — Whether to cancel the editor and discard changes.
copy()method 
public function copy():void

Copies the currently selected elements to the clipboard.

createCreateBendInputMode()method 
protected function createCreateBendInputMode():CreateBendInputMode

Factory method for the createBendInputMode property.

This method will be called upon first access to the createBendInputMode property.

Returns
CreateBendInputMode — A new instance of CreateBendInputMode.
createCreateEdgeInputMode()method 
protected function createCreateEdgeInputMode():CreateEdgeInputMode

Factory method for the createEdgeInputMode property.

This method will be called upon first access to the createEdgeInputMode property.

Returns
CreateEdgeInputMode — A new instance of CreateEdgeInputMode.
createDefaultLabelConfiguration()method 
protected function createDefaultLabelConfiguration(labeledItem:ILabeledItem):ILabelConfiguration

Callback method to create a custom label configuration when a new label should be created.

Parameters
labeledItem:ILabeledItem — the item a new label will be created for.

Returns
ILabelConfiguration — A default label configuration
createHitTestIterator()method 
protected function createHitTestIterator():IHitTestIterator