Package | com.yworks.graph.model |
Class | public class ShapeGeometryPortCandidateProvider |
Inheritance | ShapeGeometryPortCandidateProvider AbstractPortCandidateProvider Object |
IPortCandidateProvider
that
works for IPortOwner
implementations that
have IShapeGeometry
instances in their lookup.
Property | Defined By | ||
---|---|---|---|
addExistingPortsEnabled : Boolean
Gets or sets a property that determines whether
existing ports should be added to the list of ports
| ShapeGeometryPortCandidateProvider | ||
minimumSegmentLength : Number
Gets or sets the minimum length a segment needs to have in order to be used
to add port candidates. | ShapeGeometryPortCandidateProvider | ||
portOwner : IPortOwner [read-only]
Gets owner of the port candidate. | AbstractPortCandidateProvider |
Method | Defined By | ||
---|---|---|---|
ShapeGeometryPortCandidateProvider(portOwner:IPortOwner, ratios:Array = null)
Creates an instance that inserts a port candidate at the given ratios of each segment
of the shape's path. | ShapeGeometryPortCandidateProvider | ||
Convenience implementation that simply delegates to getPortCandidates. | AbstractPortCandidateProvider | ||
Convenience implementation that simply delegates to getPortCandidates. | AbstractPortCandidateProvider | ||
Convenience implementation that simply delegates to getPortCandidates. | AbstractPortCandidateProvider | ||
Convenience implementation that simply delegates to getPortCandidates. | AbstractPortCandidateProvider | ||
Convenience implementation that simply delegates to getPortCandidates. | AbstractPortCandidateProvider | ||
Convenience implementation that simply delegates to getPortCandidates. | AbstractPortCandidateProvider |
Method | Defined By | ||
---|---|---|---|
addExistingPorts(list:List):void
Convenience method for subclasses that adds all existing ports
of the portOwner to the provided list. | AbstractPortCandidateProvider | ||
createCallbackPort(location:IPortLocationModelParameter, owner:IPortOwner = null):DefaultPortCandidate
Factory method that creates a simple candidate that will use the createInstance
method of this instance to delegate createInstance of the port candidate to. | AbstractPortCandidateProvider | ||
createCallbackPortAt(location:IPoint, owner:IPortOwner = null, model:IPortLocationModel = null, valid:Boolean = true):DefaultPortCandidate
Factory method that creates a simple candidate that will use the createInstance
method of this instance to delegate createInstance of the port candidate to. | AbstractPortCandidateProvider | ||
Callback method used by the ports created using the createCallbackPort factory method. | AbstractPortCandidateProvider | ||
Creates the list of port candidates using the IShapeGeometry obtained from the
owner's lookup. | ShapeGeometryPortCandidateProvider | ||
getCandidateAt(context:IInputModeContext, candidate:DefaultPortCandidate, suggestedLocation:IPoint):IPortCandidate
Callback method used by the ports created using the factory method createCallbackPort. | AbstractPortCandidateProvider | ||
[override]
Creates an enumeration of possibly port candidates. | ShapeGeometryPortCandidateProvider | ||
setPortOwner(value:IPortOwner):void
Sets the owner of the port candidate. | AbstractPortCandidateProvider |
Constant | Defined By | ||
---|---|---|---|
EMPTY : IPortCandidateProvider [static]
A generic implementation of the IPortCandidateProvider interface that provides
no candidates at all. | ShapeGeometryPortCandidateProvider |
addExistingPortsEnabled | property |
addExistingPortsEnabled:Boolean
Gets or sets a property that determines whether existing ports should be added to the list of ports
The default value is false
.
public function get addExistingPortsEnabled():Boolean
public function set addExistingPortsEnabled(value:Boolean):void
See also
minimumSegmentLength | property |
minimumSegmentLength:Number
Gets or sets the minimum length a segment needs to have in order to be used to add port candidates.
The default value is 10.0
.
public function get minimumSegmentLength():Number
public function set minimumSegmentLength(value:Number):void
ShapeGeometryPortCandidateProvider | () | Constructor |
public function ShapeGeometryPortCandidateProvider(portOwner:IPortOwner, ratios:Array = null)
Creates an instance that inserts a port candidate at the given ratios of each segment of the shape's path.
ParametersportOwner:IPortOwner | |
ratios:Array (default = null ) — The segment ratios at which to create port candidates.
If null , 0.5 is used.
|
createList | () | method |
protected function createList(context:IInputModeContext, owner:IPortOwner):Iterable
Creates the list of port candidates using the IShapeGeometry
obtained from the
owner
's lookup.
Parameters
context:IInputModeContext — The context in which the list is queried.
| |
owner:IPortOwner — The owner of the ports for which to create the list of candidates.
|
Iterable — A non-empty list of candidates.
|
getPortCandidates | () | method |
override protected function getPortCandidates(context:IInputModeContext):Iterable
Creates an enumeration of possibly port candidates.
This method is used as a callback by most of the getter methods in this class. Subclasses habe to override this method to provide the same candidates for all use-cases.
Parameters
context:IInputModeContext |
Iterable — An iterable collection of port candidates.
|
EMPTY | Constant |
public static const EMPTY:IPortCandidateProvider
A generic implementation of the IPortCandidateProvider
interface that provides
no candidates at all.