WebObjects 5.2

com.webobjects.eointerface
Interface EODisplayGroup.Delegate

Enclosing class:
EODisplayGroup

public static interface EODisplayGroup.Delegate

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 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 Summary
 void displayGroupCreateObjectFailed(EODisplayGroup group, EODataSource dataSource)
          Invoked from insertNewObjectAtIndex to inform the delegate that group has failed to create a new object for dataSource.
 void displayGroupDidChangeDataSource(EODisplayGroup group)
          Informs the delegate that group 's EODataSource has changed.
 void displayGroupDidChangeSelectedObjects(EODisplayGroup group)
          Informs the delegate that group 's set of selected objects has changed, regardless of whether the selection indexes have changed.
 void displayGroupDidChangeSelection(EODisplayGroup group)
          Informs the delegate that group's selection has changed.
 void displayGroupDidDeleteObject(EODisplayGroup group, Object eo)
          Informs the delegate that group has deleted eo.
 void displayGroupDidFetchObjects(EODisplayGroup group, NSArray objects)
          Informs the delegate that group has fetched objects.
 void displayGroupDidInsertObject(EODisplayGroup group, Object eo)
          Informs the delegate that group has inserted eo.
 void displayGroupDidSetValueForObject(EODisplayGroup group, Object value, Object eo, String key)
          Informs the delegate that group has altered a property value of eo.
 NSArray displayGroupDisplayArrayForObjects(EODisplayGroup group, NSArray objects)
          Invoked from updateDisplayedObjects, this method allows the delegate to filter and sort group's array of objects to limit which ones get displayed.
 boolean displayGroupShouldChangeSelection(EODisplayGroup group, NSArray newIndexes)
          Allows the delegate to prevent a change in selection by group.
 boolean displayGroupShouldDeleteObject(EODisplayGroup group, Object eo)
          Allows the delegate to prevent group from deleting eo.
 boolean displayGroupShouldDisplayAlert(EODisplayGroup group, String title, String message)
          Allows the delegate to prevent group from displaying an attention panel with title and message.
 boolean displayGroupShouldFetch(EODisplayGroup group)
          Allows the delegate to prevent group from fetching.
 boolean displayGroupShouldInsertObject(EODisplayGroup group, Object eo, int index)
          Allows the delegate to prevent group from inserting anObject at index.
 boolean displayGroupShouldRedisplay(EODisplayGroup group, NSNotification notification)
          Invoked whenever group receives an ObjectsChangedInEditingContextNotification, this method allows the delegate to suppress redisplay based on the nature of the change that has occurred.
 boolean displayGroupShouldRefetch(EODisplayGroup group, NSNotification notification)
          Invoked whenever group receives an InvalidatedAllObjectsInStoreNotification, this method allows the delegate to suppress refetching of the invalidated objects.
 

Method Detail

displayGroupCreateObjectFailed

public void displayGroupCreateObjectFailed(EODisplayGroup group,
                                           EODataSource dataSource)
Invoked from insertNewObjectAtIndex to inform the delegate that group has failed to create a new object for dataSource. If the delegate doesn't implement this method, the EODisplayGroup instead runs an alert panel to inform the user of the failure.
Parameters:
group - EODisplayGroup that failed to create a new object.
dataSource - EODataSource.

displayGroupDidChangeDataSource

public void displayGroupDidChangeDataSource(EODisplayGroup group)
Informs the delegate that group 's EODataSource has changed.
Parameters:
group - EODisplayGroup.

displayGroupDidChangeSelectedObjects

public void displayGroupDidChangeSelectedObjects(EODisplayGroup group)
Informs the delegate that group 's set of selected objects has changed, regardless of whether the selection indexes have changed.
Parameters:
group - EODisplay which had its set of selected objects changed.

displayGroupDidChangeSelection

public void displayGroupDidChangeSelection(EODisplayGroup group)
Informs the delegate that group's selection has changed.
Parameters:
group - EODisplayGroup which had its selection changed.

displayGroupDidDeleteObject

public void displayGroupDidDeleteObject(EODisplayGroup group,
                                        Object eo)
Informs the delegate that group has deleted eo.
Parameters:
group - EODisplayGroup.
eo - EOEnterpriseObject.

displayGroupDidFetchObjects

public void displayGroupDidFetchObjects(EODisplayGroup group,
                                        NSArray objects)
