|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsoftware.common.Cluster
public class Cluster
A cluster has a center of mass, is in a rectangle of coordonates ((xmin,ymin),(xmax,ymax)) and containes a number of points (different from the number of points in the rectangle) A cluster is only a wrapper around those values
| Constructor Summary | |
|---|---|
Cluster()
empty constructor |
|
Cluster(Cluster model)
Clones a current Cluster |
|
Cluster(java.awt.Color color,
java.awt.Color colorVariation,
double discountinuity)
cluster without a center of mass, only for colors (used in authoring) |
|
Cluster(org.w3c.dom.Node dotNode)
constructs a cluster from an xml node (many elements can be missing) |
|
| Method Summary | |
|---|---|
void |
affineTransform(java.awt.geom.AffineTransform affine)
|
Cluster |
clone()
Returns a new Cluster, with the same fields as this one |
double |
distance(Cluster c)
|
java.awt.geom.Point2D.Double |
getCenterOfMass()
|
java.awt.Color |
getColor()
|
java.awt.Color |
getColorVariation()
|
double |
getDiscountinuity()
|
java.lang.String |
getName()
|
org.w3c.dom.Element |
getNodeXY(org.w3c.dom.Document doc)
|
org.w3c.dom.Element |
getNodeXYFromTo(org.w3c.dom.Document doc)
|
double |
getNumberofPoints()
|
double |
getXmax()
|
double |
getXmin()
|
double |
getYmax()
|
double |
getYmin()
|
void |
rotate(java.awt.geom.Point2D.Double pivot,
double alpha)
rotates the center of mass |
void |
scale(double scalling)
scales the center of mass |
void |
setCenterOfMass(java.awt.geom.Point2D.Double centerOfMass)
|
void |
setColor(java.awt.Color color)
|
void |
setColorVariation(java.awt.Color colorVariation)
|
void |
setDiscountinuity(double discountinuity)
|
void |
setName(java.lang.String name)
|
void |
setNumberofPoints(double numberofPoints)
|
void |
setXmax(double xmax)
|
void |
setXmin(double xmin)
|
void |
setYmax(double ymax)
|
void |
setYmin(double ymin)
|
static java.lang.String |
toHex(java.awt.Color c)
|
java.lang.String |
toString()
An xml representation of the cluster |
java.lang.String |
toXMLString()
|
void |
translate(double tx,
double ty)
translates the center of mass |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Cluster()
public Cluster(Cluster model)
model -
public Cluster(java.awt.Color color,
java.awt.Color colorVariation,
double discountinuity)
color - colorVariation - discountinuity - public Cluster(org.w3c.dom.Node dotNode)
dotNode - | Method Detail |
|---|
public void affineTransform(java.awt.geom.AffineTransform affine)
affine - applies this affine transformation to all the geometrical elements of a clusterpublic void scale(double scalling)
scalling -
public void rotate(java.awt.geom.Point2D.Double pivot,
double alpha)
pivot - - the center of rotationalpha -
public void translate(double tx,
double ty)
tx - ty - public Cluster clone()
clone in class java.lang.Objectpublic double distance(Cluster c)
c -
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXMLString()
public java.awt.geom.Point2D.Double getCenterOfMass()
public void setCenterOfMass(java.awt.geom.Point2D.Double centerOfMass)
public double getNumberofPoints()
public void setNumberofPoints(double numberofPoints)
public double getXmax()
public void setXmax(double xmax)
public double getXmin()
public void setXmin(double xmin)
public double getYmax()
public void setYmax(double ymax)
public double getYmin()
public void setYmin(double ymin)
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.awt.Color getColorVariation()
public void setColorVariation(java.awt.Color colorVariation)
public double getDiscountinuity()
public void setDiscountinuity(double discountinuity)
public org.w3c.dom.Element getNodeXY(org.w3c.dom.Document doc)
public org.w3c.dom.Element getNodeXYFromTo(org.w3c.dom.Document doc)
public static java.lang.String toHex(java.awt.Color c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||