Line2D.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_GEOM_LINE2D_H
00002 #define JAVA_AWT_GEOM_LINE2D_H 1
00003 
00004 #ifndef JAVA_AWT_SHAPE_H
00005 #include <java_awt/Shape.h>
00006 #endif /* JAVA_AWT_SHAPE_H */
00007 #ifndef JAVA_AWT_GEOM_POINT2D_H
00008 #include <java_awt_geom/Point2D.h>
00009 #endif /* JAVA_AWT_GEOM_POINT2D_H */
00010 #ifndef JAVA_AWT_SPEC
00011 #include <java_awt/Spec.h>
00012 #endif /* JAVA_AWT_SPEC */
00013 
00014 namespace java {
00015   namespace awt {
00016     namespace geom {
00017 
00035       class JAVA_AWT_SPEC Line2D : virtual public Object /*Shape*/ {
00036 
00037       public:
00038 
00039         class Float;
00040         class Double;
00041 
00047         virtual jdouble getX1() const = 0;
00048 
00054         virtual jdouble getY1() const = 0;
00055 
00061         virtual jdouble getX2() const = 0;
00062 
00068         virtual jdouble getY2() const = 0;
00069 
00076         virtual Ref<Point2D> getP1() const = 0;
00077 
00084         virtual Ref<Point2D> getP2() const = 0;
00085 
00086       private:
00087 
00088         REGISTER_MEMBERS;
00089 
00090       };
00091 
00092       class JAVA_AWT_SPEC Line2D::Float : public Line2D {
00093 
00094       public:
00095 
00099         jfloat x1;
00100           
00104         jfloat y1;
00105 
00109         jfloat x2;
00110 
00114         jfloat y2;
00115 
00121         Float(jfloat x1 = 0, jfloat y1 = 0, jfloat x2 = 0, jfloat y2 = 0);
00122 
00128         Float(const Point2D& p1, const Point2D& p2);
00129 
00135         virtual jdouble getX1() const;
00136 
00142         virtual jdouble getY1() const;
00143 
00149         virtual jdouble getX2() const;
00150 
00156         virtual jdouble getY2() const;
00157 
00164         virtual Ref<Point2D> getP1() const;
00165 
00172         virtual Ref<Point2D> getP2() const;
00173 
00174       private:
00175 
00176         REGISTER_MEMBERS;
00177 
00178       };
00179 
00180       class JAVA_AWT_SPEC Line2D::Double : public Line2D {
00181 
00182       public:
00183 
00187         jdouble x1;
00188           
00192         jdouble y1;
00193 
00197         jdouble x2;
00198           
00202         jdouble y2;
00203 
00210         Double(jdouble x1 = 0, jdouble y1 = 0, jdouble x2 = 0, jdouble y2 = 0);
00211 
00217         Double(const Point2D& p1, const Point2D& p2);
00218 
00224         virtual jdouble getX1() const;
00225 
00231         virtual jdouble getY1() const;
00232 
00238         virtual jdouble getX2() const;
00239 
00245         virtual jdouble getY2() const;
00246 
00253         virtual Ref<Point2D> getP1() const;
00254 
00261         virtual Ref<Point2D> getP2() const;
00262 
00263       private:
00264 
00265         REGISTER_MEMBERS;
00266 
00267       };
00268 
00269     } // namespace geom
00270   } // namespace awt
00271 } // namespace java
00272 
00273 #endif /* JAVA_AWT_GEOM_LINE2D_H */

Generated on Fri May 16 11:54:43 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3