|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
net.wotonomy.ui.EODisplayGroup
net.wotonomy.ui.swing.DisplayGroupNode
public abstract class DisplayGroupNode
DisplayGroupNodes are used as nodes in the
TreeModelAssociation's implementation of TreeModel,
and is tightly coupled with TreeModelAssociation
and MasterDetailAssociation.
Even though it is no longer package access,
don't rely on this class because we want to
have the option of completely replacing this
approach in the future.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.wotonomy.ui.EODisplayGroup |
---|
net.wotonomy.ui.EODisplayGroup.Delegate |
Field Summary | |
---|---|
protected net.wotonomy.foundation.NSMutableDictionary |
childNodes
|
protected boolean |
isFetched
|
protected boolean |
isFetchNeeded
|
protected TreeModelAssociation |
parentAssociation
|
protected net.wotonomy.ui.EODisplayGroup |
parentGroup
|
protected java.lang.Object |
target
|
protected net.wotonomy.control.EODelayedObserver |
targetObserver
|
protected boolean |
useParentOrderings
|
protected boolean |
useParentQualifier
|
Fields inherited from class net.wotonomy.ui.EODisplayGroup |
---|
allObjects, allObjectsProxy, displayedObjects, displayedObjectsProxy, DisplayGroupWillFetchNotification, selectedIndexes, selectedObjects, selectedObjectsProxy |
Constructor Summary | |
---|---|
DisplayGroupNode(TreeModelAssociation aParentAssociation,
net.wotonomy.ui.EODisplayGroup aParentGroup,
java.lang.Object aTarget)
Constructor for all nodes. |
Method Summary | |
---|---|
java.util.Enumeration |
children()
|
boolean |
deleteObjectAtIndex(int anIndex)
Overridden to broadcast a tree event after super executes. |
protected void |
dispose()
Perform any clean up in this method. |
protected void |
disposeChildNodes()
Calls dispose() on all child nodes. |
boolean |
fetch()
Overridden to set isFetched to true. |
protected void |
fireEventsForChanges(java.lang.Object[] oldObjects,
java.lang.Object[] newObjects)
Called by processRecentChanges to analyze the differences between the lists and broadcast the appropriate events. |
void |
fireNodeChanged()
Fires a change event for this node. |
protected void |
fireNodesChanged(java.lang.Object[] path,
int[] indexes,
java.lang.Object[] objects)
Subclasses should override this method to fire an appropriate change event. |
protected void |
fireNodesInserted(java.lang.Object[] path,
int[] indexes,
java.lang.Object[] objects)
Subclasses should override this method to fire an appropriate insertion event. |
protected void |
fireNodesRemoved(java.lang.Object[] path,
int[] indexes,
java.lang.Object[] objects)
Subclasses should override this method to fire an appropriate deletion event. |
protected void |
fireStructureChanged(java.lang.Object[] path,
int[] indexes,
java.lang.Object[] objects)
Subclasses should override this method to fire an appropriate event. |
boolean |
getAllowsChildren()
|
int |
getChildCount()
|
DisplayGroupNode |
getChildNodeAt(int anIndex)
Returns the child node that corresponds to the specified index, creating it if necessary. |
protected DisplayGroupNode |
getChildNodeForObject(java.lang.Object anObject)
Returns a child node that corresponds to the specified object, returning null if not found. |
java.util.List |
getDescendants()
Gets all descendants of the this node. |
int |
getIndex(DisplayGroupNode node)
|
java.util.List |
getLoadedDescendants()
Gets only the descendants of the this node whose children has been loaded - no fetching will occur. |
DisplayGroupNode |
getParentGroup()
Returns the parent display group, or null if parent is root. |
java.lang.Object |
getUserObject()
Returns the value of the displayed property in the parent display group at the index that corresponds to the index of this node. |
void |
insert(DisplayGroupNode aChild,
int anIndex)
|
void |
insertObjectAtIndex(java.lang.Object anObject,
int anIndex)
Overridden to broadcast a tree event after super executes. |
protected boolean |
isFetched()
Returns whether the node should call fetch(). |
protected boolean |
isFetchNeeded()
Returns whether the node is in need of a refetch. |
boolean |
isLeaf()
|
java.lang.Object |
object()
Returns the object at the appropriate index in the parent display group. |
void |
objectsInvalidatedInEditingContext(net.wotonomy.foundation.NSNotification aNotification)
Overridden to not fetch on InvalidateAllObjectsInStoreNotification unless we've already been fetched, preserving the load-on-demand functionality. |
net.wotonomy.control.EOQualifier |
qualifier()
Overridden to return the parent group's qualifier if useParentQualifier is true. |
void |
remove(DisplayGroupNode node)
Removes the node at the index corresponding to the index of the object. |
void |
remove(int index)
|
void |
removeFromParent()
Removes our object from the parent display group. |
void |
setDataSource(net.wotonomy.control.EODataSource aDataSource)
Overridden to unregister as an editor of the editing context, since we don't directly present a user interface. |
protected void |
setFetched(boolean fetched)
Sets whether the node should call fetch(). |
protected void |
setFetchNeeded(boolean fetchNeeded)
Returns whether the node should call fetch(). |
void |
setParent(DisplayGroupNode newParent)
Removes our object from the parent display group and adds it to the end of the specified node's children. |
void |
setQualifier(net.wotonomy.control.EOQualifier aQualifier)
Overridden to set useParentQualifier to false, or true if aList is null. |
void |
setSortOrderings(java.util.List aList)
Overridden to set useParentOrderings to false, or true if aList is null. |
void |
setTarget(java.lang.Object aTarget)
Sets the target object and creates an registers a target observer. |
void |
setUserObject(java.lang.Object aValue)
Sets the value of the displayed property in the parent display group at the index that corresponds to the index of this node. |
void |
setValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets a value on the object in the parent display group at the index that corresponds to the index of this node. |
net.wotonomy.foundation.NSArray |
sortOrderings()
Overridden to return the parent group's sort ordering if useParentOrderings is true. |
void |
targetChanged()
Called after the target object posts a change notification. |
java.lang.String |
toString()
Returns the string value of the title property on the object in the parent display group corresponding to this index. |
javax.swing.tree.TreePath |
treePath()
Returns a tree path of all DisplayGroupNodes leading to this node, including the root node (but excluding the titles display group). |
void |
updateDisplayedObjects()
Overridden to call to super, fire any tree events, and then call updateDisplayedObjects on all fetched child nodes. |
java.lang.Object |
valueForKey(java.lang.String aKey)
Returns a value from the object in the parent display group at the index that corresponds to the index of this node. |
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 |
Field Detail |
---|
protected TreeModelAssociation parentAssociation
protected net.wotonomy.control.EODelayedObserver targetObserver
protected net.wotonomy.foundation.NSMutableDictionary childNodes
protected net.wotonomy.ui.EODisplayGroup parentGroup
protected java.lang.Object target
protected boolean isFetched
protected boolean isFetchNeeded
protected boolean useParentOrderings
protected boolean useParentQualifier
Constructor Detail |
---|
public DisplayGroupNode(TreeModelAssociation aParentAssociation, net.wotonomy.ui.EODisplayGroup aParentGroup, java.lang.Object aTarget)
Method Detail |
---|
public void setDataSource(net.wotonomy.control.EODataSource aDataSource)
setDataSource
in class net.wotonomy.ui.EODisplayGroup
protected boolean isFetched()
protected void setFetched(boolean fetched)
protected boolean isFetchNeeded()
protected void setFetchNeeded(boolean fetchNeeded)
protected void fireNodesInserted(java.lang.Object[] path, int[] indexes, java.lang.Object[] objects)
protected void fireNodesChanged(java.lang.Object[] path, int[] indexes, java.lang.Object[] objects)
protected void fireNodesRemoved(java.lang.Object[] path, int[] indexes, java.lang.Object[] objects)
protected void fireStructureChanged(java.lang.Object[] path, int[] indexes, java.lang.Object[] objects)
public void insertObjectAtIndex(java.lang.Object anObject, int anIndex)
insertObjectAtIndex
in class net.wotonomy.ui.EODisplayGroup
public boolean deleteObjectAtIndex(int anIndex)
deleteObjectAtIndex
in class net.wotonomy.ui.EODisplayGroup
public DisplayGroupNode getChildNodeAt(int anIndex)
protected DisplayGroupNode getChildNodeForObject(java.lang.Object anObject)
public javax.swing.tree.TreePath treePath()
public net.wotonomy.foundation.NSArray sortOrderings()
sortOrderings
in class net.wotonomy.ui.EODisplayGroup
public void setSortOrderings(java.util.List aList)
setSortOrderings
in class net.wotonomy.ui.EODisplayGroup
public net.wotonomy.control.EOQualifier qualifier()
qualifier
in class net.wotonomy.ui.EODisplayGroup
public void setQualifier(net.wotonomy.control.EOQualifier aQualifier)
setQualifier
in class net.wotonomy.ui.EODisplayGroup
public boolean fetch()
fetch
in class net.wotonomy.ui.EODisplayGroup
public java.lang.Object object()
public java.lang.String toString()
toString
in class net.wotonomy.ui.EODisplayGroup
public int getChildCount()
public int getIndex(DisplayGroupNode node)
public boolean getAllowsChildren()
public boolean isLeaf()
public java.util.Enumeration children()
public void insert(DisplayGroupNode aChild, int anIndex)
public void remove(int index)
public void remove(DisplayGroupNode node)
public void removeFromParent()
public void setParent(DisplayGroupNode newParent)
public java.lang.Object getUserObject()
public void setUserObject(java.lang.Object aValue)
public java.lang.Object valueForKey(java.lang.String aKey)
public void setValueForKey(java.lang.Object aValue, java.lang.String aKey)
protected void dispose()
protected void disposeChildNodes()
public void targetChanged()
public void fireNodeChanged()
public void updateDisplayedObjects()
updateDisplayedObjects
in class net.wotonomy.ui.EODisplayGroup
protected void fireEventsForChanges(java.lang.Object[] oldObjects, java.lang.Object[] newObjects)
public void setTarget(java.lang.Object aTarget)
public DisplayGroupNode getParentGroup()
public java.util.List getDescendants()
public java.util.List getLoadedDescendants()
public void objectsInvalidatedInEditingContext(net.wotonomy.foundation.NSNotification aNotification)
objectsInvalidatedInEditingContext
in class net.wotonomy.ui.EODisplayGroup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |