Inherits From:
com.apple.yellow.eointerface
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.
displayGroupCreateObjectFailed
(
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,
java.lang.Object anObject)
Informs the delegate that aDisplayGroup has deleted anObject.
displayGroupDidFetchObjects
public abstract void displayGroupDidFetchObjects
(
EODisplayGroup aDisplayGroup,
com.apple.yellow.foundation.NSArray objects)
Informs the delegate that aDisplayGroup has fetched objects.
displayGroupDidInsertObject
public abstract void displayGroupDidInsertObject
(
EODisplayGroup aDisplayGroup,
java.lang.Object anObject)
Informs the delegate that aDisplayGroup has inserted anObject.
displayGroupDidSetValueForObject
public abstract void displayGroupDidSetValueForObject
(
EODisplayGroup 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.
displayGroupDisplayArrayForObjects
public abstract com.apple.yellow.foundation.NSArray displayGroupDisplayArrayForObjects
(
EODisplayGroup aDisplayGroup,
com.apple.yellow.foundation.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 added NSArray methods filteredArrayUsingQualifier:
and sortedArrayUsingKeyOrderArray:
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, com.apple.yellow.foundation.NSArray newIndexes)
Allows the delegate to prevent a change in selection by aDisplayGroup. newIndexes is the proposed new selection, an array of NSNumbers . 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,
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.
displayGroupShouldDisplayAlert
public abstract boolean displayGroupShouldDisplayAlert
(
EODisplayGroup aDisplayGroup,
java.lang.String title,
java.lang.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,
java.lang.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,
com.apple.yellow.foundation.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. aNotification supplies the EOEditingContext that has changed, as well as which objects have changed and how. See the EOEditingContext class specification for information on EOObjectsChangedInEditingContextNotification.
See also:
redisplay
displayGroupShouldRefetch
public abstract boolean displayGroupShouldRefetch
(
EODisplayGroup aDisplayGroup,
com.apple.yellow.foundation.NSNotification aNotification)
Invoked whenever aDisplayGroup receives an EOInvalidatedAllObjectsInStoreNotification, 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.