org.argouml.uml.ui.behavior.use_cases
Class UMLExtendListModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--org.argouml.uml.ui.UMLModelElementListModel
              |
              +--org.argouml.uml.ui.UMLBinaryRelationListModel
                    |
                    +--org.argouml.uml.ui.behavior.use_cases.UMLExtendListModel
All Implemented Interfaces:
java.util.EventListener, javax.swing.ListModel, ru.novosoft.uml.MElementListener, NotationContext, java.io.Serializable, UMLUserInterfaceComponent

public class UMLExtendListModel
extends UMLBinaryRelationListModel

A list model for the extend relationship on use case and extension point property panels.

Supports the full menu (Open, Add, Delete, Move Up, Move Down). Provides its own formatElement routine, to use the name of the base use case (where the container is a use case) or the extension use case (where the container is an extension point, rather than name of the extend relationship itself.

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Category cat
           
 
Fields inherited from class org.argouml.uml.ui.UMLModelElementListModel
_upper
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
UMLExtendListModel(UMLUserInterfaceContainer container, java.lang.String property, boolean showNone)
          Create a new list model. Implementation is just an invocation of the parent constructor.
 
Method Summary
protected  void build(ru.novosoft.uml.foundation.core.MModelElement from, ru.novosoft.uml.foundation.core.MModelElement to)
          Builds a relation between two modelelements.
protected  void connect(org.tigris.gef.graph.MutableGraphModel gm, ru.novosoft.uml.foundation.core.MModelElement from, ru.novosoft.uml.foundation.core.MModelElement to)
          Connects two modelelements.
protected  java.lang.String getAddDialogTitle()
          Returns the title of the add dialog
protected  java.util.Collection getChoices()
          Gets the collection of modelelements a user can select from (left pane in UMLAddDialog)
protected  ru.novosoft.uml.foundation.core.MModelElement getRelation(ru.novosoft.uml.foundation.core.MModelElement from, ru.novosoft.uml.foundation.core.MModelElement to)
          Gets the relation between two modelelements.
protected  java.util.Collection getSelected()
          Gets the collection of modelelements that are allready selected before the add method is called
 
Methods inherited from class org.argouml.uml.ui.UMLBinaryRelationListModel
add, buildPopup, delete, getModelElementAt, getSource, recalcModelElementSize
 
Methods inherited from class org.argouml.uml.ui.UMLModelElementListModel
addAtUtil, elementAtUtil, formatElement, getContainer, getContextNotation, getElementAt, getModelElementSize, getProperty, getSize, getTarget, getUpperBound, listRoleItemSet, moveDownUtil, moveUpUtil, navigateTo, open, propertySet, recovered, removed, resetSize, roleAdded, roleRemoved, setUpperBound, targetChanged, targetReasserted
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static org.apache.log4j.Category cat
Constructor Detail

UMLExtendListModel

public UMLExtendListModel(UMLUserInterfaceContainer container,
                          java.lang.String property,
                          boolean showNone)

Create a new list model.

Implementation is just an invocation of the parent constructor.

Parameters:
container - The container for this list - the use case property panel.
property - The name associated with the NSUML MElementEvent that we are tracking or null if we track them all. We probably want to just track the "extend" event.
showNone - True if an empty list is represented by the keyword "none"
Method Detail

build

protected void build(ru.novosoft.uml.foundation.core.MModelElement from,
                     ru.novosoft.uml.foundation.core.MModelElement to)
Description copied from class: UMLBinaryRelationListModel
Builds a relation between two modelelements. A relation is for example an association or a generalization relationship. Only builds the modelelement, not the graphics.
Overrides:
build in class UMLBinaryRelationListModel
See Also:
UMLBinaryRelationListModel.build(MModelElement, MModelElement)

connect

protected void connect(org.tigris.gef.graph.MutableGraphModel gm,
                       ru.novosoft.uml.foundation.core.MModelElement from,
                       ru.novosoft.uml.foundation.core.MModelElement to)
Description copied from class: UMLBinaryRelationListModel
Connects two modelelements. The only implementation of this class could be something simple as gm.connect(from, to). This method is only abstract since in some cases gm.connect(to, from) may be necessary.
Overrides:
connect in class UMLBinaryRelationListModel
See Also:
UMLBinaryRelationListModel.connect(MutableGraphModel, MModelElement, MModelElement)

getAddDialogTitle

protected java.lang.String getAddDialogTitle()
Description copied from class: UMLBinaryRelationListModel
Returns the title of the add dialog
Overrides:
getAddDialogTitle in class UMLBinaryRelationListModel
See Also:
UMLBinaryRelationListModel.getAddDialogTitle()

getChoices

protected java.util.Collection getChoices()
Description copied from class: UMLBinaryRelationListModel
Gets the collection of modelelements a user can select from (left pane in UMLAddDialog)
Overrides:
getChoices in class UMLBinaryRelationListModel
See Also:
UMLBinaryRelationListModel.getChoices()

getRelation

protected ru.novosoft.uml.foundation.core.MModelElement getRelation(ru.novosoft.uml.foundation.core.MModelElement from,
                                                                    ru.novosoft.uml.foundation.core.MModelElement to)
Description copied from class: UMLBinaryRelationListModel
Gets the relation between two modelelements. Implementations should delegate to utility methods provided in the helpers like CoreHelper
Overrides:
getRelation in class UMLBinaryRelationListModel
See Also:
UMLBinaryRelationListModel.getRelation(MModelElement, MModelElement)

getSelected

protected java.util.Collection getSelected()
Description copied from class: UMLBinaryRelationListModel
Gets the collection of modelelements that are allready selected before the add method is called
Overrides:
getSelected in class UMLBinaryRelationListModel
See Also:
UMLBinaryRelationListModel.getSelected()


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