org.argouml.model
Class AbstractUmlHelperDecorator

java.lang.Object
  extended byorg.argouml.model.AbstractUmlHelperDecorator
All Implemented Interfaces:
UmlHelper
Direct Known Subclasses:
UndoUmlHelperDecorator

public abstract class AbstractUmlHelperDecorator
extends Object
implements UmlHelper

An abstract Decorator for the UmlHelper.


Constructor Summary
AbstractUmlHelperDecorator(UmlHelper component)
           
 
Method Summary
 void addListenersToModel(Object model)
          Ensures that all of the elements in a model are registered to the UmlModelListener.
 void deleteCollection(Collection col)
          Utility method to quickly delete a collection of modelelements.
 Object getDestination(Object relationship)
          Returns the destination of some relationship.
 Object getOwner(Object handle)
          Returns the owner of some modelelement object.
 Object getSource(Object relationship)
          Returns the source of some relationship.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUmlHelperDecorator

public AbstractUmlHelperDecorator(UmlHelper component)
Parameters:
component - The component to decorate.
Method Detail

addListenersToModel

public void addListenersToModel(Object model)
Description copied from interface: UmlHelper
Ensures that all of the elements in a model are registered to the UmlModelListener. This is useful when the MModel is not created by the UmlFactory.

Specified by:
addListenersToModel in interface UmlHelper
Parameters:
model - the UML model
See Also:
UmlHelper.addListenersToModel(java.lang.Object)

getOwner

public Object getOwner(Object handle)
Description copied from interface: UmlHelper
Returns the owner of some modelelement object. In most cases this will be the owning namespace but in some cases it will be null (the root model) or for instance the owning class with an attribute.

Specified by:
getOwner in interface UmlHelper
Parameters:
handle - the modelelement
Returns:
Object the owner
See Also:
UmlHelper.getOwner(java.lang.Object)

deleteCollection

public void deleteCollection(Collection col)
Description copied from interface: UmlHelper
Utility method to quickly delete a collection of modelelements. This method should only be called from within the model component. The only reason it is public is that the other helpers/factories are in other packages and therefore cannot see this method if it is not public.

Specified by:
deleteCollection in interface UmlHelper
Parameters:
col - a collection of modelelements
See Also:
UmlHelper.deleteCollection(java.util.Collection)

getSource

public Object getSource(Object relationship)
Description copied from interface: UmlHelper
Returns the source of some relationship. This is the element in binary relations from which a relation 'departs'.

Specified by:
getSource in interface UmlHelper
Parameters:
relationship - the relationship to be tested
Returns:
the source of the relationship
See Also:
UmlHelper.getSource(java.lang.Object)

getDestination

public Object getDestination(Object relationship)
Description copied from interface: UmlHelper
Returns the destination of some relationship. This is the element in binary relations at which a relation 'arrives'.

Specified by:
getDestination in interface UmlHelper
Parameters:
relationship - the relationship to be tested
Returns:
the destination of the relationship
See Also:
UmlHelper.getDestination(java.lang.Object)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook