tapestry.support.swing
Class TOval

java.lang.Object
  |
  +--tapestry.support.swing.TAnimator
        |
        +--tapestry.support.swing.TDrawable
              |
              +--tapestry.support.swing.TOval

public class TOval
extends TDrawable

A class that is an ellipse defined by a bounding rectangle.

Coordinates for a oval are as you would expect from cartesian geometry. (0,0) represents the center of container in which the Oval is drawn, with x-coordinates increasing to the right and y-coordinates increasing to the top of the container. Coordinates are given in pixel units.


Fields inherited from class tapestry.support.swing.TAnimator
DEFAULT_DELAY
 
Constructor Summary
TOval(int cx, int cy, int diameter)
          Creates a new TOval centered at position (cx, cy) with specified diameter (i.e., a circle).
TOval(int cx, int cy, int width, int height)
          Creates a new TOval centered at position (cx, cy) with specified width and height.
TOval(java.awt.Point center, java.awt.Dimension size)
          Creates a new TOval centered at position center with specified size.
 
Method Summary
 void drawFeature(java.awt.Graphics g, boolean isFilled)
           
 java.awt.Dimension getSize()
          Returns the shape's size.
 void setSize(int width, int height)
          Sets the shape's size.
 
Methods inherited from class tapestry.support.swing.TDrawable
act, draw, fill, getCenter, getColor, hide, move, outline, setCenter, setCenter, setColor, setContainer, setLineWidth, show
 
Methods inherited from class tapestry.support.swing.TAnimator
actionPerformed, dispose, getContainer, getCount, getDelay, init, isRunning, setDelay, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TOval

public TOval(int cx,
             int cy,
             int diameter)
Creates a new TOval centered at position (cx, cy) with specified diameter (i.e., a circle).
Parameters:
cx - center x coordinate of oval's enclosing box
cy - center y coordinate of oval's enclosing box
diameter - width and height of rectangular box enclosing oval

TOval

public TOval(int cx,
             int cy,
             int width,
             int height)
Creates a new TOval centered at position (cx, cy) with specified width and height.
Parameters:
cx - center x coordinate of oval's enclosing box
cy - center y coordinate of oval's enclosing box
width - width of rectangular box enclosing oval
height - height of rectangular box enclosing oval

TOval

public TOval(java.awt.Point center,
             java.awt.Dimension size)
Creates a new TOval centered at position center with specified size.
Parameters:
center - center point of oval's enclosing box
size - size of rectangular box enclosing oval
Method Detail

getSize

public java.awt.Dimension getSize()
Returns the shape's size.
Returns:
width and height of shape
Overrides:
getSize in class TDrawable

setSize

public void setSize(int width,
                    int height)
Sets the shape's size.
Parameters:
width - new width of shape
height - new height of shape
Overrides:
setSize in class TDrawable

drawFeature

public void drawFeature(java.awt.Graphics g,
                        boolean isFilled)
Overrides:
drawFeature in class TDrawable