org.argouml.uml.ui
Class UMLModelElementCachedListModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--org.argouml.uml.ui.UMLModelElementListModel
              |
              +--org.argouml.uml.ui.UMLModelElementCachedListModel
All Implemented Interfaces:
javax.swing.ListModel, NotationContext, java.io.Serializable, UMLUserInterfaceComponent
Direct Known Subclasses:
UMLAttributesListModel, UMLClassifierListModel, UMLOperationsListModel, UMLOwnedElementListModel

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

public abstract class UMLModelElementCachedListModel
extends UMLModelElementListModel

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
UMLModelElementCachedListModel(UMLUserInterfaceContainer container, java.lang.String property, boolean showNone)
          Deprecated.  
 
Method Summary
protected  java.util.List addElement(java.util.Collection source, int index, MModelElement newElement, java.lang.Object element)
          Deprecated. addElement method uses ListIterator and because we pass in the Object element (name of the element after which we want to insert the newElement) we can iterate down the list until we find the correct insertion point.
protected  java.util.List buildCache()
          Deprecated.  
protected abstract  java.util.List getCache()
          Deprecated.  
protected  MModelElement getModelElementAt(int index)
          Deprecated. This method returns the model element that corresponds to to the specific index.
abstract  boolean isProperClass(java.lang.Object obj)
          Deprecated.  
 void listRoleItemSet(MElementEvent p1)
          Deprecated.  
 void propertySet(MElementEvent event)
          Deprecated.  
protected  int recalcModelElementSize()
          Deprecated. This method is called from getModelElementSize when the list size has been marked as invalid.
 void recovered(MElementEvent p1)
          Deprecated.  
 void removed(MElementEvent event)
          Deprecated.  
protected abstract  void resetCache()
          Deprecated.  
 void roleAdded(MElementEvent event)
          Deprecated.  
 void roleRemoved(MElementEvent event)
          Deprecated.  
protected  java.util.List swap(java.util.Collection source, int lowIndex, java.lang.Object first, java.lang.Object second)
          Deprecated. Swap two items in a Collection.
 void targetChanged()
          Deprecated. This method is called when the target of a UMLUserInterfaceContainer has been changed.
 
Methods inherited from class org.argouml.uml.ui.UMLModelElementListModel
addAtUtil, buildPopup, delete, elementAtUtil, formatElement, getContainer, getContextNotation, getElementAt, getModelElementSize, getProperty, getSize, getTarget, getUpperBound, moveDownUtil, moveUpUtil, navigateTo, open, resetSize, setUpperBound, 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

UMLModelElementCachedListModel

public UMLModelElementCachedListModel(UMLUserInterfaceContainer container,
                                      java.lang.String property,
                                      boolean showNone)
Deprecated. 
Method Detail

resetCache

protected abstract void resetCache()
Deprecated. 

getCache

protected abstract java.util.List getCache()
Deprecated. 

isProperClass

public abstract boolean isProperClass(java.lang.Object obj)
Deprecated. 

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.

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

targetChanged

public void targetChanged()
Deprecated. 
Description copied from interface: UMLUserInterfaceComponent
This method is called when the target of a UMLUserInterfaceContainer has been changed.

Specified by:
targetChanged in interface UMLUserInterfaceComponent
Overrides:
targetChanged in class UMLModelElementListModel
See Also:
UMLUserInterfaceComponent.targetChanged()

roleRemoved

public void roleRemoved(MElementEvent event)
Deprecated. 
Overrides:
roleRemoved in class UMLModelElementListModel

roleAdded

public void roleAdded(MElementEvent event)
Deprecated. 
Overrides:
roleAdded in class UMLModelElementListModel
See Also:
ru.novosoft.uml.MElementListener#roleAdded(MElementEvent)

recovered

public void recovered(MElementEvent p1)
Deprecated. 
Overrides:
recovered in class UMLModelElementListModel

listRoleItemSet

public void listRoleItemSet(MElementEvent p1)
Deprecated. 
Overrides:
listRoleItemSet in class UMLModelElementListModel

removed

public void removed(MElementEvent event)
Deprecated. 
Overrides:
removed in class UMLModelElementListModel

propertySet

public void propertySet(MElementEvent event)
Deprecated. 
Overrides:
propertySet in class UMLModelElementListModel

swap

protected java.util.List swap(java.util.Collection source,
                              int lowIndex,
                              java.lang.Object first,
                              java.lang.Object second)
Deprecated. 
Swap two items in a Collection. The Collection contains the attributes list and operations list together, however these items need to be swapped independantly of each other so we must iterate through the list to find a "value match". The parameter "lowIndex" is no longer needed, however I left it in for compatability. The same operation is performed twice, once for the source Collection, and again for the cache list.


addElement

protected java.util.List addElement(java.util.Collection source,
                                    int index,
                                    MModelElement newElement,
                                    java.lang.Object element)
Deprecated. 
addElement method uses ListIterator and because we pass in the Object element (name of the element after which we want to insert the newElement) we can iterate down the list until we find the correct insertion point. This iteration is necessary because elements of different types are kept in the same collection. If element is null, the newElement is put at the beginning of the list. Modified: July 18, 2001 - psager Modified: Dec 06, 2001 - thn

Parameters:
source - underlying collection of attributes and operations.
index - location of the element within the list box.
newElement - element to be added.
element - element at position before the add point (or null to add as first).
Returns:
dest new collection as a ArrayList().

buildCache

protected java.util.List buildCache()
Deprecated. 


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