Packagecom.yworks.graph.model
Classpublic class BendList
InheritanceBendList Inheritance Object
Implements IBendList, IControlPoints, Collection

A simple implementation of a list of IBends.

This implementation is backed by a com.yworks.support.List.



Public Properties
 PropertyDefined By
  controlPoints : IControlPoints
[read-only] Provides a live IControlPointList view over the bends in this list.
BendList
  count : uint
[read-only] Returns the number of elements in this collection.
BendList
Public Methods
 MethodDefined By
  
BendList(bends:List = null)
Creates a new BendList.
BendList
  
add(index:uint, bend:IBend):void
Inserts a new bend into the list.
BendList
  
addAll(iter:Iterable):void
Adds all of the elements in the specified collection to this collection (optional operation).
BendList
  
addItem(item:Object):Boolean
Adds the specified item to this collection.
BendList
  
bendAt(index:int):IBend
Returns the IBend at position index in this list.
BendList
  
clear():void
Removes all of the elements from this collection.
BendList
  
contains(item:Object):Boolean
Returns true if this collection contains the specified element.
BendList
  
getItemAt(index:int):Object
Returns the element at the specified position in this collection.
BendList
  
getPointAt(index:uint):IPoint
Returns the i-th point in the list.
BendList
  
isEmpty():Boolean
Returns true if this collection contains no elements.
BendList
  
Returns an iterator over a set of elements.
BendList
  
length():uint
Returns The number of bends in the list.
BendList
  
remove(bend:IBend):void
Removes a bend from the list.
BendList
  
removeAt(index:uint):void
Removes a bend at the given index from the list.
BendList
  
removeItem(item:Object):Boolean
Removes a single instance of the specified element from this collection, if it is present (optional operation).
BendList
  
toArray():Array
Returns an array containing all of the elements in this collection.
BendList
Property Detail
controlPointsproperty
controlPoints:IControlPoints  [read-only]

Provides a live IControlPointList view over the bends in this list.

This is especially convenient for geometric operations, that don't necessarily know how to deal with bends.


Implementation
    public function get controlPoints():IControlPoints
countproperty 
count:uint  [read-only]

Returns the number of elements in this collection.


Implementation
    public function get count():uint
Constructor Detail
BendList()Constructor
public function BendList(bends:List = null)

Creates a new BendList.

Parameters
bends:List (default = null) — A List to create the BendList from.
Method Detail
add()method
public function add(index:uint, bend:IBend):void

Inserts a new bend into the list.

Parameters

index:uint — The index to insert the bend at.
 
bend:IBend — The bend to insert.

addAll()method 
public function addAll(iter:Iterable):void

Adds all of the elements in the specified collection to this collection (optional operation).

Parameters

iter:Iterable — the collection containing elements to be added to this collection

addItem()method 
public function addItem(item:Object):Boolean

Adds the specified item to this collection. Returns true if this collection changed as a result of the call. (Returns false if this collection does not permit duplicates and already contains the specified element.)

Parameters

item:Object — element whose presence in this collection is to be ensured

Returns
Boolean — true if this collection changed as a result of the call
bendAt()method 
public function bendAt(index:int):IBend

Returns the IBend at position index in this list.

Parameters

index:int — The index of the bend

Returns
IBend — The bend at the given index.
clear()method 
public function clear():void

Removes all of the elements from this collection. The collection will be empty after this method returns.

contains()method 
public function contains(item:Object):Boolean

Returns true if this collection contains the specified element.

Parameters

item:Object — element whose presence in this collection is to be tested

Returns
Boolean — true if this collection contains the specified element
getItemAt()method 
public function getItemAt(index:int):Object

Returns the element at the specified position in this collection.

Parameters

index:int — the index of the element to return

Returns
Object — the element at the specified position in this list
getPointAt()method 
public function getPointAt(index:uint):IPoint

Returns the i-th point in the list.

Parameters

index:uint — The zero-based index of the item in this list

Returns
IPoint — The item for the given index
isEmpty()method 
public function isEmpty():Boolean

Returns true if this collection contains no elements.

Returns
Boolean — true if this collection contains no elements
iterator()method 
public function iterator():Iterator

Returns an iterator over a set of elements.

Returns
Iterator — an Iterator.
length()method 
public function length():uint

Returns The number of bends in the list.

Returns
uint — The number of bends in the List.
remove()method 
public function remove(bend:IBend):void

Removes a bend from the list.

Parameters

bend:IBend — The bend to remove.

removeAt()method 
public function removeAt(index:uint):void

Removes a bend at the given index from the list.

Parameters

index:uint — The index of the bend to remove.

removeItem()method 
public function removeItem(item:Object):Boolean

Removes a single instance of the specified element from this collection, if it is present (optional operation).

Parameters

item:Object — element to be removed from this collection, if present

Returns
Boolean — true if an element was removed as a result of this call
toArray()method 
public function toArray():Array

Returns an array containing all of the elements in this collection.

Returns
Array — an array containing all of the elements in this collection