opale.m2d
Class GPoint2D

java.lang.Object
  |
  +--opale.tools.OpaleObject
        |
        +--opale.m2d.Object2D
              |
              +--opale.m2d.Point2D
                    |
                    +--opale.m2d.GPoint2D
All Implemented Interfaces:
java.lang.Cloneable, GObject2D, Transformable

public class GPoint2D
extends Point2D
implements GObject2D, java.lang.Cloneable

Cette classe représente un point du plan Elle contient plusieurs méthodes utiles pour la géométrie euclidienne

Since:
Opale-2d 0.1

Fields inherited from class opale.m2d.Point2D
x, y
 
Constructor Summary
GPoint2D()
          Constructeur par défaut.
GPoint2D(GPoint2D p)
          Le constructeur de copie
GPoint2D(OIJ rep)
          Construit et initialise le point avec les coordonnées (0; 0) et avec les informations par défaut.
GPoint2D(OIJ rep, double x, double y)
          Construit et initialise le point avec les coordonnées (x; y) et avec les informations par défaut.
GPoint2D(Point2D p)
          Construit et initialise le point à partir d'un Point2D et avec les informations par défaut.
 
Method Summary
 java.lang.Object clone()
          Crée un nouvel objet de même classe et de même contenu.
 void draw(Pen2D c)
          Methode indiquant la procedure de dessin des objets de la classe
 InfoObject getInfo()
          Renvoie les infos de l'instance
 int readKeyWord(java.lang.String word, java.io.StreamTokenizer f, OpaleSet p)
          Abstract method to read a key word in a file '*.ode'.
 void setMarktype(MarkType mt)
          Set the mark type of the points.
 void writeMore(java.io.PrintWriter f, OpaleSet p)
          Write complementary information in a stream.
 
Methods inherited from class opale.m2d.Point2D
changeOIJ, equals, getX, getY, homothetie, rotate, rotate, setLocation, setLocation, toString, transform, translate
 
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
 
Methods inherited from interface opale.m2d.GObject2D
toString
 

Constructor Detail

GPoint2D

public GPoint2D()
Constructeur par défaut.

GPoint2D

public GPoint2D(OIJ rep)
Construit et initialise le point avec les coordonnées (0; 0) et avec les informations par défaut.
Parameters:
OIJ - rep, le repère.

GPoint2D

public GPoint2D(OIJ rep,
                double x,
                double y)
Construit et initialise le point avec les coordonnées (x; y) et avec les informations par défaut.
Parameters:
OIJ - rep, le repère.
double - x,y les coordonnées du point.

GPoint2D

public GPoint2D(Point2D p)
Construit et initialise le point à partir d'un Point2D et avec les informations par défaut.
Parameters:
Point2D - p le point

GPoint2D

public GPoint2D(GPoint2D p)
Le constructeur de copie
Parameters:
Point2D - p, le point à copier
Method Detail

draw

public void draw(Pen2D c)
Description copied from interface: GObject2D
Methode indiquant la procedure de dessin des objets de la classe
Specified by:
draw in interface GObject2D
Following copied from interface: opale.m2d.GObject2D
Parameters:
Pen2D - crayon, le crayon pour dessiner en 2D dans un repere2D

getInfo

public InfoObject getInfo()
Description copied from interface: GObject2D
Renvoie les infos de l'instance
Specified by:
getInfo in interface GObject2D
Following copied from interface: opale.m2d.GObject2D
Returns:
InfoObjet, info sur l'objet

clone

public java.lang.Object clone()
Crée un nouvel objet de même classe et de même contenu.
Specified by:
clone in interface GObject2D
Overrides:
clone in class Point2D
Returns:
Object un clone de l'objet.
Throws:
OutOfMemoryError - s'il n'y a pas assez de mémoire.
See Also:
Cloneable

readKeyWord

public int readKeyWord(java.lang.String word,
                       java.io.StreamTokenizer f,
                       OpaleSet p)
                throws java.io.IOException,
                       InvalidFormatException
Description copied from class: OpaleObject
Abstract method to read a key word in a file '*.ode'.
Overrides:
readKeyWord in class Point2D
Following copied from class: opale.tools.OpaleObject
Parameters:
String - s, key word to read.
StreamTokenizer - f, stream to read.
OpaleSet - session, the group of 'Opale' object
Returns:
int, 0 if the key word is correct, -1 otherwise.

writeMore

public void writeMore(java.io.PrintWriter f,
                      OpaleSet p)
               throws InvalidFormatException
Description copied from class: Object2D
Write complementary information in a stream.
Overrides:
writeMore in class Point2D
Following copied from class: opale.m2d.Object2D
Parameters:
WFile - f, the file in writing .

setMarktype

public void setMarktype(MarkType mt)
Set the mark type of the points.
Since:
Opale-2d 0.15