WebObjects 5.2

com.webobjects.eointerface
Class EOTableColumnAssociation

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

public class EOTableColumnAssociation
extends EOWidgetAssociation

EOTableColumnAssociation associates display group(s) with a table column, via the repective WidgetPlugin's (subclasses of TableColumnPlugin). It always works together with a EOTableAssociation.

Aspects:

EOAssociation.ValueAspect

EOAssociation.BoldAspect

EOAssociation.ItalicAspect

EOAssociation.TextColorAspect

EOAssociation.EnabledAspect


Inner Class Summary
static class EOTableColumnAssociation.TableColumnPlugin
          TableColumnPlugin communicates with a UI widget (Cocoa's NSTableColumn or JFC's TableColumn, for example) on behalf of an EOTableAssociation.
 
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
EOTableColumnAssociation(Object object)
          Creates a new EOTableColumnAssociation to monitor and update the row values of a display group according to the widget object, which supplies a text (String) value.
EOTableColumnAssociation(Object object, Object table)
          Creates a new EOTableColumnAssociation to monitor and update the row values of a display group according to the widget object, which supplies a text (String) value.
 
Method Summary
 int boldStateAtRow(int rowIndex)
          This method returns the boldState value for the specified row in this column.
 boolean endEditing()
          This method will end the editing state, for both the widget(-plugin) and the Association.
 boolean isEditableAtRow(int rowIndex)
          This method returns a flag indicating whether the specified row is editable in this column.
 int italicStateAtRow(int rowIndex)
          This method returns the italicState value for the specified row in this column.
 String primaryAspect()
          This method returns this associations primary aspect, which is EOAssociation.ValueAspect.
 void setObject(Object object)
          This method assigns a display object (table column widget) to this association.
 void setSortingSelector(NSSelector selector)
          This method will set the sorting selector.
 void setTable(Object table)
          This method stores the corresponding table widget for the table column managed by this association.
 boolean setValueAtRow(Object value, int rowIndex)
          This method sets the value Object for the specified row in this column.
 NSSelector sortingSelector()
          This method returns the sorting selector.
 Object table()
          This method returns the corresponding table widget for the table column managed by this association.
 Object textColorAtRow(int rowIndex)
          This method returns an Object indicating the color at the specified row in this column.
 Object valueAtRow(int rowIndex)
          This method returns the value Object for the specified row in this column.
 boolean widgetDidBeginEditing()
          This method is called to notify the Association that the widget entered the editing state.
 boolean widgetDidEndEditing()
          This method is called to notify the Association that the widget has finished the editing state.
protected  Class widgetPluginClass()
          This method returns the abstract base class for table column widget plugin's for this association class.
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation
canSupportValueFormatter, defaultPrefersContinuousChangeNotification, dispose, isUsableWithObject, objectKeysTaken, prefersContinuousChangeNotification, setDefaultPrefersContinuousChangeNotification, setPrefersContinuousChangeNotification, setValueFormatter, valueFormatter, widgetPlugin
 
Methods inherited from class com.webobjects.eointerface.EOAssociation
aspects, aspectSignatures, associationClassesForObject, bindAspect, breakConnection, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, establishConnection, isConnected, isEnabled, isEnabledAtIndex, isExplicitlyDisabled, object, priority, registerAssociationClass, setExplicitlyDisabled, setValueForAspect, setValueForAspectAtIndex, shouldEndEditing, shouldEndEditingAtIndex, subjectChanged, 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

EOTableColumnAssociation

public EOTableColumnAssociation(Object object)
Creates a new EOTableColumnAssociation to monitor and update the row values of a display group according to the widget object, which supplies a text (String) value. You normally set up associations with Interface Builder, in which case you don't need to create them programmatically. However, if you do create them up programmatically, setting them up is a multi-step process. After creating an association, you must bind its aspects and establish its connections.
Parameters:
object - a display object (table column widget) to be managed by this association

EOTableColumnAssociation

public EOTableColumnAssociation(Object object,
                                Object table)
Creates a new EOTableColumnAssociation to monitor and update the row values of a display group according to the widget object, which supplies a text (String) value. You normally set up associations with Interface Builder, in which case you don't need to create them programmatically. However, if you do create them up programmatically, setting them up is a multi-step process. After creating an association, you must bind its aspects and establish its connections.
Parameters:
object - a display object (table column widget) to be managed by this association
table - the corresponding table display object (widget)
Method Detail

