PATH  WebObjects 4.0 Documentation > WebObjects Framework Reference

 

WODisplayGroup.Delegate

WODisplayGroup delegate objects

Inherits From:
com.apple.yellow.webobjects

WODisplayGroup offers a number of methods for its delegate to implement; if the delegate does implement them, the WODisplayGroup instances invoke them as appropriate. There are methods that inform the delegate that the EODisplayGroup has fetched, created an object (or failed to create one), inserted or deleted an object, changed the selection, or set a value for a property. There are also methods that request permission from the delegate to perform most of these same actions. The delegate can return true to permit the action or false to deny it. See each method's description for more information.


Instance Methods


createObjectFailedForDataSource

public abstract void createObjectFailedForDataSource(
WODisplayGroup aDisplayGroup,
java.lang.Object aDataSource)

Invoked from insertNewObjectAtIndex to inform the delegate that aDisplayGroup has failed to create a new object for aDataSource. If the delegate doesn't implement this method, the WODisplayGroup fails silently.


didDeleteObject

public abstract void didDeleteObject(
WODisplayGroup aDisplayGroup,
java.lang.Object anObject)

Informs the delegate that aDisplayGroup has deleted anObject.


didFetchObjects

public abstract void didFetchObjects(
WODisplayGroup aDisplayGroup,
NSArray objects)

Informs the delegate that aDisplayGroup has fetched objects.


didInsertObject

public abstract void didInsertObject(
WODisplayGroup aDisplayGroup,
java.lang.Object anObject)

Informs the delegate that aDisplayGroup has inserted anObject.


didSetValueForObjectWithKey

public abstract void didSetValueForObjectWithKey(
WODisplayGroup aDisplayGroup,
java.lang.Object value,
java.lang.Object anObject,
java.lang.String key)

Informs the delegate that aDisplayGroup has altered a property value of anObject. key identifies the property, and value is its new value.


displayArrayForObjects

public abstract NSArray displayArrayForObjects(
WODisplayGroup aDisplayGroup,
NSArray objects)

Invoked from updateDisplayedObjects, this method allows the delegate to filter and sort aDisplayGroup's array of objects to limit which ones get displayed. objects contains all of aDisplayGroup's objects. The delegate should filter any objects that shouldn't be shown and sort the remainder, returning a new array containing this group of objects. You can use the NSArray methods filteredArrayUsingQualifier and sortedArrayUsingKeyOrderingArray to create the new array.

If the delegate doesn't implement this method, the WODisplayGroup uses its own qualifier and sort ordering to update the displayed objects array.

See also: displayedObjects, qualifier, sortOrderings


displayGroupDidChangeDataSource

public abstract void displayGroupDidChangeDataSource(
WODisplayGroup aDisplayGroup)

Informs the delegate that aDisplayGroup's EODataSource (defined in the EOControl framework) has changed.


displayGroupDidChangeSelectedObjects

public abstract void displayGroupDidChangeSelectedObjects(WODisplayGroup aDisplayGroup)

Informs the delegate that aDisplayGroup's selected objects have changed, regardless of whether the selection indexes have changed.


displayGroupDidChangeSelection

public abstract void displayGroupDidChangeSelection(WODisplayGroup aDisplayGroup)

Informs the delegate that aDisplayGroup's selection has changed.


displayGroupShouldFetch

public abstract boolean displayGroupShouldFetch(WODisplayGroup aDisplayGroup)

Allows the delegate to prevent aDisplayGroup from fetching. If the delegate returns true, aDisplayGroup performs the fetch; if the delegate returns false, aDisplayGroup abandons the fetch.


shouldChangeSelectionToIndexes

public abstract boolean shouldChangeSelectionToIndexes(
WODisplayGroup aDisplayGroup,
NSArray newIndexes)

Allows the delegate to prevent a change in selection by aDisplayGroup. newIndexes is the proposed new selection. If the delegate returns true, the selection changes; if the delegate returns false, the selection remains as it is.


shouldDeleteObject

public abstract boolean shouldDeleteObject(
WODisplayGroup aDisplayGroup,
java.lang.Object anObject)

Allows the delegate to prevent aDisplayGroup from deleting anObject. If the delegate returns true, anObject is deleted; if the delegate returns false, the deletion is abandoned.


shouldInsertObject

public abstract boolean shouldInsertObject(
WODisplayGroup aDisplayGroup,
java.lang.Object anObject,
int anIndex)

Allows the delegate to prevent redisplay from inserting anObject at anIndex. If the delegate returns true, anObject is inserted; if the delegate returns false, the insertion is abandoned.


shouldRedisplayForChangesInEditingContext

public abstract boolean shouldRedisplayForChangesInEditingContext(
WODisplayGroup aDisplayGroup,
NSNotification aNotification)

Invoked whenever aDisplayGroup receives an EOObjectsChangedInEditingContextNotification, this method allows the delegate to suppress redisplay based on the nature of the change that has occurred. If the delegate returns true, aDisplayGroup redisplays; if it returns false, aDisplayGroup doesn't.

See also: redisplay


shouldRefetchForInvalidatedAllObjectsNotification

public abstract boolean shouldRefetchForInvalidatedAllObjects(
WODisplayGroup aDisplayGroup,
NSNotification aNotification)

Invoked whenever aDisplayGroup receives an EOInvalidatedAllObjectsInStoreNotification, this method allows the delegate to suppress the refetching of the invalidated objects. If the delegate returns true, aDisplayGroup immediately fetches its objects. If the delegate returns false, aDisplayGroup doesn't immediately fetch, instead delaying until absolutely necessary.

See also: redisplay



 

Copyright © 1998, Apple Computer, Inc. All rights reserved.