WebObjects 5.2.3

com.webobjects.eointerface
Class EOValueSelectionAssociation.ValueSelectionPlugin

java.lang.Object
  extended bycom.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
      extended bycom.webobjects.eointerface.EOValueSelectionAssociation.ValueSelectionPlugin
All Implemented Interfaces:
NSDisposable
Direct Known Subclasses:
EOCocoaComboBoxPlugin, EOCocoaPopUpButtonPlugin, EOCocoaRadioMatrixPlugin, EOSwingComboBoxPlugin
Enclosing class:
EOValueSelectionAssociation

public abstract static class EOValueSelectionAssociation.ValueSelectionPlugin
extends EOWidgetAssociation.WidgetPlugin

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


Nested Class Summary
 
Nested classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Field Summary
static int NoSelection
          Marker value to signify nothing has been selected.
 
Constructor Summary
EOValueSelectionAssociation.ValueSelectionPlugin(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
abstract  int selectionIndex()
           
abstract  void setSelectionIndex(int selectionIndex, boolean isEnabled)
          Selects the title at index selectionIndex in the UI widget.
abstract  void setTitlesFromObjects(Object[] objects)
          Sets the Object array to use for populating the titles of popup menu's or selection matrices.
abstract  String[] titles()
          Returns a String array of titles that the plugin's widget currently displays Only invoked if EOAssociation.SelectedTitleAspect bound.
 
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
 

Field Detail

NoSelection

public static int NoSelection
Marker value to signify nothing has been selected.

Constructor Detail

EOValueSelectionAssociation.ValueSelectionPlugin

public EOValueSelectionAssociation.ValueSelectionPlugin(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 - EOValueSelectionAssociation object for which the plugin will handle setting and getting values on the UI widget
widget - user interface object that the plugin will use for display
Method Detail

selectionIndex

public abstract int selectionIndex()
Returns:
index of the item selected in the plugins UI widget or NoSelection if no selection has been made

setSelectionIndex

public abstract void setSelectionIndex(int selectionIndex,
                                       boolean isEnabled)
Selects the title at index selectionIndex in the UI widget.

Parameters:
selectionIndex - index of the title to select
isEnabled - if true, the UI widget will be enabled and the user will be able to change its selection; otherwise, the user will not be able to change the selection

setTitlesFromObjects

public abstract void setTitlesFromObjects(Object[] objects)
Sets the Object array to use for populating the titles of popup menu's or selection matrices. If the Object array, objects, is null, clear out titles. Only invoked if EOAssociation.TitlesAspect is bound.

Parameters:
objects - object array with which the plugin will populate its UI widget

titles

public abstract String[] titles()
Returns a String array of titles that the plugin's widget currently displays Only invoked if EOAssociation.SelectedTitleAspect bound. Even if titles are derived from setTitlesFromObjects, returns the actual strings displayed

Returns:
string array of titles that the plugin's widget currently displays

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.