net.wotonomy.ui.swing
Class MutableDisplayGroupNode

java.lang.Object
  extended by java.util.Observable
      extended by net.wotonomy.ui.EODisplayGroup
          extended by net.wotonomy.ui.swing.DisplayGroupNode
              extended by net.wotonomy.ui.swing.MutableDisplayGroupNode
All Implemented Interfaces:
javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode, net.wotonomy.control.EOEditingContext.Editor, net.wotonomy.control.EOObserving

public class MutableDisplayGroupNode
extends DisplayGroupNode
implements javax.swing.tree.MutableTreeNode

A DisplayGroupNode that exposes the MutableTreeNode interface. This was required so that other subclasses of DisplayGroupNode could opt out of supporting MutableTreeNode (so that they can implement IlvActivity, for example).

Version:
$Revision: 904 $
Author:
michael@mpowers.net, $Author: cgruber $

Nested Class Summary
 
Nested classes/interfaces inherited from class net.wotonomy.ui.EODisplayGroup
net.wotonomy.ui.EODisplayGroup.Delegate
 
Field Summary
 
Fields inherited from class net.wotonomy.ui.swing.DisplayGroupNode
childNodes, isFetched, isFetchNeeded, parentAssociation, parentGroup, target, targetObserver, useParentOrderings, useParentQualifier
 
Fields inherited from class net.wotonomy.ui.EODisplayGroup
allObjects, allObjectsProxy, displayedObjects, displayedObjectsProxy, DisplayGroupWillFetchNotification, selectedIndexes, selectedObjects, selectedObjectsProxy
 
Constructor Summary
MutableDisplayGroupNode(TreeModelAssociation aParentAssociation, net.wotonomy.ui.EODisplayGroup aParentGroup, java.lang.Object anObject)
          Constructor for all nodes.
 
Method Summary
protected  void fireEventsForChanges(java.lang.Object[] oldObjects, java.lang.Object[] newObjects)
          Overridden to remember expanded state for nodes after nodes have been rearranged.
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 void insert(javax.swing.tree.MutableTreeNode aChild, int anIndex)
           
 void remove(javax.swing.tree.MutableTreeNode node)
          Removes the node at the index corresponding to the index of the object.
 void setParent(javax.swing.tree.MutableTreeNode newParent)
          Removes the value in the parent display group at the index that corresponds to the index of this node and add it to the end of the display group that corresponds to the user value of the specified node.
 
Methods inherited from class net.wotonomy.ui.swing.DisplayGroupNode
children, deleteObjectAtIndex, dispose, disposeChildNodes, fetch, fireNodeChanged, fireNodesChanged, fireNodesInserted, fireNodesRemoved, fireStructureChanged, getAllowsChildren, getChildCount, getChildNodeAt, getChildNodeForObject, getDescendants, getIndex, getLoadedDescendants, getParentGroup, getUserObject, insert, insertObjectAtIndex, isFetched, isFetchNeeded, isLeaf, object, objectsInvalidatedInEditingContext, qualifier, remove, remove, removeFromParent, setDataSource, setFetched, setFetchNeeded, setParent, setQualifier, setSortOrderings, setTarget, setUserObject, setValueForKey, sortOrderings, targetChanged, toString, treePath, updateDisplayedObjects, valueForKey
 
Methods inherited from class net.wotonomy.ui.EODisplayGroup
allObjects, associationDidBeginEditing, associationDidEndEditing, associationFailedToValidateValue, clearSelection, contentsChanged, dataSource, defaultStringMatchFormat, defaultStringMatchOperator, delegate, deleteSelection, displayedObjects, editingAssociation, editingContextPresentErrorMessage, editingContextShouldContinueFetching, editingContextWillSaveChanges, editorHasChangesForEditingContext, enabledToSetSelectedObjectValueForKey, endEditing, enterQueryMode, equalToQueryValues, fetchesOnLoad, globalDefaultForValidatesChangesImmediately, globalDefaultStringMatchFormat, globalDefaultStringMatchOperator, greaterThanQueryValues, inQueryMode, insertedObjectDefaultValues, insertNewObjectAtIndex, lessThanQueryValues, localKeys, objectWillChange, observingAssociations, processRecentChanges, qualifierFromQueryValues, qualifyDataSource, qualifyDisplayGroup, queryBindingValues, queryOperatorValues, redisplay, selectedObject, selectedObjects, selectedObjectValueForKey, selectionChanged, selectionIndexes, selectNext, selectObject, selectObjectsIdenticalTo, selectPrevious, selectsFirstObjectAfterFetch, setDefaultStringMatchFormat, setDefaultStringMatchOperator, setDelegate, setEqualToQueryValues, setFetchesOnLoad, setGlobalDefaultForValidatesChangesImmediately, setGlobalDefaultStringMatchFormat, setGlobalDefaultStringMatchOperator, setGreaterThanQueryValues, setInQueryMode, setInsertedObjectDefaultValues, setLessThanQueryValues, setLocalKeys, setObjectArray, setQueryBindingValues, setQueryOperatorValues, setSelectedObject, setSelectedObjects, setSelectedObjectValue, setSelectionIndexes, setSelectsFirstObjectAfterFetch, setUsesOptimisticRefresh, setValidatesChangesImmediately, setValueForObject, setValueForObjectAtIndex, updatedObjectIndex, usesOptimisticRefresh, validatesChangesImmediately, valueForObject, valueForObjectAtIndex, willChange
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.MutableTreeNode
remove, removeFromParent, setUserObject
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildCount, isLeaf
 

Constructor Detail

MutableDisplayGroupNode

public MutableDisplayGroupNode(TreeModelAssociation aParentAssociation,
                               net.wotonomy.ui.EODisplayGroup aParentGroup,
                               java.lang.Object anObject)
Constructor for all nodes. Root node must have a null delegate.

Method Detail

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

insert

public void insert(javax.swing.tree.MutableTreeNode aChild,
                   int anIndex)
Specified by:
insert in interface javax.swing.tree.MutableTreeNode

remove

public void remove(javax.swing.tree.MutableTreeNode node)
Removes the node at the index corresponding to the index of the object.

Specified by:
remove in interface javax.swing.tree.MutableTreeNode

setParent

public void setParent(javax.swing.tree.MutableTreeNode newParent)
Removes the value in the parent display group at the index that corresponds to the index of this node and add it to the end of the display group that corresponds to the user value of the specified node.

Specified by:
setParent in interface javax.swing.tree.MutableTreeNode

fireEventsForChanges

protected void fireEventsForChanges(java.lang.Object[] oldObjects,
                                    java.lang.Object[] newObjects)
Overridden to remember expanded state for nodes after nodes have been rearranged.

Overrides:
fireEventsForChanges in class DisplayGroupNode


Copyright © 2006 null. All Rights Reserved.