net.sf.magicproject.modifier
Class ObjectRegisterModifier

java.lang.Object
  extended by net.sf.magicproject.modifier.Modifier
      extended by net.sf.magicproject.modifier.RegisterModifier
          extended by net.sf.magicproject.modifier.ObjectRegisterModifier
All Implemented Interfaces:
ObjectModifier, Unregisterable

public class ObjectRegisterModifier
extends RegisterModifier

Since:
0.85
Author:
Fabrice Daugan

Field Summary
 
Fields inherited from class net.sf.magicproject.modifier.Modifier
layer, next
 
Method Summary
 int getNbObjects(java.lang.String objectName, Test objectTest)
          Return occurences number of the given object with the given name.
 int paintObject(java.awt.Graphics g, int startX, int startY)
          Paint all objects of the given MCard component.
 Modifier removeObject(java.lang.String objectName, Test objectTest)
          remove from the manager a occurence of object with the specified name
 
Methods inherited from class net.sf.magicproject.modifier.RegisterModifier
getValue, refresh, removeFromManager, removeModifier
 
Methods inherited from class net.sf.magicproject.modifier.Modifier
addModifier, getCard, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

removeObject

public Modifier removeObject(java.lang.String objectName,
                             Test objectTest)
Description copied from interface: ObjectModifier
remove from the manager a occurence of object with the specified name

Specified by:
removeObject in interface ObjectModifier
Overrides:
removeObject in class Modifier
Parameters:
objectName - the object's name to remove
objectTest - The test applied on specific modifier to be removed.
Returns:
the new chain

paintObject

public int paintObject(java.awt.Graphics g,
                       int startX,
                       int startY)
Description copied from interface: ObjectModifier
Paint all objects of the given MCard component.

Specified by:
paintObject in interface ObjectModifier
Overrides:
paintObject in class Modifier
Parameters:
g - the graphics used ot paint this object.
startX - the x position where this object can be paint.
startY - the y position where this object can be paint.
Returns:
the next free object position.

getNbObjects

public int getNbObjects(java.lang.String objectName,
                        Test objectTest)
Description copied from interface: ObjectModifier
Return occurences number of the given object with the given name.

Specified by:
getNbObjects in interface ObjectModifier
Overrides:
getNbObjects in class Modifier
Parameters:
objectName - the object's name to find within this chain.
objectTest - The test applied on specific modifier to be removed.
Returns:
occurences number of the given object with the given name.


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