net.sf.magicproject.modifier
Class PropertyModifier

java.lang.Object
  extended by net.sf.magicproject.modifier.Modifier
      extended by net.sf.magicproject.modifier.PropertyModifier
All Implemented Interfaces:
ObjectModifier, Unregisterable
Direct Known Subclasses:
ObjectPropertyModifier

public class PropertyModifier
extends Modifier

Since:
0.86 properties set is calculated as colors/idcard and register : they follow timestamp rule.
Author:
Fabrice Daugan

Field Summary
 
Fields inherited from class net.sf.magicproject.modifier.Modifier
layer, next
 
Method Summary
 void fillProperties(java.util.Set<java.lang.Integer> workSet)
          Add/remove the specified set by the manipulated propoerties of this modifier.
 boolean hasProperty(int propertyId, boolean found)
          Tells if this modifier add/remove the given property.
 boolean hasPropertyNotFromCreator(int propertyId, boolean found, MCard creator)
          Tells if this modifier add/remove the given property ignoring these given by the specified card creator.
 void refresh()
          Refresh this modifier following the whileCondition.
 void removeFromManager()
          Remove from the event manager this listener.
 Modifier removeModifier(Modifier modifier)
          remove from the manager a modifier
 
Methods inherited from class net.sf.magicproject.modifier.Modifier
addModifier, getCard, getNbObjects, paintObject, removeObject, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

removeModifier

public Modifier removeModifier(Modifier modifier)
Description copied from class: Modifier
remove from the manager a modifier

Parameters:
modifier - the modifier to remove
Returns:
the new chain

removeFromManager

public final void removeFromManager()
Description copied from interface: Unregisterable
Remove from the event manager this listener.

Specified by:
removeFromManager in interface Unregisterable
Overrides:
removeFromManager in class Modifier

hasProperty

public boolean hasProperty(int propertyId,
                           boolean found)
Tells if this modifier add/remove the given property.

Parameters:
propertyId - the matched property
found - indicates that the property has been previously found.
Returns:
true if this modifier add/remove the given property.

hasPropertyNotFromCreator

public boolean hasPropertyNotFromCreator(int propertyId,
                                         boolean found,
                                         MCard creator)
Tells if this modifier add/remove the given property ignoring these given by the specified card creator.

Parameters:
propertyId - the matched property
found - indicates that the property has been previously found
creator - is the card created modifiers would be ignored
Returns:
true if this modifier add/remove the given property ignoring these given by the specified card creator.

fillProperties

public void fillProperties(java.util.Set<java.lang.Integer> workSet)
Add/remove the specified set by the manipulated propoerties of this modifier.

Parameters:
workSet - the set of properties already found

refresh

public void refresh()
Description copied from class: Modifier
Refresh this modifier following the whileCondition.

Specified by:
refresh in class Modifier


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