|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.media.drawing.Shape
public abstract class Shape
Abstract base class for shapes.
TODO Add a lineStyle property (solid, dashed, dotted, etc.)? Or support a strokeDashArray property?
Nested Class Summary | |
---|---|
static class |
Shape.Rotate
Represents a rotation transformation. |
static class |
Shape.Scale
Reprensents a scale transformation. |
static class |
Shape.Transform
Interface encapsulating an affine transformation. |
class |
Shape.TransformSequence
Represents a sequence of affine transformations applied to this shape. |
static class |
Shape.Translate
Represents a translation transformation. |
Constructor Summary | |
---|---|
Shape()
|
Method Summary | |
---|---|
abstract void |
draw(Graphics2D graphics)
|
Bounds |
getBounds()
Returns the bounds of the shape. |
Paint |
getFill()
|
Point |
getOrigin()
|
Group |
getParent()
|
ListenerList<ShapeListener> |
getShapeListeners()
|
ListenerList<ShapeTransformListener> |
getShapeTransformListeners()
|
Paint |
getStroke()
|
int |
getStrokeThickness()
|
Bounds |
getTransformedBounds()
Returns the transformed bounds of the shape. |
Shape.TransformSequence |
getTransforms()
|
int |
getX()
|
int |
getY()
|
protected void |
invalidate()
|
protected boolean |
isValid()
|
boolean |
isVisible()
|
protected void |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds of the shape. |
void |
setFill(Paint fill)
|
void |
setFill(String fill)
|
void |
setOrigin(int x,
int y)
|
void |
setOrigin(Point origin)
|
protected void |
setParent(Group parent)
|
void |
setStroke(Paint stroke)
|
void |
setStroke(String stroke)
|
void |
setStrokeThickness(int strokeThickness)
|
void |
setVisible(boolean visible)
|
void |
setX(int x)
|
void |
setY(int y)
|
protected void |
update()
|
protected void |
update(Bounds bounds)
|
protected void |
update(int x,
int y,
int width,
int height)
|
protected void |
validate()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Shape()
Method Detail |
---|
public Group getParent()
protected void setParent(Group parent)
public int getX()
public void setX(int x)
public int getY()
public void setY(int y)
public Point getOrigin()
public void setOrigin(int x, int y)
public void setOrigin(Point origin)
public Bounds getBounds()
protected void setBounds(int x, int y, int width, int height)
x
- y
- width
- height
- public Bounds getTransformedBounds()
public Paint getFill()
public void setFill(Paint fill)
public final void setFill(String fill)
public Paint getStroke()
public void setStroke(Paint stroke)
public final void setStroke(String stroke)
public int getStrokeThickness()
public void setStrokeThickness(int strokeThickness)
public boolean isVisible()
public void setVisible(boolean visible)
public abstract void draw(Graphics2D graphics)
public Shape.TransformSequence getTransforms()
protected void invalidate()
protected void validate()
protected boolean isValid()
protected final void update()
protected final void update(Bounds bounds)
protected void update(int x, int y, int width, int height)
public ListenerList<ShapeListener> getShapeListeners()
public ListenerList<ShapeTransformListener> getShapeTransformListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |