org.argouml.uml.ui.behavior.activity_graphs
Class UMLObjectFlowStateClassifierComboBoxModel

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byorg.argouml.uml.ui.UMLComboBoxModel2
          extended byorg.argouml.uml.ui.behavior.activity_graphs.UMLObjectFlowStateClassifierComboBoxModel
All Implemented Interfaces:
ComboBoxModel, EventListener, ListModel, PropertyChangeListener, Serializable, TargetListener

public class UMLObjectFlowStateClassifierComboBoxModel
extends UMLComboBoxModel2

A model for the type of an ObjectFlowState. This combo shows the Classifier or the ClassifierInState!

Since:
Oct 10, 2002
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.argouml.uml.ui.UMLComboBoxModel2
buildingModel
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
UMLObjectFlowStateClassifierComboBoxModel()
          Constructor.
 
Method Summary
protected  void buildModelList()
          Get all Classifiers that are not ClassifierInState.
protected  Object getSelectedModelElement()
          Returns a Classifier that may be a ClassifierInState.
protected  boolean isValidElement(Object o)
          Returns true if the given element is valid.
 void propertyChange(PropertyChangeEvent evt)
          The function in the parent removes items from the list when deselected.
 
Methods inherited from class org.argouml.uml.ui.UMLComboBoxModel2
addAll, addElement, addOtherModelEventListeners, contains, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getChangedElement, getElementAt, getIndexOf, getName, getPropertySetName, getSelectedItem, getSize, getTarget, isClearable, isFireListEvents, isValidEvent, removeAll, removeAllElements, removeElement, removeOtherModelEventListeners, setElements, setFireListEvents, setSelectedItem, setTarget, targetAdded, targetRemoved, targetSet
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
 

Constructor Detail

UMLObjectFlowStateClassifierComboBoxModel

public UMLObjectFlowStateClassifierComboBoxModel()
Constructor.

Method Detail

isValidElement

protected boolean isValidElement(Object o)
Description copied from class: UMLComboBoxModel2
Returns true if the given element is valid.

It is valid if it may be added to the list of elements.

Specified by:
isValidElement in class UMLComboBoxModel2
Parameters:
o - the given element
Returns:
true if the given element is valid
See Also:
UMLComboBoxModel2.isValidElement(Object)

buildModelList

protected void buildModelList()
Get all Classifiers that are not ClassifierInState.

Specified by:
buildModelList in class UMLComboBoxModel2
See Also:
UMLComboBoxModel2.buildModelList()

getSelectedModelElement

protected Object getSelectedModelElement()
Returns a Classifier that may be a ClassifierInState.

Specified by:
getSelectedModelElement in class UMLComboBoxModel2
Returns:
Object
See Also:
UMLComboBoxModel2.getSelectedModelElement()

propertyChange

public void propertyChange(PropertyChangeEvent evt)
The function in the parent removes items from the list when deselected. We do not need that here.

Specified by:
propertyChange in interface PropertyChangeListener
Overrides:
propertyChange in class UMLComboBoxModel2
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook