Package | com.yworks.canvas.geom |
Class | public class ArrayControlPoints |
Inheritance | ArrayControlPoints Object |
Implements | IMutableControlPoints |
ArrayList
based implementation of mutable IControlPoints.
Property | Defined By | ||
---|---|---|---|
count : uint [read-only]
Returns the number of elements in this collection. | ArrayControlPoints |
Method | Defined By | ||
---|---|---|---|
ArrayControlPoints(points:Iterator = null)
Creates an instance from the given points iterator. | ArrayControlPoints | ||
Adds a point to the list at the given index using the provided coordinates. | ArrayControlPoints | ||
clear():void
Removes all points from this list. | ArrayControlPoints | ||
getMutablePoint(index:uint):IMutablePoint
Returns a mutable view of one of the point in this list. | ArrayControlPoints | ||
getPointAt(index:uint):IPoint
Returns the i-th point in the list. | ArrayControlPoints | ||
Returns an iterator over the points in the list. | ArrayControlPoints | ||
remove(index:uint):void
Removes the point at the given index. | ArrayControlPoints | ||
setLocation(index:uint, x:Number, y:Number):void
Sets the coordinates of a point in the list. | ArrayControlPoints |
Method | Defined By | ||
---|---|---|---|
createPoint(x:Number, y:Number):IPoint
Factory method that creates a new point for the given coordinates. | ArrayControlPoints |
count | property |
count:uint
[read-only] Returns the number of elements in this collection.
public function get count():uint
ArrayControlPoints | () | Constructor |
public function ArrayControlPoints(points:Iterator = null)
Creates an instance from the given points iterator.
Parameterspoints:Iterator (default = null ) — The points to include in the collection.
|
add | () | method |
public function add(index:uint, x:Number, y:Number):IPoint
Adds a point to the list at the given index using the provided coordinates.
Parameters
index:uint — The index the point should be insterted at.
| |
x:Number — The x coordinate of the newly created point.
| |
y:Number — The y coordinate of the newly created point.
|
IPoint — The point created.
|
clear | () | method |
public function clear():void
Removes all points from this list.
createPoint | () | method |
protected function createPoint(x:Number, y:Number):IPoint
Factory method that creates a new point for the given coordinates.
Parameters
x:Number — The x coordinate of the point to create.
| |
y:Number — The y coordinate of the point to create.
|
IPoint — A newly created point with the given coordinates.
|
getMutablePoint | () | method |
public function getMutablePoint(index:uint):IMutablePoint
Returns a mutable view of one of the point in this list.
Parameters
index:uint — The index of the point to return.
|
IMutablePoint — A IMutablePoint view of the point in the 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
|
IPoint — The item for the given index
|
iterator | () | method |
public function iterator():Iterator
Returns an iterator over the points in the list.
ReturnsIterator |
remove | () | method |
public function remove(index:uint):void
Removes the point at the given index.
Parameters
index:uint — The index of the point to remove.
|
setLocation | () | method |
public function setLocation(index:uint, x:Number, y:Number):void
Sets the coordinates of a point in the list.
Parameters
index:uint — The index of the point to set the coordinates.
| |
x:Number — The new x coordinate.
| |
y:Number — The new y coordinate.
|