com.tensegrity.composite.event.group
Class GroupCompositeOrderChangeEvent

java.lang.Object
  extended bycom.tensegrity.composite.event.group.AbstractCompositeGroupEvent
      extended bycom.tensegrity.composite.event.group.GroupCompositeOrderChangeEvent
All Implemented Interfaces:
CompositeGroupEvent, CompositeRootEvent

public class GroupCompositeOrderChangeEvent
extends AbstractCompositeGroupEvent

A GroupCompositeOrderChangeEvent occurs whenever the internal order of BaseComposite objects changes within a CompositeGroup.

Version:
$Id$
Author:
MKegel
See Also:
CompositeGroupEvent, CompositeGroupListener

Field Summary
 
Fields inherited from class com.tensegrity.composite.event.group.AbstractCompositeGroupEvent
composite, compositeGroup, composites
 
Constructor Summary
GroupCompositeOrderChangeEvent(CompositeGroup compositeGroup, java.util.List composites, java.util.Map composite2PrecursorOld, java.util.Map composite2PrecursorNew)
          Constructor for GroupCompositeOrderChangeEvent.
 
Method Summary
 java.util.List getComposites()
          Returns the List of BaseComposite objects which have caused the change in the order.
 BaseComposite getPrecursorNew(BaseComposite basecomposite)
          Returns the new predecessor of the given BaseComposite object or null in case the given BaseComposite object is either the first one in the internal order or is not part of the List returned by getComposites().
 BaseComposite getPrecursorOld(BaseComposite basecomposite)
          Returns the old predecessor of the given BaseComposite object or null in case the given BaseComposite object was either the first one in the internal order or is not part of the List returned by getComposites().
 
Methods inherited from class com.tensegrity.composite.event.group.AbstractCompositeGroupEvent
getCompositeGroup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupCompositeOrderChangeEvent

public GroupCompositeOrderChangeEvent(CompositeGroup compositeGroup,
                                      java.util.List composites,
                                      java.util.Map composite2PrecursorOld,
                                      java.util.Map composite2PrecursorNew)
Constructor for GroupCompositeOrderChangeEvent.

Parameters:
compositeGroup - the CompositeGroup this event should be raised for
composites - the List of BaseComposite objects which have caused the change in the order
Method Detail

getComposites

public final java.util.List getComposites()
Returns the List of BaseComposite objects which have caused the change in the order.

Returns:
List the List of BaseComposite objects which caused the change in the order

getPrecursorOld

public final BaseComposite getPrecursorOld(BaseComposite basecomposite)
Returns the old predecessor of the given BaseComposite object or null in case the given BaseComposite object was either the first one in the internal order or is not part of the List returned by getComposites().

Returns:
BaseComposite the old predecessor or null

getPrecursorNew

public final BaseComposite getPrecursorNew(BaseComposite basecomposite)
Returns the new predecessor of the given BaseComposite object or null in case the given BaseComposite object is either the first one in the internal order or is not part of the List returned by getComposites().

Returns:
BaseComposite the new predecessor or null


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.