org.argouml.uml.ui
Class UMLBinaryRelationListModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--org.argouml.uml.ui.UMLModelElementListModel
              |
              +--org.argouml.uml.ui.UMLBinaryRelationListModel
All Implemented Interfaces:
javax.swing.ListModel, NotationContext, java.io.Serializable, UMLUserInterfaceComponent
Direct Known Subclasses:
UMLConnectionListModel, UMLExtendedUseCasesListModel, UMLExtendListModel, UMLGeneralizationListModel, UMLSpecializationListModel

Deprecated. as of ArgoUml 0.13.5 (10-may-2003), replaced by PropPanelClassifier.getAssociationEndScroll(), this class is part of the 'old'(pre 0.13.*) implementation of proppanels that used reflection a lot.

public abstract class UMLBinaryRelationListModel
extends UMLModelElementListModel

The base class for models behind scrollpanes for binary relations like the association pane on PropPanelUsecase

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.argouml.uml.ui.UMLModelElementListModel
_upper, NO_LIMIT
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
UMLBinaryRelationListModel(UMLUserInterfaceContainer container, java.lang.String property, boolean showNone)
          Deprecated. Constructor for UMLBinaryConnectionListModel.
 
Method Summary
 void add(int index)
          Deprecated.  
protected abstract  void build(MModelElement from, MModelElement to)
          Deprecated. Builds a relation between two modelelements.
 boolean buildPopup(javax.swing.JPopupMenu popup, int index)
          Deprecated. This method builds a context (pop-up) menu for the list.
protected abstract  void connect(MutableGraphModel gm, MModelElement from, MModelElement to)
          Deprecated. Connects two modelelements.
 void delete(int index)
          Deprecated. Standard delete method.
protected abstract  java.lang.String getAddDialogTitle()
          Deprecated. Returns the title of the add dialog
protected abstract  java.util.Collection getChoices()
          Deprecated. Gets the collection of modelelements a user can select from (left pane in UMLAddDialog)
protected  MModelElement getModelElementAt(int index)
          Deprecated. This method returns the model element that corresponds to to the specific index.
protected abstract  MModelElement getRelation(MModelElement from, MModelElement to)
          Deprecated. Gets the relation between two modelelements.
protected abstract  java.util.Collection getSelected()
          Deprecated. Gets the collection of modelelements that are allready selected before the add method is called
protected  MModelElement getSource()
          Deprecated.  The source of the relation to be layed out.
protected  int recalcModelElementSize()
          Deprecated. This method is called from getModelElementSize when the list size has been marked as invalid.
 
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, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UMLBinaryRelationListModel

public UMLBinaryRelationListModel(UMLUserInterfaceContainer container,
                                  java.lang.String property,
                                  boolean showNone)
Deprecated. 
Constructor for UMLBinaryConnectionListModel.

Parameters:
container -
property -
showNone -
Method Detail

add

public void add(int index)
Deprecated. 
See Also:
add(int)

delete

public void delete(int index)
Deprecated. 
Description copied from class: UMLModelElementListModel
Standard delete method.

Overrides:
delete in class UMLModelElementListModel
Parameters:
index -
See Also:
UMLModelElementListModel.delete(int)

getChoices

protected abstract java.util.Collection getChoices()
Deprecated. 
Gets the collection of modelelements a user can select from (left pane in UMLAddDialog)

Returns:
Collection

getSelected

protected abstract java.util.Collection getSelected()
Deprecated. 
Gets the collection of modelelements that are allready selected before the add method is called

Returns:
Collection

getAddDialogTitle

protected abstract java.lang.String getAddDialogTitle()
Deprecated. 
Returns the title of the add dialog

Returns:
String

connect

protected abstract void connect(MutableGraphModel gm,
                                MModelElement from,
                                MModelElement to)
Deprecated. 
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.

Parameters:
from -
to -

build

protected abstract void build(MModelElement from,
                              MModelElement to)
Deprecated. 
Builds a relation between two modelelements. A relation is for example an association or a generalization relationship. Only builds the modelelement, not the graphics.

Parameters:
from -
to -

getRelation

protected abstract MModelElement getRelation(MModelElement from,
                                             MModelElement to)
Deprecated. 
Gets the relation between two modelelements. Implementations should delegate to utility methods provided in the helpers like CoreHelper

Parameters:
from -
to -
Returns:
MModelElement

buildPopup

public boolean buildPopup(javax.swing.JPopupMenu popup,
                          int index)
Deprecated. 
Description copied from class: UMLModelElementListModel
This method builds a context (pop-up) menu for the list. This method may be overriden for lists that have additional menu items or when the default list of actions is inappropriate.

Overrides:
buildPopup in class UMLModelElementListModel
Parameters:
popup - popup menu
index - index of selected list item
Returns:
"true" if popup menu should be displayed
See Also:
UMLModelElementListModel.buildPopup(JPopupMenu, int)

getModelElementAt

protected MModelElement getModelElementAt(int index)
Deprecated. 
Description copied from class: UMLModelElementListModel
This method returns the model element that corresponds to to the specific index. Called from getElementAt which handles entries for "none" and formatting of elements.

Specified by:
getModelElementAt in class UMLModelElementListModel
Parameters:
index - index of model element (zero based).
Returns:
corresponding model element
See Also:
UMLModelElementListModel.getModelElementAt(int)

recalcModelElementSize

protected int recalcModelElementSize()
Deprecated. 
Description copied from class: UMLModelElementListModel
This method is called from getModelElementSize when the list size has been marked as invalid.

Specified by:
recalcModelElementSize in class UMLModelElementListModel
Returns:
number of "actual" list entries.
See Also:
UMLModelElementListModel.recalcModelElementSize()

getSource

protected MModelElement getSource()
Deprecated. 

The source of the relation to be layed out. For example, in an association this is one of the classifiers to be connected. Normally users of this class do not have to override this. Only when the target of the container is different then the source of the relation, this must be overriden.

Returns:
MModelElement


ArgoUML © 1996-2003 (20040229)ArgoUML Project HomeArgoUML Cookbook