org.argouml.ui
Class AbstractGoRule

java.lang.Object
  |
  +--org.argouml.ui.AbstractGoRule
All Implemented Interfaces:
javax.swing.tree.TreeModel
Direct Known Subclasses:
GoAssocRoleMessages, GoBehavioralFeatureToStateDiagram, GoBehavioralFeatureToStateMachine, GoClassifierToBeh, GoClassifierToCollaboration, GoClassifierToStateMachine, GoClassifierToStructuralFeature, GoClassToAssociatedClass, GoClassToNavigableClass, GoCollaborationDiagram, GoCollaborationInteraction, GoCompositeStateToSubvertex, GoDiagramToEdge, GoDiagramToNode, GoElementToMachine, GoFilteredChildren, GoGenElementToDerived, GoInteractionMessage, GoInteractionMessages, GoLinkStimuli, GoMachineDiagram, GoMachineToState, GoMachineToTrans, GoMessageAction, GoModelElementToComment, GoModelToBaseElements, GoModelToClass, GoModelToCollaboration, GoModelToDiagram, GoModelToElements, GoOperationToCollaboration, GoOperationToCollaborationDiagram, GoProjectToCollaboration, GoProjectToDiagram, GoProjectToModel, GoProjectToStateMachine, GoSignalToReception, GoStateMachineToTransition, GoStateToDoActivity, GoStateToDownstream, GoStateToEntry, GoStateToExit, GoStateToIncomingTrans, GoStateToInternalTrans, GoStateToOutgoingTrans, GoStimulusToAction, GoTransitionToSource, GoTransitionToTarget, GoUseCaseToExtensionPoint

public abstract class AbstractGoRule
extends java.lang.Object
implements javax.swing.tree.TreeModel

Abstract class to be used as a convenience class for implementing 'go rules'. Go rules are rules to which the navperspectives comply if they are registred with the navperspectives. This usually happens in the static block of NavPerspective. If some modelelement is not showing up in a navperspective, in most cases this means that there is no go rule defined or an incorrect one. Via the abstract method getChildren the children of some tree element in a perspective are returned. Only the returned children are shown for some tree element.


Constructor Summary
AbstractGoRule()
           
 
Method Summary
 void addTreeModelListener(javax.swing.event.TreeModelListener l)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object parent)
           
abstract  java.util.Collection getChildren(java.lang.Object parent)
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.Object getRoot()
           
abstract  java.lang.String getRuleName()
          return the name of the rule as it is displayed in the nav perspective edit pane.
abstract  boolean isLeaf(java.lang.Object node)
           
 void removeTreeModelListener(javax.swing.event.TreeModelListener l)
           
 java.lang.String toString()
          wrapper around getRuleName()
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractGoRule

public AbstractGoRule()
Method Detail

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getRoot()

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getChild(Object, int)

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getChildCount(Object)

isLeaf

public abstract boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel
See Also:
TreeModel.isLeaf(Object)

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel
See Also:
TreeModel.valueForPathChanged(TreePath, Object)

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel
See Also:
TreeModel.getIndexOfChild(Object, Object)

addTreeModelListener

public void addTreeModelListener(javax.swing.event.TreeModelListener l)
Specified by:
addTreeModelListener in interface javax.swing.tree.TreeModel
See Also:
TreeModel.addTreeModelListener(TreeModelListener)

removeTreeModelListener

public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
Specified by:
removeTreeModelListener in interface javax.swing.tree.TreeModel
See Also:
TreeModel.removeTreeModelListener(TreeModelListener)

getChildren

public abstract java.util.Collection getChildren(java.lang.Object parent)

getRuleName

public abstract java.lang.String getRuleName()
return the name of the rule as it is displayed in the nav perspective edit pane. Returns for example "State->Substates".
See Also:
toString()

toString

public java.lang.String toString()
wrapper around getRuleName()
Overrides:
toString in class java.lang.Object


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook