|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--opale.tools.OpaleObject
|
+--opale.m2d.Object2D
|
+--opale.m2d.Point2D
Cette classe permet de satisfaire la convention appliquée dans OPALE, selon laquelle les classes de base des objets géométriques
s'appelent Nom et les classes graphiques GNom. Elles héritent de
Object2D et implémentent l'interface
Transformable.
| Field Summary | |
protected double |
x
|
protected double |
y
|
| Constructor Summary | |
Point2D()
Constructeur par défaut. |
|
Point2D(OIJ rep)
Initialise le point avec les coordonnées (0; 0) et un repère OIJ donné. |
|
Point2D(OIJ rep,
double x,
double y)
Construit et initialise le point avec les coordonnées x et y, et un repère donné. |
|
Point2D(Point2D p)
Le constructeur de copie. |
|
| Method Summary | |
void |
changeOIJ(OIJ rep)
Effectue un changement de repere du point. |
java.lang.Object |
clone()
Crée un nouvel objet de même classe et de même contenu. |
boolean |
equals(java.lang.Object obj)
Cette méthode teste si le point est égal à un objet passé en argument. |
double |
getX()
Renvoie la coordonnée x du point. |
double |
getY()
Renvoie la coordonnée y du point. |
void |
homothetie(Point2D A,
double k)
|
int |
readKeyWord(java.lang.String word,
java.io.StreamTokenizer f,
OpaleSet p)
Abstract method to read a key word in a file '*.ode'. |
void |
rotate(double theta)
Rotate l'objet graphique de l'angle theta autour de l'origine |
void |
rotate(double oriX,
double oriY,
double theta)
Rotate l'objet graphique de l'angle theta autour d'un point |
void |
setLocation(double x,
double y)
Fixe les coordonnées du point. |
void |
setLocation(Point2D p)
Fixe les coordonnées du point. |
java.lang.String |
toString()
Return a string representation of this object. |
void |
transform(AffineTransform2D t)
Transforms the object by a general transform AffineTransform. |
void |
translate(double dx,
double dy)
Translate l'objet graphique du vecteur(dx, dy). |
void |
writeMore(java.io.PrintWriter f,
OpaleSet p)
Write complementary information in a stream. |
| Methods inherited from class opale.m2d.Object2D |
getOIJ, read, setOIJ, write, xmax |
| Methods inherited from class opale.tools.OpaleObject |
getId, setId |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double x
protected double y
| Constructor Detail |
public Point2D()
public Point2D(OIJ rep)
OIJ - rep, le repère.
public Point2D(OIJ rep,
double x,
double y)
OIJ - rep, le repère.double - x, y les coordonnées.public Point2D(Point2D p)
Point2D - le point à copier.| Method Detail |
public final double getX()
public final double getY()
public final void setLocation(double x,
double y)
double - x, double y, les nouvelles coordonnées du point.public final void setLocation(Point2D p)
Point2D - p, les nouvelles coordonnées du point.
public void translate(double dx,
double dy)
Transformabletranslate in interface Transformableopale.m2d.Transformabledouble - dx,dy, coordonées du vecteur de translation.public void rotate(double theta)
Transformablerotate in interface Transformableopale.m2d.Transformabledouble - theta, l'angle de rotation en radian
public void rotate(double oriX,
double oriY,
double theta)
Transformablerotate in interface Transformableopale.m2d.Transformabledouble - oriX, double oriY, le centre de la rotationdouble - theta, l'angle de rotation en radianpublic void transform(AffineTransform2D t)
TransformableAffineTransform.transform in interface Transformableopale.m2d.TransformableAffineTransform, - the transform
public void homothetie(Point2D A,
double k)
public void changeOIJ(OIJ rep)
changeOIJ in class Object2DOIJ - rep, le nouveau repere.public java.lang.Object clone()
clone in class Object2DOutOfMemoryError - s'il n'y a pas assez de mémoire.Cloneablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject - obj un objet à comparer avec le point.true si l'objet à comparer est une instance de Point2D et
est égal au point courant; false sinon.public java.lang.String toString()
Object2DtoString in class Object2D
public void writeMore(java.io.PrintWriter f,
OpaleSet p)
throws InvalidFormatException
Object2DwriteMore in class Object2Dopale.m2d.Object2DWFile - f, the file in writing .
public int readKeyWord(java.lang.String word,
java.io.StreamTokenizer f,
OpaleSet p)
throws java.io.IOException,
InvalidFormatException
OpaleObjectreadKeyWord in class OpaleObjectopale.tools.OpaleObjectString - s, key word to read.StreamTokenizer - f, stream to read.OpaleSet - session, the group of 'Opale' object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||