pivot.wtk.media.drawing
Class Rectangle

java.lang.Object
  extended by pivot.wtk.media.drawing.Shape
      extended by pivot.wtk.media.drawing.Rectangle
All Implemented Interfaces:
Visual

public class Rectangle
extends Shape

Shape representing a rectangle.

Author:
gbrown

Constructor Summary
Rectangle()
           
 
Method Summary
 boolean contains(int x, int y)
          TODO Subclasses should override this method to perform an inverse transformation and map to the untransformed coordinate space.
 int getHeight()
          Returns the visual's height.
 Dimensions getSize()
           
 int getWidth()
          Returns the visual's width.
 void paint(java.awt.Graphics2D graphics)
          Paints the visual.
 void setHeight(int height)
           
 void setSize(Dimensions size)
           
 void setSize(int width, int height)
           
 void setWidth(int width)
           
 
Methods inherited from class pivot.wtk.media.drawing.Shape
getBounds, getFill, getOrigin, getParent, getRotation, getScaleX, getScaleY, getStroke, getStrokeThickness, getTransform, getTranslateX, getTranslateY, getX, getY, setFill, setFill, setOrigin, setOrigin, setParent, setRotation, setScaleX, setScaleY, setStroke, setStroke, setStrokeThickness, setTranslateX, setTranslateY, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle()
Method Detail

getWidth

public int getWidth()
Description copied from interface: Visual
Returns the visual's width.


setWidth

public void setWidth(int width)

getHeight

public int getHeight()
Description copied from interface: Visual
Returns the visual's height.


setHeight

public void setHeight(int height)

getSize

public Dimensions getSize()

setSize

public void setSize(int width,
                    int height)

setSize

public void setSize(Dimensions size)

paint

public void paint(java.awt.Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Parameters:
graphics - The graphics context in which to paint the visual.

contains

public boolean contains(int x,
                        int y)
Description copied from class: Shape
TODO Subclasses should override this method to perform an inverse transformation and map to the untransformed coordinate space.

Specified by:
contains in class Shape