WebObjects 5.2

com.webobjects.eointerface
Class EOValueAssociation.ValuePlugin

java.lang.Object
  |
  +--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
        |
        +--com.webobjects.eointerface.EOValueAssociation.ValuePlugin
All Implemented Interfaces:
NSDisposable
Direct Known Subclasses:
EOCocoaCheckBoxPlugin, EOCocoaImageViewPlugin, EOSwingCheckBoxPlugin, EOSwingImageViewPlugin, EOSwingQuickTimeViewPlugin, EOTextAssociation.TextPlugin
Enclosing class:
EOValueAssociation

public abstract static class EOValueAssociation.ValuePlugin
extends EOWidgetAssociation.WidgetPlugin

ValuePlugin communicates with a UI widget on behalf of an EOValueAssociation. The ValuePlugin class defines some basic functionality concrete subclasses must implement for this communication to work.


Inner classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Constructor Summary
EOValueAssociation.ValuePlugin(EOWidgetAssociation association, Object widget)
          Subclasses should override this constructor to do any initialization they need to, but should call the super(association, widget) constructor.
 
Method Summary
 boolean endEditing()
          Tells the plugin to stop any editing occuring in the UI at the moment.
abstract  void setValue(Object value, boolean isEnabled)
          Sets the value of this plugin's widget to value.
 boolean useURLAsValue()
          Expresses whether or not the plugin will use a URL for its display value.
abstract  Object value()
           
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
association, breakConnection, dispose, establishConnection, unacceptableAspects, widget, widgetKeysTaken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOValueAssociation.ValuePlugin

public EOValueAssociation.ValuePlugin(EOWidgetAssociation association,
                                      Object widget)
Subclasses should override this constructor to do any initialization they need to, but should call the super(association, widget) constructor.
Parameters:
association - EOValueAssociation object for which the plugin will handle setting and getting values on the UI widget
widget - the UI object that the plugin will use for display
Method Detail

endEditing

public boolean endEditing()
Tells the plugin to stop any editing occuring in the UI at the moment. The default implementation simply returns true.
Returns:
true if editing in the plugin ended successfully, false otherwise (if there was a validation error, for instance)

setValue

public abstract void setValue(Object value,
                              boolean isEnabled)
Sets the value of this plugin's widget to value.
Parameters:
value - object which will be used as the new value for display in the UI
isEnabled - if true, the widget should be enabled in the UI

useURLAsValue

public boolean useURLAsValue()
Expresses whether or not the plugin will use a URL for its display value. Subclasses that want to handle the URL directly can override this method to return true. Otherwise EOValueAssociation wiill try to retrieve the data that the URL points to and use that as the value to set in the widget.
Returns:
true if the plugin intends to use the URL as its display value, instead of the data represented by the URL; the default implementation returns false

value

public abstract Object value()
Returns:
the object value of this plugin's UI widget

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

Copyright © 2003 Apple Computer, Inc.