| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinterfaces.CommandColleague
classes.shapes.TriangleShape
public class TriangleShape
Class for trianlge shape objects
| Field Summary | |
|---|---|
|  boolean | isPermanentShape | 
|  ShapeCoordinates | shapeCoordinates | 
| Fields inherited from class interfaces.CommandColleague | 
|---|
| commandMediator | 
| Constructor Summary | |
|---|---|
| TriangleShape(ShapeCoordinates shapeCoordinates,
              ICommandMediator commandMediator)Initializes with the deafult shape coordinates and mediator object | |
| Method Summary | |
|---|---|
|  void | accept(IShapeVisitor shapeVisitor)Accepts the visitor and execute its method | 
|  void | changeShapeXYCoordinates(int x,
                         int y)Relocate the shape at external specified location | 
|  java.lang.Object | clone()Creates clone of the object | 
|  void | drawShape()Draws the Trinagle This method acts as proxy to draw the shape. | 
|  void | drawShape(int x,
          int y)Draws the shape at the 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 ShapeCoordinates shapeCoordinates
public boolean isPermanentShape
| Constructor Detail | 
|---|
public TriangleShape(ShapeCoordinates shapeCoordinates,
                     ICommandMediator commandMediator)
ShapeCoordinates, 
ICommandMediator| Method Detail | 
|---|
public void drawShape()
drawShape in interface IShapeDrawerIShapeDrawer.drawShape(), 
Commandpublic 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(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 java.lang.Object clone()
clone in interface IShapeclone in class java.lang.ObjectIShape.clone()public void setColor(java.awt.Color color)
setColor in interface IShapecolor - color of the shapeIShape.setColor(java.awt.Color)public java.awt.Color getColor()
getColor in interface IShapeIShape.getColor()public void accept(IShapeVisitor shapeVisitor)
accept in interface IVisitableshapeVisitor - the shapeVisitor object to be acceptedIVisitable.accept(interfaces.IShapeVisitor)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||