|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tapestry.support.swing.TAnimator | +--tapestry.support.swing.TDrawable
An abstract class that represents any shape that can be drawn. You cannot create a TDrawable directly, but can use it to refer to what is common among several shapes.
Fields inherited from class tapestry.support.swing.TAnimator |
DEFAULT_DELAY |
Constructor Summary | |
TDrawable(java.awt.Point center)
Creates a drawable shape centered at point center contained in the applet's canvas. |
|
TDrawable(java.awt.Point center,
TCanvas canvas)
Creates a drawable shape centered at point center contained in canvas. |
Method Summary | |
void |
act()
By default, shapes do nothing. |
void |
draw(java.awt.Graphics g)
|
abstract void |
drawFeature(java.awt.Graphics g,
boolean isFilled)
|
void |
fill()
Display the shape as filled in when drawn. |
java.awt.Point |
getCenter()
Returns the shape's center. |
java.awt.Color |
getColor()
Get the color of the shape when drawn. |
abstract java.awt.Dimension |
getSize()
Returns the shape's size. |
void |
hide()
|
void |
move(int dx,
int dy)
Moves the shape's center point by specified amnount. |
void |
outline()
Display the shape as outlined when drawn. |
void |
setCenter(int x,
int y)
Sets the shape's center to the given point. |
void |
setCenter(java.awt.Point p)
Sets the shape's center to the given point. |
void |
setColor(java.awt.Color color)
Display the shape in specified color when drawn. |
void |
setContainer(TCanvas canvas)
|
void |
setLineWidth(double width)
|
abstract void |
setSize(int width,
int height)
Sets the shape's size. |
void |
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 |
public TDrawable(java.awt.Point center, TCanvas canvas)
center
- center point of drawable shapecanvas
- container for drawable shapepublic TDrawable(java.awt.Point center)
center
- center point of drawable shapeMethod Detail |
public void act()
public abstract java.awt.Dimension getSize()
public abstract void setSize(int width, int height)
width
- new width of shapeheight
- new height of shapepublic java.awt.Point getCenter()
public void setCenter(java.awt.Point p)
center
- new center point of shapepublic void setCenter(int x, int y)
x
- new x-coordinate of shapey
- new x-coordinate of shapepublic void fill()
public void outline()
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- new color of shapepublic void setLineWidth(double width)
public void move(int dx, int dy)
dx
- distance to move horizontallydy
- distance to move verticallypublic void show()
public void hide()
public void draw(java.awt.Graphics g)
public abstract void drawFeature(java.awt.Graphics g, boolean isFilled)
public void setContainer(TCanvas canvas)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |