org.argouml.uml.ui
Class UMLGeneralizationListModel

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

public class UMLGeneralizationListModel
extends UMLBinaryRelationListModel

A concrete class to provide the list of model elements that are generalizations of some other element.

This list should support the full set of "Open", "Add", "Delete"

Where there is no entry, the default text is "none".

See Also:
Serialized Form

Fields inherited from class org.argouml.uml.ui.UMLModelElementListModel
_upper
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
UMLGeneralizationListModel(UMLUserInterfaceContainer container, java.lang.String property, boolean showNone)
          Constructor for UMLGeneralizationListModel.
 
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
 

Constructor Detail

UMLGeneralizationListModel

public UMLGeneralizationListModel(UMLUserInterfaceContainer container,
                                  java.lang.String property,
                                  boolean showNone)
Constructor for UMLGeneralizationListModel.
Parameters:
container -  
property -  
showNone -  
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