Packagecom.yworks.yfiles.layout
Classpublic class PortCandidateSet
InheritancePortCandidateSet Inheritance YObject Inheritance Object

This class describes a set of possible com.yworks.yfiles.layout.PortCandidate s and their cardinality for a node-like entity.

See also

com.yworks.yfiles.layout.PortCandidate


Public Properties
 PropertyDefined By
  connectionCount : int
[read-only] Returns the maximum number of connections this set allows or int.MAX_VALUE if the number is unbound.
PortCandidateSet
  entries : Iterator
[read-only] Returns an Iterator over the list of entries (com.yworks.yfiles.layout.PortCandidateSet_Entry).
PortCandidateSet
Public Methods
 MethodDefined By
  
PortCandidateSet(init:Boolean = true)
Creates a new and empty instance of PortCandidateSet
PortCandidateSet
  
Adds another PortCandidate with capacity 1 to the set of PortCandidates.
PortCandidateSet
  
addWithCapacity(p:PortCandidate, connections:int):void
Adds another PortCandidate with the given capacity to the set of candidates.
PortCandidateSet
  
Creates a CandidateMatcher instance that can be used to query entries (com.yworks.yfiles.layout.PortCandidateSet_Entry) from.
PortCandidateSet
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PortCandidateSet
 Inherited
hashCode():int
YObject
  
[static] Creates a new and empty instance of PortCandidateSet
PortCandidateSet
  
Removes the entry from the internal list of PortCandidate entries.
PortCandidateSet
Protected Methods
 MethodDefined By
  
getCost(entry:PortCandidateSet_Entry, edge:Edge, source:Boolean, xOffset:Number, yOffset:Number):Number
Calculates the cost for each entry for the given edge configuration.
PortCandidateSet
  
getPriority(entry:PortCandidateSet_Entry, edge:Edge, source:Boolean):Number
Returns the priority of the given entry.
PortCandidateSet
  
Initializes this object.
PortCandidateSet
Public Constants
 ConstantDefined By
  NODE_DP_KEY : Object = y.layout.PortCandidateSet.DP_KEY
[static] A com.yworks.yfiles.base.DataProvider key used to associate instances of this class with nodes in a graph.
PortCandidateSet
Property Detail
connectionCountproperty
connectionCount:int  [read-only]

Returns the maximum number of connections this set allows or int.MAX_VALUE if the number is unbound.


Implementation
    public function get connectionCount():int

See also

int.MAX_VALUE
entriesproperty 
entries:Iterator  [read-only]

Returns an Iterator over the list of entries (com.yworks.yfiles.layout.PortCandidateSet_Entry).


Implementation
    public function get entries():Iterator

See also

Constructor Detail
PortCandidateSet()Constructor
public function PortCandidateSet(init:Boolean = true)

Creates a new and empty instance of PortCandidateSet

Parameters
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.

See also

Method Detail
add()method
public function add(p:PortCandidate):void

Adds another PortCandidate with capacity 1 to the set of PortCandidates.

Parameters

p:PortCandidate — the candidate to add.

addWithCapacity()method 
public function addWithCapacity(p:PortCandidate, connections:int):void

Adds another PortCandidate with the given capacity to the set of candidates.

Parameters

p:PortCandidate — the candidate to add
 
connections:int — the maximum number of connections allowed to the candidate

createMatcher()method 
public function createMatcher():PortCandidateSet_CandidateMatcher

Creates a CandidateMatcher instance that can be used to query entries (com.yworks.yfiles.layout.PortCandidateSet_Entry) from.

Returns
PortCandidateSet_CandidateMatcher — a fresh matching instance that reflects the current state of this set of candidates.

See also

getClass()method 
override public function getClass():Class

Returns
Class
getCost()method 
protected function getCost(entry:PortCandidateSet_Entry, edge:Edge, source:Boolean, xOffset:Number, yOffset:Number):Number

Calculates the cost for each entry for the given edge configuration.

Parameters

entry:PortCandidateSet_Entry
 
edge:Edge
 
source:Boolean
 
xOffset:Number
 
yOffset:Number

Returns
Number
getPriority()method 
protected function getPriority(entry:PortCandidateSet_Entry, edge:Edge, source:Boolean):Number

Returns the priority of the given entry. The higher the priority the sooner it will be chosen by the com.yworks.yfiles.layout.PortCandidateSet_CandidateMatcher.

Parameters

entry:PortCandidateSet_Entry
 
edge:Edge
 
source:Boolean

Returns
Number

See also

initPortCandidateSet()method 
protected final function initPortCandidateSet():void

Initializes this object. See the documentation of the corresponding factory method newPortCandidateSet() for details.

See also

newPortCandidateSet()method 
public static function newPortCandidateSet():PortCandidateSet

Creates a new and empty instance of PortCandidateSet

Returns
PortCandidateSet

See also

remove()method 
public function remove(entry:PortCandidateSet_Entry):void

Removes the entry from the internal list of PortCandidate entries.

Parameters

entry:PortCandidateSet_Entry — the entry to remove from this set of candidates.

Constant Detail
NODE_DP_KEYConstant
public static const NODE_DP_KEY:Object = y.layout.PortCandidateSet.DP_KEY

A com.yworks.yfiles.base.DataProvider key used to associate instances of this class with nodes in a graph.

See also