Packagecom.yworks.graph.model
Classpublic class DefaultBend
InheritanceDefaultBend Inheritance AbstractModelItem Inheritance Object
Implements IBend, ITagOwner

A simple mutable implementation of the IBend interface that can be used stand-alone.



Public Properties
 PropertyDefined By
  location : IPoint
DefaultBend
  owner : IEdge
[read-only] Returns the edge this bend instance belongs to.
DefaultBend
  tag : Object
Gets or sets the tag associated with this instance.
DefaultBend
  x : Number
[read-only] Gets the current x coordinate of this point.
DefaultBend
  y : Number
[read-only] Gets the current y coordinate of this point.
DefaultBend
Protected Properties
 PropertyDefined By
 Inherited_lookupMap : IMapper
The map which is used by registerLookup() to store instances in.
AbstractModelItem
Public Methods
 MethodDefined By
  
DefaultBend(owner:IEdge, location:IPoint = null, lookup:ILookup = null)
Creates a new bend using the given owner and a default location.
DefaultBend
 Inherited
Returns the currently set ILookup delegate.
AbstractModelItem
  
lookup(type:Class):Object
[override] Returns an instance that implements the given type or null.
DefaultBend
 Inherited
registerLookup(type:Class, instance:Object):void
Register an implementation for the given type that should be returned when lookup is called with this given type.
AbstractModelItem
 Inherited
Sets the ILookup implementation used for lookup calls on this instance.
AbstractModelItem
  
toString():String
DefaultBend
Property Detail
locationproperty
location:IPoint


Implementation
    public function get location():IPoint
    public function set location(value:IPoint):void
ownerproperty 
owner:IEdge  [read-only]

Returns the edge this bend instance belongs to.

This implies that owner.bends contains this instance.


Implementation
    public function get owner():IEdge
tagproperty 
tag:Object

Gets or sets the tag associated with this instance.

The implementation itself does not normally depend on the tag associated with it. It serves as storage for the object only.


Implementation
    public function get tag():Object
    public function set tag(value:Object):void
xproperty 
x:Number  [read-only]

Gets the current x coordinate of this point.

Depending on context the values returned may change over time.


Implementation
    public function get x():Number
yproperty 
y:Number  [read-only]

Gets the current y coordinate of this point.

Depending on context the values returned may change over time.


Implementation
    public function get y():Number
Constructor Detail
DefaultBend()Constructor
public function DefaultBend(owner:IEdge, location:IPoint = null, lookup:ILookup = null)

Creates a new bend using the given owner and a default location.

Parameters
owner:IEdge — The edge to create the bend on.
 
location:IPoint (default = null) — The location of the new bend.
 
lookup:ILookup (default = null) — The lookup delegate used by lookup(). If null, a DefaultBendLookup instance is used.
Method Detail
lookup()method
override public function lookup(type:Class):Object

Returns an instance that implements the given type or null.

Typically, this method will be called in order to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile time constraints. An instance implementing this method is not required to return non-null implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.

Parameters

type:Class — the type for which an instance shall be returned

Returns
Object — an instance that is assignable to type or null
toString()method 
public function toString():String

Returns
String