interfaces
Interface IShape

All Superinterfaces:
java.lang.Cloneable, IShapeDrawer
All Known Implementing Classes:
CircleShape, ColorDecorator, RectangleShape, ShapeDecorator, TriangleShape

public interface IShape
extends IShapeDrawer, java.lang.Cloneable

Interface for shape classes

Version:
1.0, 21-Mar-07
Author:
Prathab

Method Summary
 void changeShapeXYCoordinates(int x, int y)
          Changes the shape coordinates
 java.lang.Object clone()
          Perfroms the clone operation on the current object
 void drawShape(int x, int y)
          Draws the shape at the specified location
 java.awt.Color getColor()
          Get the color of the shape
 boolean IsPermanentShape()
          Return whether the shape is permanent
 void setAsPermanentShape(boolean isPermanent)
          To set the shape is permenant throught the application lifecycle
 void setColor(java.awt.Color color)
          Set the color for the shape
 
Methods inherited from interface interfaces.IShapeDrawer
drawShape, setCommandObject, setGraphicsObject
 

Method Detail

drawShape

void drawShape(int x,
               int y)
Draws the shape at the specified location

Parameters:
x - x-coordinate
y - y-coordinate

setAsPermanentShape

void setAsPermanentShape(boolean isPermanent)
To set the shape is permenant throught the application lifecycle

Parameters:
isPermanent - status of the shape

IsPermanentShape

boolean IsPermanentShape()
Return whether the shape is permanent

Returns:
true if shape is permanent

changeShapeXYCoordinates

void changeShapeXYCoordinates(int x,
                              int y)
Changes the shape coordinates

Parameters:
x - x-coordinate
y - y-coordinate

setColor

void setColor(java.awt.Color color)
Set the color for the shape

Parameters:
color - color of the shape
See Also:
Color

getColor

java.awt.Color getColor()
Get the color of the shape

Returns:
object of the shape

clone

java.lang.Object clone()
Perfroms the clone operation on the current object