swingwt.awt.geom
Class Rectangle2D

java.lang.Object
  extended byswingwt.awt.geom.RectangularShape
      extended byswingwt.awt.geom.Rectangle2D
All Implemented Interfaces:
java.lang.Cloneable, Shape
Direct Known Subclasses:
Rectangle, Rectangle2D.Double, Rectangle2D.Float

public abstract class Rectangle2D
extends RectangularShape


Nested Class Summary
static class Rectangle2D.Double
           
static class Rectangle2D.Float
           
 
Field Summary
static int OUT_BOTTOM
           
static int OUT_LEFT
           
static int OUT_RIGHT
           
static int OUT_TOP
           
 
Constructor Summary
protected Rectangle2D()
           
 
Method Summary
 void add(double newx, double newy)
           
 void add(Point2D pt)
           
 void add(Rectangle2D r)
           
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
abstract  Rectangle2D createIntersection(Rectangle2D r)
           
abstract  Rectangle2D createUnion(Rectangle2D r)
           
 boolean equals(java.lang.Object obj)
           
 Rectangle2D getBounds2D()
           
abstract  double getHeight()
           
 PathIterator getPathIterator(AffineTransform at)
           
 PathIterator getPathIterator(AffineTransform at, double flatness)
           
abstract  double getWidth()
           
abstract  double getX()
           
abstract  double getY()
           
static void intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)
           
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersectsLine(double x1, double y1, double x2, double y2)
           
 boolean intersectsLine(Line2D l)
           
abstract  boolean isEmpty()
           
abstract  int outcode(double x, double y)
           
 int outcode(Point2D p)
           
 void setFrame(double x, double y, double w, double h)
           
abstract  void setRect(double x, double y, double w, double h)
           
 void setRect(Rectangle2D r)
           
static void union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)
           
 
Methods inherited from class swingwt.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUT_LEFT

public static final int OUT_LEFT
See Also:
Constant Field Values

OUT_TOP

public static final int OUT_TOP
See Also:
Constant Field Values

OUT_RIGHT

public static final int OUT_RIGHT
See Also:
Constant Field Values

OUT_BOTTOM

public static final int OUT_BOTTOM
See Also:
Constant Field Values
Constructor Detail

Rectangle2D

protected Rectangle2D()
Method Detail

setRect

public abstract void setRect(double x,
                             double y,
                             double w,
                             double h)

setRect

public void setRect(Rectangle2D r)

intersectsLine

public boolean intersectsLine(double x1,
                              double y1,
                              double x2,
                              double y2)

intersectsLine

public boolean intersectsLine(Line2D l)

outcode

public abstract int outcode(double x,
                            double y)

outcode

public int outcode(Point2D p)

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Specified by:
setFrame in class RectangularShape

getBounds2D

public Rectangle2D getBounds2D()
Specified by:
getBounds2D in interface Shape
Specified by:
getBounds2D in class RectangularShape

contains

public boolean contains(double x,
                        double y)

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)

createIntersection

public abstract Rectangle2D createIntersection(Rectangle2D r)

intersect

public static void intersect(Rectangle2D src1,
                             Rectangle2D src2,
                             Rectangle2D dest)

createUnion

public abstract Rectangle2D createUnion(Rectangle2D r)

union

public static void union(Rectangle2D src1,
                         Rectangle2D src2,
                         Rectangle2D dest)

add

public void add(double newx,
                double newy)

add

public void add(Point2D pt)

add

public void add(Rectangle2D r)

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Specified by:
getPathIterator in interface Shape
Specified by:
getPathIterator in class RectangularShape

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Specified by:
getPathIterator in interface Shape
Overrides:
getPathIterator in class RectangularShape

equals

public boolean equals(java.lang.Object obj)

getHeight

public abstract double getHeight()
Specified by:
getHeight in class RectangularShape

getWidth

public abstract double getWidth()
Specified by:
getWidth in class RectangularShape

getX

public abstract double getX()
Specified by:
getX in class RectangularShape

getY

public abstract double getY()
Specified by:
getY in class RectangularShape

isEmpty

public abstract boolean isEmpty()
Specified by:
isEmpty in class RectangularShape