| Package | com.yworks.graph.model |
| Class | public class DefaultPortCandidate |
| Implements | IPortCandidate |
IPortCandidate.
Subclasses need to override createInstance if they
don't set a port instance or don't want client code
to create the port for them.
| Property | Defined by | ||
|---|---|---|---|
| location : IPoint
Gets or set the absolute location in the world coordinate system
that shall be used for the port.
| DefaultPortCandidate | ||
| owner : IPortOwner
Gets or sets the owner of the port to be created.
| DefaultPortCandidate | ||
| type : uint
Gets or set the type of this candidate.
| DefaultPortCandidate | ||
| valid : Boolean
Determines whether this candidate is valid depending on the context it has
been obtained from.
| DefaultPortCandidate | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new instance.
| DefaultPortCandidate | ||
|
[static]
Creates a candidate using the given port as the template.
| DefaultPortCandidate | ||
|
Returns the instance provided to the constructor or to the setter
| DefaultPortCandidate | ||
|
Returns the instance provided to the constructor or to the setter.
| DefaultPortCandidate | ||
|
setInstance(port:IPort):void
Sets the instance that will be returned by
getInstance and createInstance. | DefaultPortCandidate | ||
| location | property |
location:IPoint [read-write]Gets or set the absolute location in the world coordinate system that shall be used for the port.
Implementation public function get location():IPoint
public function set location(value:IPoint):void
| owner | property |
owner:IPortOwner [read-write]Gets or sets the owner of the port to be created.
Implementation public function get owner():IPortOwner
public function set owner(value:IPortOwner):void
| type | property |
type:uint [read-write]Gets or set the type of this candidate.
The interpretation of this value is implementation dependent and may be used for visual feedback or interactive behavior.
Implementation public function get type():uint
public function set type(value:uint):void
| valid | property |
valid:Boolean [read-write]Determines whether this candidate is valid depending on the context it has been obtained from.
Implementation public function get valid():Boolean
public function set valid(value:Boolean):void
| DefaultPortCandidate | () | constructor |
public function DefaultPortCandidate(owner:IPortOwner, location:IPoint = null)Creates a new instance.
Parametersowner:IPortOwner — The port owner.
|
|
location:IPoint (default = null) — the location. If null, the first port of the owner is used.
|
See also
| create | () | method |
public static function create(port:IPort):DefaultPortCandidateCreates a candidate using the given port as the template.
Parametersport:IPort — The port to use as template.
|
DefaultPortCandidate |
| createInstance | () | method |
public function createInstance():IPortReturns the instance provided to the constructor or to the setter
ReturnsIPort —
The port instance to use if this candidate has been chosen. This method may return null to
indicate that the client should create an appropriate port itself.
|
| getInstance | () | method |
public function getInstance():IPortReturns the instance provided to the constructor or to the setter.
ReturnsIPort —
The instance to use or null otherwise.
|
See also
| setInstance | () | method |
public function setInstance(port:IPort):void
Sets the instance that will be returned by getInstance and createInstance.
port:IPort — A port that already exists in the graph or null.
|