|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eocontrol.EODelayedObserver | +--com.webobjects.eointerface.EOAssociation | +--com.webobjects.eointerface.EOWidgetAssociation
The EOWidgetAssociation is the superclass for all associations that connect to user interface
widgets. Because associations are meant to be widget-set independent, EOWidgetAssociations manage
their UI widgets through the help of EOWidgetAssociation.WidgetPlugin concrete subclasses.
Each EOWidgetAssociation has a related abstract plugin class. Concrete plugin implementations handle
communicating with widgets in a platform specific way. For instance, the EOCocoaButtonPlugin reacts to
actions on Cocoa NSButtons, while the EOSwingButtonPlugin reacts to events from javax.swing.JButtons
.
The abstraction the widget-plugins provide allows for an identical set of EOAssociations
for both Cocoa/EOF and Java Client applications.
Widget plugins are automatically created for EOWidgetAssociations based on the widget the association is set up to work with. In order to know what kind of plugin to create, EOInterface keeps a registry of whcih plugins should be created for any pairing of an association and a widget. This registry is held in the EOWidgetPluginRegistry.
EOWidgetPluginRegistry
Inner Class Summary | |
static class |
EOWidgetAssociation.WidgetPlugin
WidgetPlugin is an abstract superclass for plugins that provide a layer of abstraction between user interface widgets and EOWidgetAssociation subclasses. |
Fields inherited from class com.webobjects.eocontrol.EODelayedObserver |
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird |
Constructor Summary | |
EOWidgetAssociation(Object object)
Used by subclasses of EOWidgetAssociation to initialize data structures and set aDisplayObject as the display object
that the association manages. |
Method Summary | |
boolean |
canSupportValueFormatter()
Returns whether or not this association supports setting a value formatter on its plugin or display object. |
static boolean |
defaultPrefersContinuousChangeNotification()
Returns the default value for the class preference for continuous change notification. |
void |
dispose()
Clears all references this association has to other objects especially its display object and EODisplayGroup. |
boolean |
isUsableWithObject(Object object)
Returns true if aDisplayObject is usable with the association. |
NSArray |
objectKeysTaken()
Overridden by subclasses to return the names of display object outlets that instances assume control of. |
boolean |
prefersContinuousChangeNotification()
Returns whether or not the receiver should be notified of every change made to its display object. |
static void |
setDefaultPrefersContinuousChangeNotification(boolean flag)
Sets the default preference for continuous change notification for all new instances of the association. |
void |
setObject(Object object)
See the setObject method description in the superclass EOAssociation. |
void |
setPrefersContinuousChangeNotification(boolean flag)
Sets whether or not the receiver should be notified of every change made to its display object. |
void |
setValueFormatter(Object format)
Attempts to set format as the formatter object
for this association's display object. |
Object |
valueFormatter()
Returns the object used to format values in the association's display object. |
EOWidgetAssociation.WidgetPlugin |
widgetPlugin()
|
protected Class |
widgetPluginClass()
Returns the Class of widget plugin that this association requires for operation. |
Methods inherited from class com.webobjects.eocontrol.EODelayedObserver |
discardPendingNotification, objectWillChange, observerQueue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EOWidgetAssociation(Object object)
aDisplayObject
as the display object
that the association manages.aDisplayObject
- display object for this association
to manage; subclasses should call their super class's constructor
and pass in aDisplayObject
Method Detail |
public boolean canSupportValueFormatter()
true
if the association has a widget plugin and it
implements EOWidgetAssociation.WidgetPlugin.Formatting;
false
otherwisepublic static boolean defaultPrefersContinuousChangeNotification()
true
if the preference set by default in new
instances for continuous change notification is true
;
false
otherwiseprefersContinuousChangeNotification()
,
setDefaultPrefersContinuousChangeNotification(boolean)
public void dispose()
super
's implementation
at the end.dispose
in class EOAssociation
NSDisposable
public boolean isUsableWithObject(Object object)
true
if aDisplayObject
is usable with the association.isUsableWithObject
in class EOAssociation
aDisplayObject
- object this method should verify is usable
with the associationtrue
if a widget plugin can be found that works with
aDisplayObject
, and if either the plugin found is a subclass of the
class returned by widgetPluginClass
, or if widgetPluginClass
returns null
;
false
otherwiseEOAssociation.isUsableWithObject(java.lang.Object)
public NSArray objectKeysTaken()
objectKeysTaken
in class EOAssociation
public boolean prefersContinuousChangeNotification()
setPrefersContinuousChangeNotification
method, the result
will be the same as the
defaultPrefersContinuousChangeNotification
result.true
if the receiver wants to be notified
every time a change has been made to its display
object; false
otherwisepublic static void setDefaultPrefersContinuousChangeNotification(boolean flag)
flag
- if true
, all new instances of the association
will, by default, be notified every time a change has
been made to its display object; if false
, by default,
only once editing has ended in the display object will the
association receive a notificationpublic void setObject(Object object)
setObject
method description in the superclass EOAssociation.setObject
in class EOAssociation
EOAssociation.setObject(java.lang.Object)
public void setPrefersContinuousChangeNotification(boolean flag)
flag
- if true
, the receiver will be notified
every time a change has been made to its display
object; if false
, only once editing has ended in the
display object will the association receive
a notificationpublic void setValueFormatter(Object format)
format
as the formatter object
for this association's display object. If the association's
widget plugin is null
or it doesn't implement the
EOWidgetAssociation.WidgetPlugin.Formatting interface,
this method throws an IllegalStateException
.format
- object to use to format values in the
association's display objectpublic Object valueFormatter()
null
or it doesn't implement the
EOWidgetAssociation.WidgetPlugin.Formatting interface,
this method throws an IllegalStateException
.public EOWidgetAssociation.WidgetPlugin widgetPlugin()
protected Class widgetPluginClass()
|
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 |