From 40a9d99496e098562f090fb7ffce9e749011b131 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Mon, 20 May 2024 17:58:16 -0400 Subject: Formatting pass --- .../main/java/net/wotonomy/ui/DelegateAdapter.java | 380 +++++++++------------ 1 file changed, 157 insertions(+), 223 deletions(-) (limited to 'projects/net.wotonomy.ui/src/main/java/net/wotonomy/ui/DelegateAdapter.java') diff --git a/projects/net.wotonomy.ui/src/main/java/net/wotonomy/ui/DelegateAdapter.java b/projects/net.wotonomy.ui/src/main/java/net/wotonomy/ui/DelegateAdapter.java index ed572f4..e801406 100644 --- a/projects/net.wotonomy.ui/src/main/java/net/wotonomy/ui/DelegateAdapter.java +++ b/projects/net.wotonomy.ui/src/main/java/net/wotonomy/ui/DelegateAdapter.java @@ -24,234 +24,168 @@ import net.wotonomy.control.EODataSource; import net.wotonomy.foundation.NSArray; import net.wotonomy.foundation.NSNotification; - /** - * A convenience class for creating display group delegates. - * All methods of the delegate interface are implemented - * to do nothing. - * - * @author michael@mpowers.net - * @author $Author: cgruber $ - * @version $Revision: 904 $ - */ - public class DelegateAdapter implements EODisplayGroup.Delegate - { - /** - * Called when the specified data source fails - * to create an object for the specified display group. - */ - public void displayGroupCreateObjectFailed ( - EODisplayGroup aDisplayGroup, - EODataSource aDataSource ) - { - - } - - /** - * Called after the specified display group's - * data source is changed. - */ - public void displayGroupDidChangeDataSource ( - EODisplayGroup aDisplayGroup ) - { - - } - - /** - * Called after the specified display group's - * selection has changed. - */ - public void displayGroupDidChangeSelectedObjects ( - EODisplayGroup aDisplayGroup ) - { - - } - - /** - * Called after the specified display group's - * selection has changed. - */ - public void displayGroupDidChangeSelection ( - EODisplayGroup aDisplayGroup ) - { - - } - - /** - * Called after the specified object display group's - * selection has changed. - */ - public void displayGroupDidDeleteObject ( - EODisplayGroup aDisplayGroup, - Object anObject ) - { - - } - - /** - * Called after the specified display group - * has fetched the specified object list. - */ - public void displayGroupDidFetchObjects ( - EODisplayGroup aDisplayGroup, - List anObjectList ) - { - - } - - /** - * Called after the specified display group - * has inserted the specified object into - * its internal object list. - */ - public void displayGroupDidInsertObject ( - EODisplayGroup aDisplayGroup, - Object anObject ) - { - - } - - /** - * Called after the specified display group - * has set the specified value for the specified - * object and key. - */ - public void displayGroupDidSetValueForObject ( - EODisplayGroup aDisplayGroup, - Object aValue, - Object anObject, - String aKey ) - { - - } - - /** - * Called by the specified display group to - * determine what objects should be displayed - * for the objects in the specified list. - * @return An NSArray containing the objects - * to be displayed for the objects in the - * specified list. - */ - public NSArray displayGroupDisplayArrayForObjects ( - EODisplayGroup aDisplayGroup, - List aList ) - { - return new NSArray( aList ); - } - - /** - * Called by the specified display group before - * it attempts to change the selection. - * This implementation returns true. - * @return True to allow the selection to change, - * false otherwise. - */ - public boolean displayGroupShouldChangeSelection ( - EODisplayGroup aDisplayGroup, - List aSelectionList ) - { - return true; - } - - /** - * Called by the specified display group before - * it attempts to delete the specified object. - * This implementation returns true. - * @return True to allow the object to be deleted - * false to prevent the deletion. - */ - public boolean displayGroupShouldDeleteObject ( - EODisplayGroup aDisplayGroup, - Object anObject ) - { - return true; - } - - /** - * Called by the specified display group before - * it attempts display the specified alert to - * the user. - * This implementation returns true. - * @return True to allow the message to be - * displayed, false if you want to handle the - * alert yourself and suppress the display group's - * notification. - */ - public boolean displayGroupShouldDisplayAlert ( - EODisplayGroup aDisplayGroup, - String aTitle, - String aMessage ) - { - return true; - } - - /** - * Called by the specified display group before - * it attempts fetch objects. - * This implementation returns true. - * @return True to allow the fetch to take place, - * false to prevent the fetch. - */ - public boolean displayGroupShouldFetch ( - EODisplayGroup aDisplayGroup ) - { - return true; - } - - /** - * Called by the specified display group before - * it attempts to insert the specified object. - * This implementation returns true. - * @return True to allow the object to be inserted - * false to prevent the insertion. - */ - public boolean displayGroupShouldInsertObject ( - EODisplayGroup aDisplayGroup, - Object anObject, - int anIndex ) - { - return true; - } - - /** - * No idea what this might indicate, - * nor what the notification indicates. - * This implementation returns true. - */ - public boolean displayGroupShouldRedisplay ( - EODisplayGroup aDisplayGroup, - NSNotification aNotification ) - { - return true; - } - - /** - * No idea what this might indicate, - * nor what the notification indicates. - */ - public boolean displayGroupShouldRefetch ( - EODisplayGroup aDisplayGroup, - NSNotification aNotification ) - { - return true; - } - - } +/** + * A convenience class for creating display group delegates. All methods of the + * delegate interface are implemented to do nothing. + * + * @author michael@mpowers.net + * @author $Author: cgruber $ + * @version $Revision: 904 $ + */ +public class DelegateAdapter implements EODisplayGroup.Delegate { + /** + * Called when the specified data source fails to create an object for the + * specified display group. + */ + public void displayGroupCreateObjectFailed(EODisplayGroup aDisplayGroup, EODataSource aDataSource) { + + } + + /** + * Called after the specified display group's data source is changed. + */ + public void displayGroupDidChangeDataSource(EODisplayGroup aDisplayGroup) { + + } + + /** + * Called after the specified display group's selection has changed. + */ + public void displayGroupDidChangeSelectedObjects(EODisplayGroup aDisplayGroup) { + + } + + /** + * Called after the specified display group's selection has changed. + */ + public void displayGroupDidChangeSelection(EODisplayGroup aDisplayGroup) { + + } + + /** + * Called after the specified object display group's selection has changed. + */ + public void displayGroupDidDeleteObject(EODisplayGroup aDisplayGroup, Object anObject) { + + } + + /** + * Called after the specified display group has fetched the specified object + * list. + */ + public void displayGroupDidFetchObjects(EODisplayGroup aDisplayGroup, List anObjectList) { + + } + + /** + * Called after the specified display group has inserted the specified object + * into its internal object list. + */ + public void displayGroupDidInsertObject(EODisplayGroup aDisplayGroup, Object anObject) { + + } + + /** + * Called after the specified display group has set the specified value for the + * specified object and key. + */ + public void displayGroupDidSetValueForObject(EODisplayGroup aDisplayGroup, Object aValue, Object anObject, + String aKey) { + + } + + /** + * Called by the specified display group to determine what objects should be + * displayed for the objects in the specified list. + * + * @return An NSArray containing the objects to be displayed for the objects in + * the specified list. + */ + public NSArray displayGroupDisplayArrayForObjects(EODisplayGroup aDisplayGroup, List aList) { + return new NSArray(aList); + } + + /** + * Called by the specified display group before it attempts to change the + * selection. This implementation returns true. + * + * @return True to allow the selection to change, false otherwise. + */ + public boolean displayGroupShouldChangeSelection(EODisplayGroup aDisplayGroup, List aSelectionList) { + return true; + } + + /** + * Called by the specified display group before it attempts to delete the + * specified object. This implementation returns true. + * + * @return True to allow the object to be deleted false to prevent the deletion. + */ + public boolean displayGroupShouldDeleteObject(EODisplayGroup aDisplayGroup, Object anObject) { + return true; + } + + /** + * Called by the specified display group before it attempts display the + * specified alert to the user. This implementation returns true. + * + * @return True to allow the message to be displayed, false if you want to + * handle the alert yourself and suppress the display group's + * notification. + */ + public boolean displayGroupShouldDisplayAlert(EODisplayGroup aDisplayGroup, String aTitle, String aMessage) { + return true; + } + + /** + * Called by the specified display group before it attempts fetch objects. This + * implementation returns true. + * + * @return True to allow the fetch to take place, false to prevent the fetch. + */ + public boolean displayGroupShouldFetch(EODisplayGroup aDisplayGroup) { + return true; + } + + /** + * Called by the specified display group before it attempts to insert the + * specified object. This implementation returns true. + * + * @return True to allow the object to be inserted false to prevent the + * insertion. + */ + public boolean displayGroupShouldInsertObject(EODisplayGroup aDisplayGroup, Object anObject, int anIndex) { + return true; + } + + /** + * No idea what this might indicate, nor what the notification indicates. This + * implementation returns true. + */ + public boolean displayGroupShouldRedisplay(EODisplayGroup aDisplayGroup, NSNotification aNotification) { + return true; + } + + /** + * No idea what this might indicate, nor what the notification indicates. + */ + public boolean displayGroupShouldRefetch(EODisplayGroup aDisplayGroup, NSNotification aNotification) { + return true; + } + +} /* - * $Log$ - * Revision 1.2 2006/02/18 23:14:35 cgruber - * Update imports and maven dependencies. + * $Log$ Revision 1.2 2006/02/18 23:14:35 cgruber Update imports and maven + * dependencies. * - * Revision 1.1 2006/02/16 13:22:22 cgruber - * Check in all sources in eclipse-friendly maven-enabled packages. + * Revision 1.1 2006/02/16 13:22:22 cgruber Check in all sources in + * eclipse-friendly maven-enabled packages. * - * Revision 1.2 2003/08/06 23:07:52 chochos - * general code cleanup (mostly, removing unused imports) + * Revision 1.2 2003/08/06 23:07:52 chochos general code cleanup (mostly, + * removing unused imports) * - * Revision 1.1 2001/01/24 14:23:17 mpowers - * Contributing DelegateAdapter. + * Revision 1.1 2001/01/24 14:23:17 mpowers Contributing DelegateAdapter. * * */ - -- cgit v1.2.3