|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractListModel | +--org.argouml.uml.ui.UMLComboBoxModel2
ComboBoxmodel for UML modelelements. This implementation does not use reflection and seperates Model, View and Controller better then does UMLComboBoxModel. In the future UMLComboBoxModel and UMLComboBox will be replaced with this implementation to improve performance.
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
UMLComboBoxModel2(java.lang.String propertySetName,
boolean clearable)
Constructs a model for a combobox. |
Method Summary | |
protected void |
addAll(java.util.Collection col)
Utility method to add a collection of elements to the model |
void |
addElement(java.lang.Object o)
|
protected abstract void |
buildModelList()
Builds the list of elements and sets the selectedIndex to the currently selected item if there is one. |
boolean |
contains(java.lang.Object elem)
Returns true if some object elem is contained by the list of choices |
protected void |
fireContentsChanged(java.lang.Object source,
int index0,
int index1)
|
protected void |
fireIntervalAdded(java.lang.Object source,
int index0,
int index1)
|
protected void |
fireIntervalRemoved(java.lang.Object source,
int index0,
int index1)
|
protected java.lang.Object |
getChangedElement(ru.novosoft.uml.MElementEvent e)
Utility method to get the changed element from some event e |
java.lang.Object |
getElementAt(int index)
|
int |
getIndexOf(java.lang.Object o)
|
java.lang.Object |
getSelectedItem()
|
protected abstract java.lang.Object |
getSelectedModelElement()
Gets the modelelement that is selected in the NSUML model. |
int |
getSize()
|
protected java.lang.Object |
getTarget()
Utility method to get the target. |
protected abstract boolean |
isValidElement(java.lang.Object element)
Returns true if the given element is valid, i.e. it may be added to the list of elements. |
protected boolean |
isValidEvent(ru.novosoft.uml.MElementEvent e)
Returns true if some event is valid. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent e)
|
void |
propertySet(ru.novosoft.uml.MElementEvent e)
If the property that this comboboxmodel depicts is changed by the NSUML model, this method will make sure that it is changed in the comboboxmodel too. |
void |
recovered(ru.novosoft.uml.MElementEvent e)
|
protected void |
removeAll(java.util.Collection col)
Utility method to remove a collection of elements from the model |
void |
removeAllElements()
|
void |
removed(ru.novosoft.uml.MElementEvent e)
|
void |
removeElement(java.lang.Object o)
|
void |
roleAdded(ru.novosoft.uml.MElementEvent e)
|
void |
roleRemoved(ru.novosoft.uml.MElementEvent e)
|
protected void |
setElements(java.util.Collection elements)
Utility method to change all elements in the list with modelelements at once. |
void |
setSelectedItem(java.lang.Object o)
|
protected void |
setTarget(java.lang.Object target)
Sets the target. |
void |
targetChanged(java.lang.Object newTarget)
|
void |
targetReasserted(java.lang.Object newTarget)
|
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, 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 |
public UMLComboBoxModel2(java.lang.String propertySetName, boolean clearable)
container
- propertySetName
- The name of the NSUML event that must be fired to set
the selected item programmatically (via setting the NSUML model)java.lang.IllegalArgumentException
- if one of the arguments is nullMethod Detail |
public void listRoleItemSet(ru.novosoft.uml.MElementEvent e)
listRoleItemSet
in interface ru.novosoft.uml.MElementListener
MElementListener.listRoleItemSet(MElementEvent)
public void propertySet(ru.novosoft.uml.MElementEvent e)
propertySet
in interface ru.novosoft.uml.MElementListener
MElementListener.propertySet(MElementEvent)
public void recovered(ru.novosoft.uml.MElementEvent e)
recovered
in interface ru.novosoft.uml.MElementListener
MElementListener.recovered(MElementEvent)
public void removed(ru.novosoft.uml.MElementEvent e)
removed
in interface ru.novosoft.uml.MElementListener
MElementListener.removed(MElementEvent)
public void roleAdded(ru.novosoft.uml.MElementEvent e)
roleAdded
in interface ru.novosoft.uml.MElementListener
MElementListener.roleAdded(MElementEvent)
public void roleRemoved(ru.novosoft.uml.MElementEvent e)
roleRemoved
in interface ru.novosoft.uml.MElementListener
MElementListener.roleRemoved(MElementEvent)
public void targetChanged(java.lang.Object newTarget)
public void targetReasserted(java.lang.Object newTarget)
protected abstract boolean isValidElement(java.lang.Object element)
element
- protected abstract void buildModelList()
protected void setElements(java.util.Collection elements)
elements
- protected java.lang.Object getTarget()
protected void removeAll(java.util.Collection col)
col
- protected void addAll(java.util.Collection col)
col
- protected java.lang.Object getChangedElement(ru.novosoft.uml.MElementEvent e)
e
- protected void setTarget(java.lang.Object target)
target
- protected abstract java.lang.Object getSelectedModelElement()
public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
getElementAt
in class javax.swing.AbstractListModel
ListModel.getElementAt(int)
public int getSize()
getSize
in interface javax.swing.ListModel
getSize
in class javax.swing.AbstractListModel
ListModel.getSize()
public int getIndexOf(java.lang.Object o)
public void addElement(java.lang.Object o)
public void setSelectedItem(java.lang.Object o)
setSelectedItem
in interface javax.swing.ComboBoxModel
public void removeElement(java.lang.Object o)
public void removeAllElements()
public java.lang.Object getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public boolean contains(java.lang.Object elem)
elem
- protected boolean isValidEvent(ru.novosoft.uml.MElementEvent e)
e
- protected void fireContentsChanged(java.lang.Object source, int index0, int index1)
fireContentsChanged
in class javax.swing.AbstractListModel
AbstractListModel.fireContentsChanged(java.lang.Object, int, int)
protected void fireIntervalAdded(java.lang.Object source, int index0, int index1)
fireIntervalAdded
in class javax.swing.AbstractListModel
AbstractListModel.fireIntervalAdded(java.lang.Object, int, int)
protected void fireIntervalRemoved(java.lang.Object source, int index0, int index1)
fireIntervalRemoved
in class javax.swing.AbstractListModel
AbstractListModel.fireIntervalRemoved(java.lang.Object, int, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML (c) 1996-2002 |