Informs the delegate that group has fetched objects.
Parameters:
group - EODisplayGroup.
objects - NSArray of objects.

displayGroupDidInsertObject

public void displayGroupDidInsertObject(EODisplayGroup group,
                                        Object eo)
Informs the delegate that group has inserted eo.
Parameters:
group - EODisplayGroup anObject was inserted into.
eo - EOEnterpriseObject that was inserted.

displayGroupDidSetValueForObject

public void displayGroupDidSetValueForObject(EODisplayGroup group,
                                             Object value,
                                             Object eo,
                                             String key)
Informs the delegate that group has altered a property value of eo. key identifies the property, and value is its new value.
Parameters:
group - EODisplayGroup which altered eo's property value.
value - the property's new value.
eo - EOEnterpriseObject that was altered.
key - identifies the property which had its value changed.

displayGroupDisplayArrayForObjects

public NSArray displayGroupDisplayArrayForObjects(EODisplayGroup group,
                                                  NSArray objects)
Invoked from updateDisplayedObjects, this method allows the delegate to filter and sort group's array of objects to limit which ones get displayed. 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.
Parameters:
group - EODisplayGroup.
objects - contains all of group's objects.
Returns:
a new filtered and sorted array of objects.

displayGroupShouldChangeSelection

public boolean displayGroupShouldChangeSelection(EODisplayGroup group,
                                                 NSArray newIndexes)
Allows the delegate to prevent a change in selection by group.
Parameters:
group - EODisplayGroup that received the notification.
newIndexes - the proposed new selection, an array of Numbers.
Returns:
if the delegate returns true, the selection changes; if the delegate returns false, the selection remains as it is.

displayGroupShouldDeleteObject

public boolean displayGroupShouldDeleteObject(EODisplayGroup group,
                                              Object eo)
Allows the delegate to prevent group from deleting eo.
Parameters:
eo - EOEnterpriseObject group wants to delete.
group - EODisplayGroup that currently contains eo.
Returns:
if the delegate returns true, eo is deleted; if the delegate returns false, the deletion is abandoned.

displayGroupShouldDisplayAlert

public boolean displayGroupShouldDisplayAlert(EODisplayGroup group,
                                              String title,
                                              String message)
Allows the delegate to prevent group from displaying an attention panel with title and message. The delegate can return.
Parameters:
group - EODisplayGroup that wants to display the attention panel.
title - string title of the attention panel.
message - string message to display in the attention panel.
Returns:
true to allow group to display the panel, or false to prevent it from doing so (perhaps displaying a different attention panel).

displayGroupShouldFetch

public boolean displayGroupShouldFetch(EODisplayGroup group)
Allows the delegate to prevent group from fetching.
Parameters:
group - EODisplayGroup that wants to fetch.
Returns:
if the delegate returns true, group performs the fetch; if the delegate returns false, group abandons the fetch.

displayGroupShouldInsertObject

public boolean displayGroupShouldInsertObject(EODisplayGroup group,
                                              Object eo,
                                              int index)
Allows the delegate to prevent group from inserting anObject at index.
Parameters:
group - EODisplayGroup.
eo - EOEnterpriseObject.
index - int index.
Returns:
if the delegate returns true, anObject is inserted; if the delegate returns false, the insertion is abandoned.

displayGroupShouldRedisplay

public boolean displayGroupShouldRedisplay(EODisplayGroup group,
                                           NSNotification notification)
Invoked whenever group 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, group redisplays; if it returns false, group doesn't. notification supplies the EOEditingContext that has changed, as well as which objects have changed and how. See the EOEditingContext class specification for information on ObjectsChangedInEditingContextNotification.
Parameters:
group - EODisplayGroup that received the notification
notification - NSNotifiaction of which objects changed and in which EOEditingContext
Returns:
true if group should redisplay, false if it should not

displayGroupShouldRefetch

public boolean displayGroupShouldRefetch(EODisplayGroup group,
                                         NSNotification notification)
Invoked whenever group receives an InvalidatedAllObjectsInStoreNotification, this method allows the delegate to suppress refetching of the invalidated objects. If the delegate returns true, group immediately refetches its objects. If the delegate returns false, group 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.
Parameters:
group - EODisplayGroup that received the notification.
notification - NSNotifiaction.
Returns:
true for group to immediately refetches its objects, false otherwise.

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.