classes.shapes
Class RedRectangleFactory

java.lang.Object
  extended by classes.shapes.RedRectangleFactory
All Implemented Interfaces:
IShapeAbstractFactory

public class RedRectangleFactory
extends java.lang.Object
implements IShapeAbstractFactory

Factory class for the Colored Shape objects

Version:
1.0, 06-Apr-07
Author:
Prathab, Mukesh

Constructor Summary
RedRectangleFactory()
           
 
Method Summary
 IShape getAbstractShape(java.lang.String shapeName, java.lang.Object object, ShapeCoordinates shapeCoordinates, ICommandMediator commandMediator)
          Creates a red rectangular shape (demonstrate Abstract Factory pattern)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedRectangleFactory

public RedRectangleFactory()
Method Detail

getAbstractShape

public IShape getAbstractShape(java.lang.String shapeName,
                               java.lang.Object object,
                               ShapeCoordinates shapeCoordinates,
                               ICommandMediator commandMediator)
Creates a red rectangular shape (demonstrate Abstract Factory pattern)

Specified by:
getAbstractShape in interface IShapeAbstractFactory
Parameters:
shapeName - name of the shape
object - object(abstract) required to make shape
shapeCoordinates - default coordinates of the shape
commandMediator - command meditor to interact with other classes
Returns:
new ColorDecorator object (of IShape type)
See Also:
IShapeAbstractFactory.getAbstractShape(java.lang.String, java.lang.Object, types.ShapeCoordinates, interfaces.ICommandMediator), ShapeCoordinates, ICommandMediator