com.webobjects.eointerface
Class EOValueSelectionAssociation.ValueSelectionPlugin
java.lang.Object
com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
com.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.
Field Summary |
static int |
NoSelection
Marker value to signify nothing has been selected. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoSelection
public static int NoSelection
- Marker value to signify nothing has been selected.
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 widgetwidget
- user interface object that the plugin will use for display
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 selectisEnabled
- 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
Copyright © 2004 Apple Computer, Inc.