Package | com.yworks.graph.input.snapLines |
Class | public class NodeSnapLineProvider |
Inheritance | NodeSnapLineProvider Object |
Implements | ISnapLineProvider |
ISnapLineProvider
interface that provides SnapLine
s for
INode
s.
This implementation uses the GraphSnapContext
to create snap lines around the geometric border
of the node.
See also
Method | Defined By | ||
---|---|---|---|
Called by the GraphSnapContext when a drag is about to start. | NodeSnapLineProvider |
Method | Defined By | ||
---|---|---|---|
addCenterSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that is called by addSnapLines to collect snap lines for the centers of the node. | NodeSnapLineProvider | ||
addFixedNodeBorderSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that adds the fixed snap lines around the border of the node's layout. | NodeSnapLineProvider | ||
addNodeToNodeSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that adds the fixed snap lines around the node for other nodes to snap to using the
GraphSnapContext.nodeToNodeDistance. | NodeSnapLineProvider | ||
addNodeToSegmentSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that adds the fixed snap lines around the node for edge segments to snap to. | NodeSnapLineProvider | ||
addPortSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that is called by addSnapLines the collect snap lines to snap ports to at
the provided node. | NodeSnapLineProvider | ||
createCenterSnapLine(context:GraphSnapContext, node:INode, snapLineOrientation:SnapLineOrientation, location:YPoint):SnapLine
Convenience method that creates a snap line for the center of nodes. | NodeSnapLineProvider |
Constant | Defined By | ||
---|---|---|---|
instance : NodeSnapLineProvider [static]
A static instance of NodeSnapLineProvider. | NodeSnapLineProvider |
addCenterSnapLines | () | method |
protected function addCenterSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that is called by addSnapLines
to collect snap lines for the centers of the node.
This method by default uses the createCenterSnapLine
method to add them to the fixed node and
fixed segment collections.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
evt:CollectSnapLinesEvent — The event to use for adding snap lines.
| |
node:INode — The node to add snap lines for.
| |
layout:IRectangle — The layout of the node to use for adding the snap lines.
|
See also
addFixedNodeBorderSnapLines | () | method |
protected function addFixedNodeBorderSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that adds the fixed snap lines around the border of the node's layout
.
This method is called by addSnapLines
.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
evt:CollectSnapLinesEvent — The event to use for adding snap lines.
| |
node:INode — The node to add snap lines for.
| |
layout:IRectangle — The layout of the node to use for adding the snap lines.
|
See also
addNodeToNodeSnapLines | () | method |
protected function addNodeToNodeSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that adds the fixed snap lines around the node for other nodes to snap to using the
GraphSnapContext.nodeToNodeDistance
.
This method is called by addSnapLines
and uses the GraphSnapContext.nodeToNodeDistance
to determine the location of the segments to add around the layout.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
evt:CollectSnapLinesEvent — The event to use for adding snap lines.
| |
node:INode — The node to add snap lines for.
| |
layout:IRectangle — The layout of the node to use for adding the snap lines.
|
addNodeToSegmentSnapLines | () | method |
protected function addNodeToSegmentSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that adds the fixed snap lines around the node for edge segments to snap to.
This method is called by addSnapLines
and uses the GraphSnapContext.nodeToEdgeDistance
to determine the location of the segments to add around the layout.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
evt:CollectSnapLinesEvent — The event to use for adding snap lines.
| |
node:INode — The node to add snap lines for.
| |
layout:IRectangle — The layout of the node to use for adding the snap lines.
|
See also
addPortSnapLines | () | method |
protected function addPortSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, node:INode, layout:IRectangle):void
Callback method that is called by addSnapLines
the collect snap lines to snap ports to at
the provided node.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
evt:CollectSnapLinesEvent — The event to use for adding snap lines.
| |
node:INode — The node to add snap lines for.
| |
layout:IRectangle — The layout of the node to use for adding the snap lines.
|
See also
addSnapLines | () | method |
public function addSnapLines(context:GraphSnapContext, evt:CollectSnapLinesEvent, item:IModelItem):void
Called by the GraphSnapContext
when a drag is about to start.
This means that the provided item, which can be cast to INode
will not be moved during the
edit and thus can contribute to the set of fixed snap lines.
This implementation delegates to addFixedNodeBorderSnapLines
, addPortSnapLines
,
addNodeToNodeSnapLines
and addCenterSnapLines
.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
evt:CollectSnapLinesEvent — The event to use for adding snap lines.
| |
item:IModelItem — The item to add snap lines for.
|
See also
createCenterSnapLine | () | method |
protected function createCenterSnapLine(context:GraphSnapContext, node:INode, snapLineOrientation:SnapLineOrientation, location:YPoint):SnapLine
Convenience method that creates a snap line for the center of nodes.
Parameters
context:GraphSnapContext — The context which holds the settings for the snap lines. Note that implementations should not
change the state of the context explicitly.
| |
node:INode — The node to add snap lines for.
| |
snapLineOrientation:SnapLineOrientation — The snap line orientation.
| |
location:YPoint — The location of the snap line.
|
SnapLine — A snap line that other centers can snap to.
|
instance | Constant |
public static const instance:NodeSnapLineProvider
A static instance of NodeSnapLineProvider
.