Packagecom.yworks.graph.input.snapLines
Classpublic class NodePairBasedSnapLine
InheritanceNodePairBasedSnapLine Inheritance SnapLine Inheritance Object

A specialized SnapLine that carries two INodes as additional information that can be used for the visualization.

See also

INode
firstNode
secondNode


Public Properties
 PropertyDefined By
 Inheritedcoordinates : IPoint
[read-only] The coordinates of the center point of the snap line.
SnapLine
  firstNode : INode
[read-only] Gets the first node that is associated with this snap line.
NodePairBasedSnapLine
 Inheritedfrom : Number
The smaller value of the coordinate that delimits this snap line.
SnapLine
 Inheritedorientation : SnapLineOrientation
[read-only] The orientation of the snap line as defined in SnapLineOrientation.
SnapLine
 InheritedresourceKey : ResourceKey
[read-only] The resource key which determines the visual appearance of the snap line.
SnapLine
  secondNode : INode
[read-only] Gets the second node that is associated with this snap line.
NodePairBasedSnapLine
 InheritedsnapType : uint
[read-only] The type of the line that describes how other items will snap to this line.
SnapLine
 Inheritedtag : Object
[read-only] The tag that is associated with this snap line.
SnapLine
 Inheritedto : Number
The greater value of the coordinate that delimits this snap line.
SnapLine
 Inheritedweight : Number
[read-only] The weight/importance of this snap line.
SnapLine
Public Methods
 MethodDefined By
  
NodePairBasedSnapLine(firstNode:INode, secondNode:INode, orientation:SnapLineOrientation, snapType:uint, resourceKey:ResourceKey, coordinates:IPoint, tag:Object, weight:Number, from:Number, to:Number)
Initializes a new instance of the NodePairBasedSnapLine class.
NodePairBasedSnapLine
Public Constants
 ConstantDefined By
 InheritedSNAP_LINE_BLANK_VARIABLE_LINE_KEY : ResourceKey
[static] Determines a blank line between the SnapLine.coordinates and the SnapLineSnapResult.snappedCoordinates
SnapLine
 InheritedSNAP_LINE_CENTER_BETWEEN_BOUNDS_KEY : ResourceKey
[static] Determines a snap line which lets an item snap in the center between two bounds of other items.
SnapLine
 InheritedSNAP_LINE_CENTER_BETWEEN_CENTERS_KEY : ResourceKey
[static] Determines a snap line which lets an item snap in the center between two centers of other items.
SnapLine
 InheritedSNAP_LINE_EQUAL_DISTANCE_BETWEEN_BOUNDS_KEY : ResourceKey
[static] Determines a snap line which lets an item snap if it has an equal distance to two other items.
SnapLine
 InheritedSNAP_LINE_EQUAL_DISTANCE_BETWEEN_CENTERS_KEY : ResourceKey
[static] Determines a snap line which lets an item snap if it's center has an equal distance to the centers' of two other items.
SnapLine
 InheritedSNAP_LINE_EQUAL_HEIGHT_KEY : ResourceKey
[static] Determines the snapping of a resized item if it's new height is equal to another item.
SnapLine
 InheritedSNAP_LINE_EQUAL_WIDTH_KEY : ResourceKey
[static] Determines the snapping of a resized item if it's new width is equal to another item.
SnapLine
 InheritedSNAP_LINE_EXTENDED_VARIABLE_LINE_KEY : ResourceKey
[static] Determines a decorated line between the SnapLine.coordinates and the SnapLineSnapResult.snappedCoordinates that is extended on both sides.
SnapLine
 InheritedSNAP_LINE_FIXED_DISTANCE_KEY : ResourceKey
[static] Determines a snap line which snaps to a distance between different graph items.
SnapLine
 InheritedSNAP_LINE_FIXED_LINE_KEY : ResourceKey
[static] Determines a snap line having a fixed visualization independent of the SnapLineSnapResult.
SnapLine
 InheritedSNAP_LINE_VARIABLE_LINE_KEY : ResourceKey
[static] Determines a decorated line between the SnapLine.coordinates and the SnapLineSnapResult.snappedCoordinates
SnapLine
 InheritedSNAP_TO_GRID_KEY : ResourceKey
[static]
SnapLine
Property Detail
firstNodeproperty
firstNode:INode  [read-only]

Gets the first node that is associated with this snap line. Usually this is one of the instances that induced this snap line.


Implementation
    public function get firstNode():INode
secondNodeproperty 
secondNode:INode  [read-only]

Gets the second node that is associated with this snap line. Usually this is one of the instances that induced this snap line.


Implementation
    public function get secondNode():INode
Constructor Detail
NodePairBasedSnapLine()Constructor
public function NodePairBasedSnapLine(firstNode:INode, secondNode:INode, orientation:SnapLineOrientation, snapType:uint, resourceKey:ResourceKey, coordinates:IPoint, tag:Object, weight:Number, from:Number, to:Number)

Initializes a new instance of the NodePairBasedSnapLine class.

Parameters
firstNode:INode — The first node to assign to firstNode.
 
secondNode:INode — The second node to assign to secondNode.
 
orientation:SnapLineOrientation — >The orientation of the snap line. This is one of SnapLineOrientation.HORIZONTAL or SnapLineOrientation.VERTICAL.
 
snapType:uint — The type of the line that describes how other items will snap to this line. This is one of SnapLineSnapType.TOP, SnapLineSnapType.BOTTOM, SnapLineSnapType.LEFT, SnapLineSnapType.RIGHT or SnapLineSnapType.CENTER.
 
resourceKey:ResourceKey — A resource key which determines the visual representation of this snap line.
 
coordinates:IPoint — The coordinates of the center point of the snap line.
 
tag:Object — A tag that is associated with this snap line - see SnapLine.tag for a typical use of this value.
 
weight:Number — The weight (importance) of this snap line. If more than one snap line is snapped to, the one with the greater weight will be used.
 
from:Number — The smaller value of the coordinate that delimits this snap line.
 
to:Number — The greater value of the coordinate that delimits this snap line.