PATH  Documentation > WebObjects 4.5 > EOInterface Reference

Table of Contents

EODisplayGroup.Delegate


(informal interface)
Package:
com.apple.client.eointerface
com.apple.yellow.eointerface

Interface Description


The EODisplayGroup.Delegate interface defines methods that an EODisplayGroup can invoke in its delegate. Delegates are not required to provide implementations for all of the methods in the interface, and you don't have to use the implements keyword to specify that the object implements the Delegates interface. Instead, declare and implement any subset of the methods declared in the interface that you need, and use the EODisplayGroup method setDelegate method to assign your object as the delegate. A display group can determine if the delegate doesn't implement a delegate method and only attempts to invoke the methods the delegate actually implements.



Method Types


Fetching objects
displayGroupShouldFetch
displayGroupDidFetchObjects
displayGroupShouldRefetch
Inserting, updating, and deleting objects
displayGroupShouldInsertObject
displayGroupDidInsertObject
displayGroupCreateObjectFailed
displayGroupDidSetValueForObject
displayGroupShouldDeleteObject
displayGroupDidDeleteObject
Managing the display
displayGroupShouldDisplayAlert
displayGroupShouldRedisplay
displayGroupDisplayArrayForObjects
Managing the selection
displayGroupShouldChangeSelection
displayGroupDidChangeSelection
displayGroupDidChangeSelectedObjects
Changing the data source
displayGroupDidChangeDataSource


Instance Methods



displayGroupCreateObjectFailed

public abstract void displayGroupCreateObjectFailed( EODisplayGroup aDisplayGroup, com.apple.yellow.eocontrol.EODataSource 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 EODisplayGroup instead runs an alert panel to inform the user of the failure.

displayGroupDidChangeDataSource

public abstract void displayGroupDidChangeDataSource(EODisplayGroup aDisplayGroup)

Informs the delegate that aDisplayGroup 's EODataSource has changed.

displayGroupDidChangeSelectedObjects

public abstract void displayGroupDidChangeSelectedObjects(EODisplayGroup aDisplayGroup)

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

displayGroupDidChangeSelection

public abstract void displayGroupDidChangeSelection(EODisplayGroup aDisplayGroup)

Informs the delegate that aDisplayGroup 's selection has changed.

displayGroupDidDeleteObject

public abstract void displayGroupDidDeleteObject( EODisplayGroup aDisplayGroup, Object anObject)

Informs the delegate that aDisplayGroup has deleted anObject.

displayGroupDidFetchObjects

public abstract void displayGroupDidFetchObjects( EODisplayGroup aDisplayGroup, NSArray objects)

Informs the delegate that aDisplayGroup has fetched objects.

displayGroupDidInsertObject

public abstract void displayGroupDidInsertObject( EODisplayGroup aDisplayGroup, Object anObject)

Informs the delegate that aDisplayGroup has inserted anObject.

displayGroupDidSetValueForObject

public abstract void displayGroupDidSetValueForObject( EODisplayGroup aDisplayGroup, Object value, Object anObject, String key)

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

displayGroupDisplayArrayForObjects

public abstract NSArray displayGroupDisplayArrayForObjects( EODisplayGroup 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 EOQualifier's filteredArrayUsingQualifier and EOSortOrdering's sortedArrayUsingKeyOrderArray methods in EOControl to create the new array.

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

See Also: sortOrderings, qualifier, displayedObjects



displayGroupShouldChangeSelection

public abstract boolean displayGroupShouldChangeSelection( EODisplayGroup aDisplayGroup, NSArray newIndexes)

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

displayGroupShouldDeleteObject

public abstract boolean displayGroupShouldDeleteObject( EODisplayGroup aDisplayGroup, 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.

displayGroupShouldDisplayAlert

public abstract boolean displayGroupShouldDisplayAlert( EODisplayGroup aDisplayGroup, String title, String message)

Allows the delegate to prevent aDisplayGroup from displaying an attention panel with title and message. The delegate can return true to allow aDisplayGroup to display the panel, or false to prevent it from doing so (perhaps displaying a different attention panel).

displayGroupShouldFetch

public abstract boolean displayGroupShouldFetch(EODisplayGroup 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.

displayGroupShouldInsertObject

public abstract boolean displayGroupShouldInsertObject( EODisplayGroup aDisplayGroup, Object anObject, int anIndex)

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

displayGroupShouldRedisplay

public abstract boolean displayGroupShouldRedisplay( EODisplayGroup aDisplayGroup, NSNotification aNotification)

Invoked whenever aDisplayGroup receives an ObjectsChangedInEditingContextNotification, 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. aNotification supplies the EOEditingContext that has changed, as well as which objects have changed and how. See the EOEditingContext class specification for information on ObjectsChangedInEditingContextNotification.

See Also: redisplay



displayGroupShouldRefetch

public abstract boolean displayGroupShouldRefetch( EODisplayGroup aDisplayGroup, NSNotification aNotification)

Invoked whenever aDisplayGroup receives an InvalidatedAllObjectsInStoreNotification, this method allows the delegate to suppress refetching of the invalidated objects. If the delegate returns true, aDisplayGroup immediately refetches its objects. If the delegate returns false, aDisplayGroup doesn't immediately fetch, instead delaying until absolutely necessary. aNotification is an NSNotification. See the EOObjectStore and EOEditingContext class specifications for information on this notification.


Table of Contents