org.argouml.uml.diagram
Interface Relocatable

All Known Implementing Classes:
UMLActivityDiagram, UMLClassDiagram, UMLCollaborationDiagram, UMLDeploymentDiagram, UMLDiagram, UMLSequenceDiagram, UMLSequenceDiagram, UMLStateDiagram, UMLUseCaseDiagram

public interface Relocatable

Interface which is used by the Explorer to determine if a diagram can change its location to a new model element.


Method Summary
 java.util.Collection getRelocationCandidates(java.lang.Object root)
          Create a collection of candidate modelelements to relocate this diagram to.
 boolean isRelocationAllowed(java.lang.Object base)
          This function should return true if it is allowed to relocate this type of diagram to the given modelelement.
 boolean relocate(java.lang.Object base)
          Relocate this diagram, e.g.
 

Method Detail

isRelocationAllowed

boolean isRelocationAllowed(java.lang.Object base)
This function should return true if it is allowed to relocate this type of diagram to the given modelelement.

Parameters:
base - the given modelelement
Returns:
true if adding a diagram here is allowed

relocate

boolean relocate(java.lang.Object base)
Relocate this diagram, e.g. for a class diagram assign it a new namespace, e.g. for a statechart move it together with the statemachine to a new operation/classifier.

Precondition: isRelocationAllowed(base) is true.

Parameters:
base - the new location, i.e. base modelelement
Returns:
true if successful

getRelocationCandidates

java.util.Collection getRelocationCandidates(java.lang.Object root)
Create a collection of candidate modelelements to relocate this diagram to. All candidates belong to a given namespace - e.g. the root Model.

Parameters:
root - all returned candidates are contained in this namespace
Returns:
the collection of candidate modelelements to which this diagram may be relocated


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook