net.sf.magicproject.modifier
Class ObjectFactory

java.lang.Object
  extended by net.sf.magicproject.modifier.ObjectFactory

public final class ObjectFactory
extends java.lang.Object

Since:
0.85
Author:
Fabrice Daugan

Method Summary
static int getNbObject(java.lang.String objectName, MCard onCard, Test objectTest)
          Return occurences number of the given object with the given name.
static net.sf.magicproject.modifier.ObjectColorModifierModel getObjectColorModifierModel(java.lang.String name)
          Return the named color modifier madel.
static net.sf.magicproject.modifier.ObjectIdCardModifierModel getObjectIdCardModifierModel(java.lang.String name)
          Return the named type modifier madel.
static ObjectModifierModel getObjectModifierModel(java.lang.String objectName)
          Return object corresponding to the given name.
static java.awt.Image getObjectPicture(java.lang.String objectName)
          Return picture of the given object.
static net.sf.magicproject.modifier.ObjectPropertyModifierModel getObjectPropertyModifierModel(java.lang.String name)
          Return the named property modifier madel.
static net.sf.magicproject.modifier.ObjectRegisterModifierModel getObjectRegisterModifierModel(java.lang.String name)
          Return the named register modifier madel.
static void init(java.io.InputStream dbStream)
          Read the available objects.
static void removeObjectModifier(java.lang.String objectName, MCard fromCard, Test objectTest)
          Remove if can, one instance of given object with the specified name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getObjectModifierModel

public static ObjectModifierModel getObjectModifierModel(java.lang.String objectName)
Return object corresponding to the given name.

Parameters:
objectName - the object's name.
Returns:
object corresponding to the given name.

getNbObject

public static int getNbObject(java.lang.String objectName,
                              MCard onCard,
                              Test objectTest)
Return occurences number of the given object with the given name.

Parameters:
objectName - the object's name.
objectTest - The test applied on specific modifier to be removed.
onCard - the card on which objects will be counted.
Returns:
occurences number of this object attached to the given card.

getObjectPicture

public static java.awt.Image getObjectPicture(java.lang.String objectName)
Return picture of the given object.

Parameters:
objectName - the object's name
Returns:
picture of the given object.

removeObjectModifier

public static void removeObjectModifier(java.lang.String objectName,
                                        MCard fromCard,
                                        Test objectTest)
Remove if can, one instance of given object with the specified name.

Parameters:
objectName - the object to remove.
fromCard - the card the object will be removed from.
objectTest - The test applied on specific modifier to be removed.

init

public static void init(java.io.InputStream dbStream)
                 throws java.io.IOException
Read the available objects.

Parameters:
dbStream - the mdb stream's header.
Throws:
java.io.IOException - error during the mdb stream read.

getObjectRegisterModifierModel

public static net.sf.magicproject.modifier.ObjectRegisterModifierModel getObjectRegisterModifierModel(java.lang.String name)
Return the named register modifier madel.

Parameters:
name - the modifier name.
Returns:
the named register modifier madel.

getObjectIdCardModifierModel

public static net.sf.magicproject.modifier.ObjectIdCardModifierModel getObjectIdCardModifierModel(java.lang.String name)
Return the named type modifier madel.

Parameters:
name - the modifier name.
Returns:
the named type modifier madel.

getObjectColorModifierModel

public static net.sf.magicproject.modifier.ObjectColorModifierModel getObjectColorModifierModel(java.lang.String name)
Return the named color modifier madel.

Parameters:
name - the modifier name.
Returns:
the named color modifier madel.

getObjectPropertyModifierModel

public static net.sf.magicproject.modifier.ObjectPropertyModifierModel getObjectPropertyModifierModel(java.lang.String name)
Return the named property modifier madel.

Parameters:
name - the modifier name.
Returns:
the named property modifier madel.


Copyright © 2003-2007 Magic-Project. All Rights Reserved.