Packagecom.yworks.graph.model
Interfacepublic interface IArrow
Implementors DefaultArrow

The interface for the visual representation of an arrow that is normally used to decorate the visual representation of an IEdge.

Instances of this class are used by IEdgeStyle implementations.



Public Properties
 PropertyDefined By
  cropLength : Number
[read-only] Gets the cropping length associated with this instance.
IArrow
  length : Number
[read-only] Returns the length of the arrow, i.e.
IArrow
Public Methods
 MethodDefined By
  
getBoundsProvider(edge:IEdge, atSource:Boolean, anchor:IPoint, direction:IPoint):IBoundsProvider
Gets an IBoundsProvider implementation that can yield this arrow's bounds if painted the given location using the given direction for the given edge.
IArrow
  
getDisplayObjectCreator(edge:IEdge, atSource:Boolean, anchor:IPoint, direction:IPoint):IDisplayObjectCreator
Gets an implementation of IDisplayObjectCreator that will create the display object for the arrow.
IArrow
Property Detail
cropLengthproperty
cropLength:Number  [read-only]

Gets the cropping length associated with this instance.

This value is used by IEdgeStyle implementations to let the edge appear to end shortly before it's actual target.


Implementation
    public function get cropLength():Number
lengthproperty 
length:Number  [read-only]

Returns the length of the arrow, i.e. the distance from the arrows tip to the position where the visual representation of the edge's path should begin.


Implementation
    public function get length():Number
Method Detail
getBoundsProvider()method
public function getBoundsProvider(edge:IEdge, atSource:Boolean, anchor:IPoint, direction:IPoint):IBoundsProvider

Gets an IBoundsProvider implementation that can yield this arrow's bounds if painted the given location using the given direction for the given edge.

Parameters

edge:IEdge — The edge this arrow belongs to
 
atSource:Boolean — Whether this will be the source arrow
 
anchor:IPoint — The anchor point for the tip of the arrow
 
direction:IPoint — The direction the arrow is pointing in

Returns
IBoundsProvider — An implementation of the IBoundsProvider interface that can subsequently be used to query the bounds. Clients will always call this method before using the implementation and may not cache the instance returned. This allows for applying the flyweight design pattern to implementations.
getDisplayObjectCreator()method 
public function getDisplayObjectCreator(edge:IEdge, atSource:Boolean, anchor:IPoint, direction:IPoint):IDisplayObjectCreator

Gets an implementation of IDisplayObjectCreator that will create the display object for the arrow.

This method may always return the same instance. By contract, clients will not cache instances returned, but will always call this method before the methods on the instance will be called.

This contract enables the use of the fly-weight design pattern. Implementations of this class can always return the same instance and configure this instance upon each call to this method.

Parameters

edge:IEdge — The edge this arrow belongs to
 
atSource:Boolean — Whether this will be the source arrow
 
anchor:IPoint — The anchor point for the tip of the arrow
 
direction:IPoint — The direction the arrow is pointing in

Returns
IDisplayObjectCreator — An implementation of the IDisplayObjectCreator interface that can subsequently be used to perform the actual painting.