boldStateAtRow

public int boldStateAtRow(int rowIndex)
This method returns the boldState value for the specified row in this column.
Parameters:
rowIndex - the index of the row of interest
Returns:
EOAssociation.SetValue if the value bound of the bold aspect at rowIndex is true, EOAssociation.UnsetValue if it is false, and EOAssociation.IgnoreValue if the bold aspect is not bound at all

endEditing

public boolean endEditing()
This method will end the editing state, for both the widget(-plugin) and the Association.
Overrides:
endEditing in class EOAssociation
Returns:
a flag indicating whether both the widget(-plugin) and the assocaiation were able to successfully complete the editing state

isEditableAtRow

public boolean isEditableAtRow(int rowIndex)
This method returns a flag indicating whether the specified row is editable in this column.
Parameters:
rowIndex - the index of the row of interest
Returns:
true if the row at rowIndex is editable in this column

italicStateAtRow

public int italicStateAtRow(int rowIndex)
This method returns the italicState value for the specified row in this column.
Parameters:
rowIndex - the index of the row of interest
Returns:
EOAssociation.SetValue if the value bound of the italic aspect at rowIndex is true, EOAssociation.UnsetValue if it is false, and EOAssociation.IgnoreValue if the italic aspect is not bound at all

primaryAspect

public String primaryAspect()
This method returns this associations primary aspect, which is EOAssociation.ValueAspect.
Overrides:
primaryAspect in class EOAssociation
Returns:
the name of the primary aspect of this association

setObject

public void setObject(Object object)
This method assigns a display object (table column widget) to this association.
Overrides:
setObject in class EOWidgetAssociation
Parameters:
object - a display object (table column widget) to be managed by this association

setSortingSelector

public void setSortingSelector(NSSelector selector)
This method will set the sorting selector. The default is EOSortOrdering.CompareAscending. This selector will be used with EOSortOrdering for sorting. See the documentation for EOSortOrdering.
Parameters:
selector - the selector to be used for sorting
See Also:
EOSortOrdering

setTable

public void setTable(Object table)
This method stores the corresponding table widget for the table column managed by this association.
Parameters:
table - the corresponding table display object (widget)

setValueAtRow

public boolean setValueAtRow(Object value,
                             int rowIndex)
This method sets the value Object for the specified row in this column.
Parameters:
value - a value Object, whose actual class usually depends on how the application defined the values of this column
rowIndex - the index of the row of interest

sortingSelector

public NSSelector sortingSelector()
This method returns the sorting selector. It's default is EOSortOrdering.CompareAscending. This selector is used with EOSortOrdering for sorting. See the documentation for EOSortOrdering.
Parameters:
selector - the selector to be used for sorting
See Also:
EOSortOrdering

table

public Object table()
This method returns the corresponding table widget for the table column managed by this association. If it hasn't been set, it will try to obtain it from the column widget, otherwise it returns null.
Returns:
the corresponding table display object (widget)

textColorAtRow

public Object textColorAtRow(int rowIndex)
This method returns an Object indicating the color at the specified row in this column.
Parameters:
rowIndex - the index of the row of interest
Returns:
a Color object, whose actual class depends on the widget set being used (for example, Cocoa or Java AWT)

valueAtRow

public Object valueAtRow(int rowIndex)
This method returns the value Object for the specified row in this column.
Parameters:
rowIndex - the index of the row of interest
Returns:
an Object, whose actual class usually depends on how the application defined the values of this column

widgetDidBeginEditing

public boolean widgetDidBeginEditing()
This method is called to notify the Association that the widget entered the editing state.
Returns:
a flag indicating whether this association 'agreed' to start editing

widgetDidEndEditing

public boolean widgetDidEndEditing()
This method is called to notify the Association that the widget has finished the editing state.
Returns:
a flag indicating that the assocaiation was able to successfully complete the editing state

widgetPluginClass

protected Class widgetPluginClass()
This method returns the abstract base class for table column widget plugin's for this association class.
Overrides:
widgetPluginClass in class EOWidgetAssociation
Returns:
the base class for widget plugin's managed by this Association (EOTableColumnAssociation.TableColumnPlugin)

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

Copyright © 2003 Apple Computer, Inc.