WebObjects 5.2

com.webobjects.eointerface
Class EOValueAssociation

java.lang.Object
  |
  +--com.webobjects.eocontrol.EODelayedObserver
        |
        +--com.webobjects.eointerface.EOAssociation
              |
              +--com.webobjects.eointerface.EOWidgetAssociation
                    |
                    +--com.webobjects.eointerface.EOValueAssociation
All Implemented Interfaces:
EOObserving, NSDisposable
Direct Known Subclasses:
EOPickTextAssociation, EOTextAssociation

public class EOValueAssociation
extends EOWidgetAssociation

EOValueAssociation is used for associations that display a single value object in a widget, with the value usually being editable. See EOAssociation for a general description of associations.

Aspects:

EOAssociation.ValueAspect,

EOAssociation.URLAspect,

EOAssociation.EnabledAspect


Inner Class Summary
static class EOValueAssociation.ValuePlugin
          ValuePlugin communicates with a UI widget on behalf of an EOValueAssociation.
 
Inner classes inherited from class com.webobjects.eointerface.EOWidgetAssociation
EOWidgetAssociation.WidgetPlugin
 
Fields inherited from class com.webobjects.eointerface.EOAssociation
ActionAspect, ArgumentAspect, AttributeAspectSignature, AttributeToManyAspectSignature, AttributeToOneAspectSignature, AttributeToOneToManyAspectSignature, BackgroundColorAspect, BoldAspect, ChildrenAspect, DestinationAspect, EnabledAspect, ExpandedIconAspect, IconAspect, IgnoreValue, IsLeafAspect, ItalicAspect, MatchKey1Aspect, MatchKey2Aspect, MatchKey3Aspect, NullAspectSignature, ParentAspect, RootAspect, SelectedIndexAspect, SelectedObjectAspect, SelectedTitleAspect, SetValue, SourceAspect, TextColorAspect, TitlesAspect, ToManyAspectSignature, ToOneAspectSignature, ToOneToManyAspectSignature, UnsetValue, URLAspect, ValueAspect
 
Fields inherited from class com.webobjects.eocontrol.EODelayedObserver
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird
 
Constructor Summary
EOValueAssociation(Object object)
          Returns a new EOValueAssociation object that is not bound to any display group.
 
Method Summary
 void bindAspect(String aspect, EODisplayGroup displayGroup, String key)
          Defines the receiver's link between its display object and displayGroup.
protected  String displayValueAspect()
           
protected  Object displayValueFromURL(String URLString)
          When the Association stores a URL rather than the data the URL references, this method is used to obtain (load) the data pointed to by the URL.
 boolean endEditing()
          This method will end editing for both the widget plugin and the Association.
 String primaryAspect()
          This method returns the primary aspect for this value association.
 void subjectChanged()
          Overridden by subclasses to update state when an EODisplayGroup's selections or contents change.
 boolean widgetDidBeginEditing()
          This method is called to notify the Association that the widget entered the editing state.
 boolean widgetDidChange()
          This method is called to notify the Association that the widget has changed data values for this association.
 boolean widgetDidEndEditing()
          This method is called to notify the Association that the widget has no longer in an editing state.
protected  Class widgetPluginClass()
          Returns the Class of widget plugin that this association requires for operation.
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation
canSupportValueFormatter, defaultPrefersContinuousChangeNotification, dispose, isUsableWithObject, objectKeysTaken, prefersContinuousChangeNotification, setDefaultPrefersContinuousChangeNotification, setObject, setPrefersContinuousChangeNotification, setValueFormatter, valueFormatter, widgetPlugin
 
Methods inherited from class com.webobjects.eointerface.EOAssociation
aspects, aspectSignatures, associationClassesForObject, breakConnection, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, establishConnection, isConnected, isEnabled, isEnabledAtIndex, isExplicitlyDisabled, object, priority, registerAssociationClass, setExplicitlyDisabled, setValueForAspect, setValueForAspectAtIndex, shouldEndEditing, shouldEndEditingAtIndex, valueForAspect, valueForAspectAtIndex
 
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

EOValueAssociation

public EOValueAssociation(Object object)
Returns a new EOValueAssociation object that is not bound to any display group.
Parameters:
widget - the UI widget object that the association expects to use to display values
Method Detail

bindAspect

public void bindAspect(String aspect,
                       EODisplayGroup displayGroup,
                       String key)
Defines the receiver's link between its display object and displayGroup. aspect is the name of the aspect it observes in its display object, and key is the name of the property it observes in displayGroup. Invoke establishConnection after this method to finish setting up the binding.
Overrides:
bindAspect in class EOAssociation
Parameters:
aspect - String that specifies what key of this association should be used to bind to EnterpriseObjects values
displayGroup - EODisplayGroup object to bind this association to
key - String specifying which property of the EOs in the display group should be used when setting values for aspect

displayValueAspect

protected String displayValueAspect()
Returns:
String that represents which aspect of this EOValueAssociation is being used for supplying display values

displayValueFromURL

protected Object displayValueFromURL(String URLString)
When the Association stores a URL rather than the data the URL references, this method is used to obtain (load) the data pointed to by the URL.
Parameters:
URLString - the URL of some data to obtain
Returns:
a NSData object holding the actual data pointed to by the URL

endEditing

public boolean endEditing()
This method will end editing for both the widget plugin and the Association.
Overrides:
endEditing in class EOAssociation
Returns:
true if both the widget plugin and the assocaiation were able to successfully end editing; false otherwise

primaryAspect

public String primaryAspect()
This method returns the primary aspect for this value association.
Overrides:
primaryAspect in class EOAssociation
Returns:
the name of the primary aspect (EOAssociation.ValueAspect)

subjectChanged

public void subjectChanged()
Overridden by subclasses to update state when an EODisplayGroup's selections or contents change. This method is invoked automatically anytime a display group that's bound to the receiver changes. The receiver can query its display group with selectionChanged and contentsChanged messages to determine how to update the display.
Overrides:
subjectChanged in class EOAssociation

widgetDidBeginEditing

public boolean widgetDidBeginEditing()
This method is called to notify the Association that the widget entered the editing state.
Returns:
true if this association 'agreed' to start editing, false otherwise

widgetDidChange

public boolean widgetDidChange()
This method is called to notify the Association that the widget has changed data values for this association.
Returns:
true if the assocaiation was able to process the values received from the widget; false if there was an error

widgetDidEndEditing

public boolean widgetDidEndEditing()
This method is called to notify the Association that the widget has no longer in an editing state.
Returns:
true if the assocaiation was able to successfully complete the editing state; false otherwise

widgetPluginClass

protected Class widgetPluginClass()
Description copied from class: EOWidgetAssociation
Returns the Class of widget plugin that this association requires for operation. Subclasses should override this method to return the Class of plugin they require in order to work. (For example EOActionWidgetAsssociation requires a plugin class of EOActionWidgetAssociation.ActionPlugin).
Overrides:
widgetPluginClass in class EOWidgetAssociation
Returns:
the Class object for EOValueAssociation.ValuePlugin

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

Copyright © 2003 Apple Computer, Inc.