|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinterfaces.ShapeDecorator
public abstract class ShapeDecorator
Decorates the IShape object
IShape
Field Summary | |
---|---|
IShape |
shape
|
Constructor Summary | |
---|---|
ShapeDecorator(IShape shape)
|
Method Summary | |
---|---|
void |
changeShapeXYCoordinates(int x,
int y)
Relocate the shape at external specified location |
java.lang.Object |
clone()
Create clone of the object |
void |
decorateShape()
Decorate the shape. |
void |
drawShape()
Draws the shape based on the operations stored in command object |
void |
drawShape(int x,
int y)
Draws the shape at the external specified location |
java.awt.Color |
getColor()
Returns the color attribute for the shape |
boolean |
IsPermanentShape()
Return whether the shape is permanent |
void |
setAsPermanentShape(boolean isPermanent)
Sets whether the shape is permanent or tempory with respect to drawing |
void |
setColor(java.awt.Color color)
Sets the color attribute for the shape |
void |
setCommandObject(Command command)
Set the Command object which contains the commands to draw the shape |
void |
setGraphicsObject(java.awt.Graphics g)
Set the Graphics object which is responsible to draw the graphics |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IShape shape
Constructor Detail |
---|
public ShapeDecorator(IShape shape)
Method Detail |
---|
public void setGraphicsObject(java.awt.Graphics g)
setGraphicsObject
in interface IShapeDrawer
g
- Graphics object to be setIShapeDrawer.setGraphicsObject(java.awt.Graphics)
public void setCommandObject(Command command)
setCommandObject
in interface IShapeDrawer
command
- Command object to setIShapeDrawer.setCommandObject(types.Command)
public void drawShape()
drawShape
in interface IShapeDrawer
IShapeDrawer.drawShape()
public void drawShape(int x, int y)
drawShape
in interface IShape
x
- x-coordinatey
- y-coordinateIShape.drawShape(int, int)
public void changeShapeXYCoordinates(int x, int y)
changeShapeXYCoordinates
in interface IShape
x
- x-coordinatey
- y-coordinateIShape.drawShape(int, int)
public void setAsPermanentShape(boolean isPermanent)
setAsPermanentShape
in interface IShape
isPermanent
- status of the shapeIShape.setAsPermanentShape(boolean)
public boolean IsPermanentShape()
IsPermanentShape
in interface IShape
IShape.IsPermanentShape()
public void setColor(java.awt.Color color)
setColor
in interface IShape
color
- color to be setIShape.setColor(java.awt.Color)
public java.awt.Color getColor()
getColor
in interface IShape
IShape.getColor()
public java.lang.Object clone()
clone
in interface IShape
clone
in class java.lang.Object
IShape.clone()
public void decorateShape()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |