WebObjects 5.2

com.webobjects.eointerface
Class EOTreeAssociation

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

public class EOTreeAssociation
extends EOWidgetAssociation

EOTreeAssociation is used as an association for displaying hierarchical object trees, with widgets such as JTree. See EOAssociation for a general description of associations.

Aspects:

EOAssociation.ChildrenAspect,

EOAssociation.RootAspect,

EOAssociation.IsLeafAspect,

EOAssociation.ValueAspect,

EOAssociation.IconAspect,

EOAssociation.ExpandedIconAspect,

EOAssociation.EnabledAspect

See Also:
EOAssociation

Inner Class Summary
static class EOTreeAssociation.TreePlugin
          TreePlugin communicates with a tree UI widget on behalf of an EOTreeAssociation.
 
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
EOTreeAssociation(Object object)
          Returns a new EOValueAssociation object that is not bound to any display group.
 
Method Summary
 NSArray childrenOfObject(Object identifier)
          Returns an array of objects representing the children of the tree node identified by identifier.
 Object expandedIconForObject(Object identifier)
          Returns an expanded icon to display for the identifier object.
 Object iconForObject(Object identifier)
          Returns an icon to display for the identifier object.
 boolean isLeafObject(Object identifier)
          Returns a boolean signifying whether or not to display the identifier as leaf.
 String primaryAspect()
          Overridden by subclasses to return the default aspect, usually one denoting the displayed value, which by convention is named "value".
 void subjectChanged()
          Overridden by subclasses to update state based on when an EODisplayGroup's selection or contents changes.
 Object valueForObject(Object identifier)
          Returns the display value for the identifier object.
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, bindAspect, breakConnection, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, endEditing, 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

EOTreeAssociation

public EOTreeAssociation(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

childrenOfObject

public NSArray childrenOfObject(Object identifier)
Returns an array of objects representing the children of the tree node identified by identifier.

expandedIconForObject

public Object expandedIconForObject(Object identifier)
Returns an expanded icon to display for the identifier object. The default implementation uses valueForKeyPath on the object with the key bound to the ExpandedIconAspect
Parameters:
identifier - the object that will be represented in the tree with the expanded icon
Returns:
Object the icon to display for identifier when the object's node is expanded

iconForObject

public Object iconForObject(Object identifier)
Returns an icon to display for the identifier object. The default implementation uses valueForKeyPath on the object with the key bound to the IconAspect.
Parameters:
identifier - the object that will be represented in the tree with the icon
Returns:
Object the icon to display for identifier

isLeafObject

public boolean isLeafObject(Object identifier)
Returns a boolean signifying whether or not to display the identifier as leaf. The default implementation uses valueForKeyPath on the object with the key bound to the IsLeafAspect.
Parameters:
identifier - the object that will be represented in the tree
Returns:
boolean true if the node that represents identifier should be displayed as a leaf node; false otherwise

primaryAspect

public String primaryAspect()
Description copied from class: EOAssociation
Overridden by subclasses to return the default aspect, usually one denoting the displayed value, which by convention is named "value". EOAssociation's implementation returns null.
Overrides:
primaryAspect in class EOAssociation
Following copied from class: com.webobjects.eointerface.EOAssociation
Returns:
default implementation returns null

subjectChanged

public void subjectChanged()
Overridden by subclasses to update state based on when an EODisplayGroup's selection or contents changes. 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 it needs to update.
Overrides:
subjectChanged in class EOAssociation

valueForObject

public Object valueForObject(Object identifier)
Returns the display value for the identifier object. The default implementation uses valueForKeyPath on the object with the key bound to the ValueAspect.
Parameters:
identifier - the object that will be represented in the tree by the return value
Returns:
Object the value of identifier to display

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.