WebObjects 5.2

com.webobjects.eointerface
Class EOTextAssociation

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

public class EOTextAssociation
extends EOValueAssociation

EOTextAssociation is used as an association for displaying text values, with widgets such as NSTextFieldCell or JTextField. See EOAssociation for a general description of associations.

Aspects:

EOAssociation.ValueAspect,

EOAssociation.URLAspect,

EOAssociation.BackgroundColorAspect,

EOAssociation.BoldAspect,

EOAssociation.ItalicAspect,

EOAssociation.TextColorAspect,

EOAssociation.EnabledAspect

See Also:
EOAssociation

Inner Class Summary
static class EOTextAssociation.TextPlugin
          TextPlugin communicates with a UI widget (NSTextFieldCell or JTextField, for example) on behalf of an EOTextAssociation.
 
Inner classes inherited from class com.webobjects.eointerface.EOValueAssociation
EOValueAssociation.ValuePlugin
 
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
EOTextAssociation(Object object)
          Returns a new EOTextAssociation object that is not (yet) bound to any display group.
 
Method Summary
static Object defaultDisabledBackgroundColor()
          This method returns the global defaults for the background colors of disabled text fields.
static Object defaultEnabledBackgroundColor()
          This method returns the global defaults for the background colors of enabled text fields.
protected  Object displayValueFromURL(String URLString)
          This method returns a String value loaded from the URL specified.
 void dispose()
          Clears all references this association has to other objects especially its display object and EODisplayGroup.
static void setDefaultBackgroundColors(Object enabledColor, Object disabledColor)
          This method sets the global defaults for the background colors of text fields.
 void setUsesDefaultBackgroundColors(boolean flag)
          This method defines whether the text widget managed by this association will use the global defaults for background colors.
 boolean usesDefaultBackgroundColors()
          This method returns whether the text widget managed by this association will use the global defaults for background colors.
 
Methods inherited from class com.webobjects.eointerface.EOValueAssociation
bindAspect, displayValueAspect, endEditing, primaryAspect, subjectChanged, widgetDidBeginEditing, widgetDidChange, widgetDidEndEditing, widgetPluginClass
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation
canSupportValueFormatter, defaultPrefersContinuousChangeNotification, 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

EOTextAssociation

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

defaultDisabledBackgroundColor

public static Object defaultDisabledBackgroundColor()
This method returns the global defaults for the background colors of disabled text fields.
Returns:
an object representing the background color for disabled text fields

defaultEnabledBackgroundColor

public static Object defaultEnabledBackgroundColor()
This method returns the global defaults for the background colors of enabled text fields.
Returns:
an object representing the background color for enabled text fields

displayValueFromURL

protected Object displayValueFromURL(String URLString)
This method returns a String value loaded from the URL specified. An exception might be thrown (NSForwardException) for unsupported encodings.
Overrides:
displayValueFromURL in class EOValueAssociation
Parameters:
URLString - the URL to derive the value from
Returns:
the String value of the resource at URLString, or null

dispose

public void dispose()
Clears all references this association has to other objects especially its display object and EODisplayGroup. Call this method before nulling out a reference to this association to ensure it gets garbage collected properly. Subclasses should override this method to do any additional cleanup that may be needed and invoke super's implementation at the end.
Overrides:
dispose in class EOWidgetAssociation
See Also:
NSDisposable

setDefaultBackgroundColors

public static void setDefaultBackgroundColors(Object enabledColor,
                                              Object disabledColor)
This method sets the global defaults for the background colors of text fields.
Parameters:
enabledColor - the Object representing the background color for enabled text fields
disabledColor - the Object representing the background color for disabled text fields

setUsesDefaultBackgroundColors

public void setUsesDefaultBackgroundColors(boolean flag)
This method defines whether the text widget managed by this association will use the global defaults for background colors.
Parameters:
flag - if true, the global defaults are to be used

usesDefaultBackgroundColors

public boolean usesDefaultBackgroundColors()
This method returns whether the text widget managed by this association will use the global defaults for background colors.
Returns:
true if the global defaults are to be used; false otherwise

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

Copyright © 2003 Apple Computer, Inc.