|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinterfaces.CommandColleague
classes.container.ShapeContainer
public class ShapeContainer
Holds the Shape class object
CommandColleague| Field Summary | |
|---|---|
int |
CONTAINER_SIZE
|
boolean |
isPermanentShape
|
int |
NO_OF_COLS
|
int |
NO_OF_ROWS
|
ShapeCoordinates |
shapeCoordinates
|
IShape[] |
shapeList
|
| Fields inherited from class interfaces.CommandColleague |
|---|
commandMediator |
| Constructor Summary | |
|---|---|
ShapeContainer(ShapeCoordinates shapeCoordinates,
ICommandMediator commandMediator)
Initializes with shapecoordinates and mediator object |
|
| Method Summary | |
|---|---|
boolean |
addShape(IShape shape)
Adds the given shape object to container |
void |
drawShape()
Draws the container by encapuslating the drawing information using Command object. |
IShape |
getShape(int index)
Returns the shape object for the given index |
boolean |
removeShape(IShape shape)
Removes the given shape from the container |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ShapeCoordinates shapeCoordinates
public IShape[] shapeList
public int CONTAINER_SIZE
public int NO_OF_ROWS
public int NO_OF_COLS
public boolean isPermanentShape
| Constructor Detail |
|---|
public ShapeContainer(ShapeCoordinates shapeCoordinates,
ICommandMediator commandMediator)
ShapeCoordinates,
ICommandMediator| Method Detail |
|---|
public void drawShape()
drawShape in interface IShapeContainerpublic boolean addShape(IShape shape)
addShape in interface IShapeContainershape - shape to be added
public boolean removeShape(IShape shape)
removeShape in interface IShapeContainershape - shape to be removed
public IShape getShape(int index)
getShape in interface IShapeContainerindex - index to be retrieved in the ShapeList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||