Packagecom.yworks.graph.input.snapLines
Classpublic class OrthogonalEdgeHelper
InheritanceOrthogonalEdgeHelper Inheritance Object
Implements IOrthogonalEdgeHelper

Default implementation of the IOrthogonalEdgeHelper. This class inspects the edges in question and infers the SegmentOrientations of the segments from the current geometry of the edge path.

See also

SegmentOrientation


Public Methods
 MethodDefined By
  
canBeMoved(inputModecontext:IInputModeContext, edge:IEdge, sourceSide:Boolean):Boolean
This implementation always returns false.
OrthogonalEdgeHelper
  
cleanUpEdge(inputModeContext:IInputModeContext, graph:IGraph, edge:IEdge):void
This implementation removes duplicate and collinear bends, as well as segments of zero length.
OrthogonalEdgeHelper
  
getDefaultSegmentOrientation(edge:IEdge, segmentIndex:int):uint
[static]
OrthogonalEdgeHelper
  
getSegmentOrientation(inputModeContext:IInputModeContext, edge:IEdge, segmentIndex:int):uint
Gets the orientation of the given segment by looking at the geometry of the segment.
OrthogonalEdgeHelper
  
isOrthogonallyEdited(inputModeContext:IInputModeContext, edge:IEdge):Boolean
This implementation always returns true.
OrthogonalEdgeHelper
Protected Methods
 MethodDefined By
  
canRemoveBend(context:IInputModeContext, bendToRemove:IBend):Boolean
This implementation always returns true.
OrthogonalEdgeHelper
Public Constants
 ConstantDefined By
  instance : OrthogonalEdgeHelper
[static] A static instance of this class that can be shared.
OrthogonalEdgeHelper
Method Detail
canBeMoved()method
public function canBeMoved(inputModecontext:IInputModeContext, edge:IEdge, sourceSide:Boolean):Boolean

This implementation always returns false.

Parameters

inputModecontext:IInputModeContext
 
edge:IEdge
 
sourceSide:Boolean

Returns
Boolean
canRemoveBend()method 
protected function canRemoveBend(context:IInputModeContext, bendToRemove:IBend):Boolean

This implementation always returns true.

Parameters

context:IInputModeContext
 
bendToRemove:IBend

Returns
Boolean
cleanUpEdge()method 
public function cleanUpEdge(inputModeContext:IInputModeContext, graph:IGraph, edge:IEdge):void

This implementation removes duplicate and collinear bends, as well as segments of zero length.

Parameters

inputModeContext:IInputModeContext
 
graph:IGraph
 
edge:IEdge

getDefaultSegmentOrientation()method 
public static function getDefaultSegmentOrientation(edge:IEdge, segmentIndex:int):uint

Parameters

edge:IEdge
 
segmentIndex:int

Returns
uint
getSegmentOrientation()method 
public function getSegmentOrientation(inputModeContext:IInputModeContext, edge:IEdge, segmentIndex:int):uint

Gets the orientation of the given segment by looking at the geometry of the segment. If the segment has a zero length, the adjacent segments will be inspected to infer the orientation such that the orientation toggles between SegmentOrientation.VERTICAL and SegmentOrientation.HORIZONTAL.

Parameters

inputModeContext:IInputModeContext — The input mode context in which the orientation is needed.
 
edge:IEdge — The edge to inspect.
 
segmentIndex:int — The index of the segment.

Returns
uint — The declared orientation of the segment.

See also

isOrthogonallyEdited()method 
public function isOrthogonallyEdited(inputModeContext:IInputModeContext, edge:IEdge):Boolean

This implementation always returns true.

Parameters

inputModeContext:IInputModeContext
 
edge:IEdge

Returns
Boolean
Constant Detail
instanceConstant
public static const instance:OrthogonalEdgeHelper

A static instance of this class that can be shared.