|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgrafica.GPointsArray
public class GPointsArray
Array of points class.
| Constructor Summary | |
|---|---|
GPointsArray()
Constructor |
|
GPointsArray(ArrayList<PVector> vectors)
Constructor |
|
GPointsArray(float[] x,
float[] y)
Constructor |
|
GPointsArray(float[] x,
float[] y,
String[] labels)
Constructor |
|
GPointsArray(GPoint[] points)
Constructor |
|
GPointsArray(GPointsArray points)
Constructor |
|
GPointsArray(int initialSize)
Constructor |
|
GPointsArray(PVector[] vectors)
Constructor |
|
GPointsArray(PVector[] vectors,
String[] labels)
Constructor |
|
| Method Summary | |
|---|---|
void |
add(ArrayList<PVector> vectors)
Adds a new set of points to the array |
void |
add(float[] x,
float[] y)
Adds a new set of points to the array |
void |
add(float[] x,
float[] y,
String[] labels)
Adds a new set of points to the array |
void |
add(float x,
float y)
Adds a new point to the array |
void |
add(float x,
float y,
String label)
Adds a new point to the array |
void |
add(GPoint point)
Adds a new point to the array |
void |
add(GPoint[] pts)
Adds a new set of points to the array |
void |
add(GPointsArray pts)
Adds a new set of points to the array |
void |
add(int index,
float x,
float y)
Adds a new point to the array |
void |
add(int index,
float x,
float y,
String label)
Adds a new point to the array |
void |
add(int index,
GPoint point)
Adds a new point to the array |
void |
add(int index,
PVector v)
Adds a new point to the array |
void |
add(int index,
PVector v,
String label)
Adds a new point to the array |
void |
add(PVector v)
Adds a new point to the array |
void |
add(PVector[] vectors)
Adds a new set of points to the array |
void |
add(PVector[] vectors,
String[] labels)
Adds a new set of points to the array |
void |
add(PVector v,
String label)
Adds a new point to the array |
GPoint |
get(int index)
Returns a given point in the array |
String |
getLabel(int index)
Returns the text label of a point in the array |
GPoint |
getLastPoint()
Returns the latest point added to the array |
int |
getNPoints()
Returns the total number of points in the array |
boolean |
getValid(int index)
Returns if a point in the array is valid or not |
float |
getX(int index)
Returns the x coordinate of a point in the array |
float |
getY(int index)
Returns the y coordinate of a point in the array |
boolean |
isValid(int index)
Returns if a point in the array is valid or not |
void |
remove(int index)
Removes one of the points in the array |
void |
removeInvalidPoints()
Removes invalid points from the array |
void |
removeRange(int fromIndex,
int toIndex)
Removes a range of points in the array |
void |
set(GPointsArray pts)
Sets all the points in the array |
void |
set(int index,
float x,
float y,
String label)
Sets the x and y coordinates of a specific point in the array |
void |
set(int index,
GPoint point)
Sets the x and y coordinates and the label of a point with those from another point |
void |
set(int index,
PVector v,
String label)
Sets the x and y coordinates of a specific point in the array |
void |
setLabel(int index,
String label)
Sets the text label of a specific point in the array |
void |
setNPoints(int nPoints)
Sets the total number of points in the array |
void |
setX(int index,
float x)
Sets the x coordinate of a specific point in the array |
void |
setXY(int index,
float x,
float y)
Sets the x and y coordinates of a specific point in the array |
void |
setXY(int index,
PVector v)
Sets the x and y coordinates of a specific point in the array |
void |
setY(int index,
float y)
Sets the y coordinate of a specific point in the array |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPointsArray()
public GPointsArray(int initialSize)
initialSize - the initial estimate for the size of the arraypublic GPointsArray(GPoint[] points)
points - an array of pointspublic GPointsArray(GPointsArray points)
points - an array of points
public GPointsArray(float[] x,
float[] y,
String[] labels)
x - the points x coordinatesy - the points y coordinateslabels - the points text labels
public GPointsArray(float[] x,
float[] y)
x - the points x coordinatesy - the points y coordinates
public GPointsArray(PVector[] vectors,
String[] labels)
vectors - an array of Processing vectors with the points x and y
coordinateslabels - the points text labelspublic GPointsArray(PVector[] vectors)
vectors - an array of Processing vectors with the points x and y
coordinatespublic GPointsArray(ArrayList<PVector> vectors)
vectors - an arrayList of Processing vectors with the points x and y
coordinates| Method Detail |
|---|
public void add(GPoint point)
point - the point
public void add(float x,
float y,
String label)
x - the point x coordinatey - the point y coordinatelabel - the point text label
public void add(float x,
float y)
x - the point x coordinatey - the point y coordinate
public void add(PVector v,
String label)
v - the Processing vector with the point x and y coordinateslabel - the point text labelpublic void add(PVector v)
v - the Processing vector with the point x and y coordinates
public void add(int index,
GPoint point)
index - the point positionpoint - the point
public void add(int index,
float x,
float y,
String label)
index - the point positionx - the point x coordinatey - the point y coordinatelabel - the point text label
public void add(int index,
float x,
float y)
index - the point positionx - the point x coordinatey - the point y coordinate
public void add(int index,
PVector v,
String label)
index - the point positionv - the Processing vector with the point x and y coordinateslabel - the point text label
public void add(int index,
PVector v)
index - the point positionv - the Processing vector with the point x and y coordinatespublic void add(GPoint[] pts)
pts - the new set of pointspublic void add(GPointsArray pts)
pts - the new set of points
public void add(float[] x,
float[] y,
String[] labels)
x - the points x coordinatesy - the points y coordinateslabels - the points text labels
public void add(float[] x,
float[] y)
x - the points x coordinatesy - the points y coordinates
public void add(PVector[] vectors,
String[] labels)
vectors - the Processing vectors with the points x and y coordinateslabels - the points text labelspublic void add(PVector[] vectors)
vectors - the Processing vectors with the points x and y coordinatespublic void add(ArrayList<PVector> vectors)
vectors - the Processing vectors with the points x and y coordinatespublic void remove(int index)
index - the point index.
public void removeRange(int fromIndex,
int toIndex)
fromIndex - the lower point index.toIndex - the end point index.public void removeInvalidPoints()
public void set(GPointsArray pts)
pts - the new points. The number of points could differ from the
original.
public void set(int index,
GPoint point)
index - the point index. If the index equals the array size, it will
add a new point to the array.point - the point to use
public void set(int index,
float x,
float y,
String label)
index - the point index. If the index equals the array size, it will
add a new point to the array.x - the point new x coordinatey - the point new y coordinatelabel - the point new text label
public void set(int index,
PVector v,
String label)
index - the point index. If the index equals the array size, it will
add a new point to the array.v - the Processing vector with the point new x and y coordinateslabel - the point new text label
public void setX(int index,
float x)
index - the point indexx - the point new x coordinate
public void setY(int index,
float y)
index - the point indexy - the point new y coordinate
public void setXY(int index,
float x,
float y)
index - the point indexx - the point new x coordinatey - the point new y coordinate
public void setXY(int index,
PVector v)
index - the point indexv - the Processing vector with the point new x and y coordinates
public void setLabel(int index,
String label)
index - the point indexlabel - the point new text labelpublic void setNPoints(int nPoints)
nPoints - the new total number of points in the array. It should be
smaller than the current number.public int getNPoints()
public GPoint get(int index)
index - the point index in the array
public float getX(int index)
index - the point index in the array
public float getY(int index)
index - the point index in the array
public String getLabel(int index)
index - the point index in the array
public boolean getValid(int index)
index - the point index in the array
public boolean isValid(int index)
index - the point index in the array
public GPoint getLastPoint()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||