public class DecoratorObject extends PhysObject
Modifier and Type | Field and Description |
---|---|
(package private) PhysObject |
component |
env, twoPI
Constructor and Description |
---|
DecoratorObject(PhysObject decoratedObject,
String name,
Shape shape) |
DecoratorObject(PhysObject decoratedObject,
String name,
Shape shape,
Color color,
boolean persistent) |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D g)
Draws this object (it's shape with the fill color) on the graphics surface.
|
double |
getAngle() |
long |
getX() |
long |
getY() |
int |
getZOrder() |
static Color |
makeAlphaColor(int color,
int alpha) |
void |
replace(String header,
byte[] buffer) |
allowMovement, compareTo, equals, exit, getAngleDeg, getColor, getName, getShape, getShowHeader, getWidth, hasExited, isAnimated, isCliff, isCorporeal, isLabeled, isMovable, isPaint, isPersistent, isVWall, moveTo, normalizeAngle, processMouseEvent, processMouseMoveEvent, replace, setAnimated, setCliff, setColor, setCorporeal, setLabeled, setMovable, setName, setPaint, setPersistent, setShape, setVWall, setZOrder, show, toString
PhysObject component
public DecoratorObject(PhysObject decoratedObject, String name, Shape shape, Color color, boolean persistent) throws Exception
name
- shape
- color
- persistent
- animated
- Exception
public DecoratorObject(PhysObject decoratedObject, String name, Shape shape) throws Exception
name
- shape
- Exception
public void replace(String header, byte[] buffer)
replace
in class PhysObject
public int getZOrder()
getZOrder
in class PhysObject
public void draw(Graphics2D g)
PhysObject
draw
in class PhysObject
g
- the graphics surface to draw to.public long getX()
getX
in class PhysObject
public long getY()
getY
in class PhysObject
public double getAngle()
getAngle
in class PhysObject
public static Color makeAlphaColor(int color, int alpha)