|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public void displayGroupCreateObjectFailed(EODisplayGroup group, EODataSource dataSource)
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.group
- EODisplayGroup that failed to create a new object.dataSource
- EODataSource.public void displayGroupDidChangeDataSource(EODisplayGroup group)
group
's EODataSource has changed.group
- EODisplayGroup.public void displayGroupDidChangeSelectedObjects(EODisplayGroup group)
group
's set of selected objects has changed, regardless of
whether the selection indexes have changed.group
- EODisplay which had its set of selected objects changed.public void displayGroupDidChangeSelection(EODisplayGroup group)
group
's selection has changed.group
- EODisplayGroup which had its selection changed.public void displayGroupDidDeleteObject(EODisplayGroup group, Object eo)
group
has deleted eo
.group
- EODisplayGroup.eo
- EOEnterpriseObject.public void displayGroupDidFetchObjects(EODisplayGroup group, NSArray objects)
group
has fetched objects.group
- EODisplayGroup.objects
- NSArray of objects.public void displayGroupDidInsertObject(EODisplayGroup group, Object eo)
group
has inserted eo
.group
- EODisplayGroup anObject was inserted into.eo
- EOEnterpriseObject that was inserted.public void displayGroupDidSetValueForObject(EODisplayGroup group, Object value, Object eo, String key)
group
has altered a property value of eo
. key identifies
the property, and value
is its new value.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.public NSArray displayGroupDisplayArrayForObjects(EODisplayGroup group, NSArray objects)
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.group
- EODisplayGroup.objects
- contains all of group
's objects.public boolean displayGroupShouldChangeSelection(EODisplayGroup group, NSArray newIndexes)
group
.group
- EODisplayGroup that received the notification.newIndexes
- the proposed new selection, an array of Numbers.true
, the selection changes; if
the delegate returns false
, the selection remains as it is.public boolean displayGroupShouldDeleteObject(EODisplayGroup group, Object eo)
group
from deleting eo
.eo
- EOEnterpriseObject group
wants to delete.group
- EODisplayGroup that currently contains eo
.true
, eo
is deleted; if
the delegate returns false
, the deletion is abandoned.public boolean displayGroupShouldDisplayAlert(EODisplayGroup group, String title, String message)
group
from displaying an attention panel with title
and message. The delegate can return.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.true
to allow group
to display the panel, or
false
to prevent it from doing so (perhaps displaying a different attention panel).public boolean displayGroupShouldFetch(EODisplayGroup group)
group
from fetching.group
- EODisplayGroup that wants to fetch.true
, group
performs the fetch;
if the delegate returns false
, group
abandons the fetch.public boolean displayGroupShouldInsertObject(EODisplayGroup group, Object eo, int index)
group
from inserting anObject at index
.group
- EODisplayGroup.eo
- EOEnterpriseObject.index
- int index.true
, anObject is inserted;
if the delegate returns false
, the insertion is abandoned.public boolean displayGroupShouldRedisplay(EODisplayGroup group, NSNotification notification)
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.group
- EODisplayGroup that received the notificationnotification
- NSNotifiaction of which objects changed and in which EOEditingContexttrue
if group
should redisplay, false
if it should notpublic boolean displayGroupShouldRefetch(EODisplayGroup group, NSNotification notification)
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.group
- EODisplayGroup that received the notification.notification
- NSNotifiaction.true
for group
to immediately refetches its objects, false
otherwise.
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |