|
WebObjects 5.2.3 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.webobjects.eointerface.EOWidgetPluginRegistry
The EOWidgetPluginRegistry maintains a mapping from widget plugin classes to association and widget classes. The registry provides static methods for setting and getting which plugin should be used, given a widget and association. So, for any pair of association and widget classes, there can be only one widget plugin class registered. This allows for objects of any association class to be used with multiple widgets (regardless of widget set). Typically, when an application using the widget plugin registry starts up, the application first registers widget plugins with the registry, before the application's nib's are loaded.
| Nested Class Summary | |
static class |
EOWidgetPluginRegistry.WidgetSetPlugin
Abstract super class for plugins that handle the widget set specific task of displaying alert panels. |
| Constructor Summary | |
EOWidgetPluginRegistry()
|
|
| Method Summary | |
static Class |
findWidgetPluginClass(Class associationClass,
Class widgetClass)
Searches the set of registered plugins, looking for a widget plugin class that is registered for use with EOAssociation's of class associationClass and objects
of class widgetClass and returns the first one found. |
static EOWidgetAssociation.WidgetPlugin |
newWidgetPluginForAssociation(EOWidgetAssociation association,
Object widget)
Creates a new instance of the widget plugin class that is usable with association
and widget. |
static void |
registerWidgetPluginClass(Class associationClass,
Class widgetClass,
Class widgetPluginClass)
Registers widgetPluginClass with the application's EOWidgetPluginRegistry. |
static void |
setWidgetSetPlugin(EOWidgetPluginRegistry.WidgetSetPlugin widgetSetPlugin)
Sets widgetSetPlugin as the application's WidgetSetPlugin. |
static EOWidgetPluginRegistry.WidgetSetPlugin |
widgetSetPlugin()
Returns the application's WidgetSetPlugin. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EOWidgetPluginRegistry()
| Method Detail |
public static Class findWidgetPluginClass(Class associationClass,
Class widgetClass)
associationClass and objects
of class widgetClass and returns the first one found. This method will
attempt to find a widget plugin for widgetClass's superclass or associationClass's
superclass if no widget plugin is registered for widgetClass and associationClass.
associationClass - the association class the widget plugin should be usable with.widgetClass - the widget class that the widget plugin should be usable with.
associationClass
and widgetClass objects, or null if no such object is registered
public static EOWidgetAssociation.WidgetPlugin newWidgetPluginForAssociation(EOWidgetAssociation association,
Object widget)
association
and widget. This method looks for the widget plugin class that is registered for
use with association and widget.
This method throws an IllegalArgumentException if either association or widget
are null or if the found widget plugin class is not a subclass of association.widgetPluginClass().
Throws an IllegalStateException if no widget plugin is registered for
use with association and widget.
association - the association the widget plugin should be usable withwidget - the widget that the widget plugin should be usable with
public static void registerWidgetPluginClass(Class associationClass,
Class widgetClass,
Class widgetPluginClass)
widgetPluginClass with the application's EOWidgetPluginRegistry.
widgetPluginClass is registered as the widget plugin class to use
to connect associations of class associationClass to widgets of class
widgetClass. Any widget plugin class that was previously registered
for this associationClass/widgetClass combination is unregistered.
associationClass - the association class the widget plugin can be usable withwidgetClass - the widget class that the widget plugin should be used withwidgetPluginClass - the widget plugin class to use to connect objects of class
widgetPluginClass and associations of class associationClasspublic static void setWidgetSetPlugin(EOWidgetPluginRegistry.WidgetSetPlugin widgetSetPlugin)
widgetSetPlugin as the application's WidgetSetPlugin.
widgetSetPlugin - the WidgetSetPlugin object for the applicationpublic static EOWidgetPluginRegistry.WidgetSetPlugin widgetSetPlugin()
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||