swingwt.awt
Class Rectangle

java.lang.Object
  extended byswingwt.awt.geom.RectangularShape
      extended byswingwt.awt.geom.Rectangle2D
          extended byswingwt.awt.Rectangle
All Implemented Interfaces:
java.lang.Cloneable, Shape

public class Rectangle
extends Rectangle2D
implements Shape


Nested Class Summary
 
Nested classes inherited from class swingwt.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float
 
Field Summary
 int height
           
 int width
           
 int x
           
 int y
           
 
Fields inherited from class swingwt.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
Rectangle()
           
Rectangle(Dimension d)
           
Rectangle(int width, int height)
           
Rectangle(int x, int y, int width, int height)
           
Rectangle(Point p)
           
Rectangle(Point p, Dimension d)
           
Rectangle(Rectangle r)
           
 
Method Summary
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
 boolean contains(int x, int y)
           
 boolean contains(int X, int Y, int W, int H)
           
 boolean contains(Point p)
           
 boolean contains(Point2D p)
           
 boolean contains(Rectangle r)
           
 boolean contains(Rectangle2D r)
           
 Rectangle2D createIntersection(Rectangle2D r)
           
 Rectangle2D createUnion(Rectangle2D r)
           
 boolean equals(java.lang.Object obj)
           
 Rectangle getBounds()
           
 Rectangle2D getBounds2D()
           
 double getHeight()
           
 Point getLocation()
           
 Dimension getSize()
           
 double getWidth()
           
 double getX()
           
 double getY()
           
 void grow(int h, int v)
           
 boolean inside(int X, int Y)
           
 Rectangle intersection(Rectangle r)
           
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(Rectangle r)
           
 boolean intersects(Rectangle2D r)
           
 boolean isEmpty()
           
 void move(int x, int y)
           
 int outcode(double x, double y)
           
 void reshape(int x, int y, int width, int height)
           
 void resize(int width, int height)
           
 void setBounds(int x, int y, int width, int height)
           
 void setBounds(Rectangle r)
           
 void setLocation(int x, int y)
           
 void setLocation(Point p)
           
 void setRect(double x, double y, double width, double height)
           
 void setSize(Dimension d)
           
 void setSize(int width, int height)
           
 java.lang.String toString()
           
 void translate(int x, int y)
           
 Rectangle union(Rectangle r)
           
 
Methods inherited from class swingwt.awt.geom.Rectangle2D
add, add, add, getPathIterator, getPathIterator, intersect, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class swingwt.awt.geom.RectangularShape
clone, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface swingwt.awt.Shape
getPathIterator, getPathIterator
 

Field Detail

x

public int x

y

public int y

width

public int width

height

public int height
Constructor Detail

Rectangle

public Rectangle()

Rectangle

public Rectangle(Rectangle r)

Rectangle

public Rectangle(int x,
                 int y,
                 int width,
                 int height)

Rectangle

public Rectangle(int width,
                 int height)

Rectangle

public Rectangle(Point p,
                 Dimension d)

Rectangle

public Rectangle(Point p)

Rectangle

public Rectangle(Dimension d)
Method Detail

getX

public double getX()
Specified by:
getX in class Rectangle2D

getY

public double getY()
Specified by:
getY in class Rectangle2D

getWidth

public double getWidth()
Specified by:
getWidth in class Rectangle2D

getHeight

public double getHeight()
Specified by:
getHeight in class Rectangle2D

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape
Overrides:
getBounds in class RectangularShape

getBounds2D

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

setBounds

public void setBounds(Rectangle r)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)

setRect

public void setRect(double x,
                    double y,
                    double width,
                    double height)
Specified by:
setRect in class Rectangle2D

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)

getLocation

public Point getLocation()

setLocation

public void setLocation(Point p)

setLocation

public void setLocation(int x,
                        int y)

move

public void move(int x,
                 int y)

translate

public void translate(int x,
                      int y)

getSize

public Dimension getSize()

setSize

public void setSize(Dimension d)

setSize

public void setSize(int width,
                    int height)

resize

public void resize(int width,
                   int height)

contains

public boolean contains(Point p)

contains

public boolean contains(int x,
                        int y)

contains

public boolean contains(Rectangle r)

contains

public boolean contains(int X,
                        int Y,
                        int W,
                        int H)

inside

public boolean inside(int X,
                      int Y)

intersects

public boolean intersects(Rectangle r)

intersection

public Rectangle intersection(Rectangle r)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in class Rectangle2D

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Rectangle2D

toString

public java.lang.String toString()

contains

public boolean contains(Rectangle2D r)
Specified by:
contains in interface Shape
Overrides:
contains in class RectangularShape

contains

public boolean contains(Point2D p)
Specified by:
contains in interface Shape
Overrides:
contains in class RectangularShape

contains

public boolean contains(double x,
                        double y)
Specified by:
contains in interface Shape
Overrides:
contains in class Rectangle2D

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Specified by:
contains in interface Shape
Overrides:
contains in class Rectangle2D

intersects

public boolean intersects(Rectangle2D r)
Specified by:
intersects in interface Shape
Overrides:
intersects in class RectangularShape

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Specified by:
intersects in interface Shape
Overrides:
intersects in class Rectangle2D

grow

public void grow(int h,
                 int v)

createIntersection

public Rectangle2D createIntersection(Rectangle2D r)
Specified by:
createIntersection in class Rectangle2D

union

public Rectangle union(Rectangle r)

createUnion

public Rectangle2D createUnion(Rectangle2D r)
Specified by:
createUnion in class Rectangle2D

outcode

public int outcode(double x,
                   double y)
Specified by:
outcode in class Rectangle2D