|
||||||||||
| 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 IShapeDrawerg - Graphics object to be setIShapeDrawer.setGraphicsObject(java.awt.Graphics)public void setCommandObject(Command command)
setCommandObject in interface IShapeDrawercommand - Command object to setIShapeDrawer.setCommandObject(types.Command)public void drawShape()
drawShape in interface IShapeDrawerIShapeDrawer.drawShape()
public void drawShape(int x,
int y)
drawShape in interface IShapex - x-coordinatey - y-coordinateIShape.drawShape(int, int)
public void changeShapeXYCoordinates(int x,
int y)
changeShapeXYCoordinates in interface IShapex - x-coordinatey - y-coordinateIShape.drawShape(int, int)public void setAsPermanentShape(boolean isPermanent)
setAsPermanentShape in interface IShapeisPermanent - status of the shapeIShape.setAsPermanentShape(boolean)public boolean IsPermanentShape()
IsPermanentShape in interface IShapeIShape.IsPermanentShape()public void setColor(java.awt.Color color)
setColor in interface IShapecolor - color to be setIShape.setColor(java.awt.Color)public java.awt.Color getColor()
getColor in interface IShapeIShape.getColor()public java.lang.Object clone()
clone in interface IShapeclone in class java.lang.ObjectIShape.clone()public void decorateShape()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||