| 
WebObjects 5.2.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
        |
        +--com.webobjects.eointerface.EOValueSelectionAssociation.ValueSelectionPlugin
              |
              +--com.webobjects.eointerface.cocoa.EOCocoaPopUpButtonPlugin
EOCocoaPopUpButtonPlugin is used in Cocoa applications to connect pop-up buttons to value selection associations. This plugin handles setting the list of items in the pop-up buttons on behalf of its association and handles reporting the selection index to its association.
You can populate the pop-up button's list by hand in Interface Builder. In that case, do
 not bind the titles aspect of this plugin's association.
 When the user changes the selection of the pop-up button in the interface,
 this plugin invokes its association's widgetSelectionDidChange method.
 
Object Keys Taken: target, action
When the user chooses an item in the display object, the EOValueSelectionAssociation updates the selected object's property with the item's title, tag, or object.
Usage:
 Association classes: EOValueSelectionAssociation
 Widget classes: NSPopUpButton
| Nested Class Summary | 
| Nested classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin | 
EOWidgetAssociation.WidgetPlugin.Formatting | 
| Field Summary | 
| Fields inherited from class com.webobjects.eointerface.EOValueSelectionAssociation.ValueSelectionPlugin | 
NoSelection | 
| Constructor Summary | |
EOCocoaPopUpButtonPlugin(EOWidgetAssociation association,
                         Object widget)
Creates a new EOCocoaPopUpButtonPlugin for use with association and widget.  | 
|
| Method Summary | |
 void | 
breakConnection()
Tells the plugin to halt communication with its NSPopUpButton object.  | 
 void | 
establishConnection()
Establishes a connection between the plugin and its UI widget.  | 
 int | 
selectionIndex()
Returns the index of the item selected in this plugin's pop-up button list.  | 
 void | 
setSelectionIndex(int selectionIndex,
                  boolean enabled)
Selects the item at selectionIndex in this plugin's
 pop-up button list. | 
 void | 
setTitlesFromObjects(Object[] objects)
Sets the pop-up button list to the items of objects. | 
 String[] | 
titles()
Returns the array of Strings used in the pop-up button list.  | 
 String[] | 
widgetKeysTaken()
Returns an array of Strings which represent outlet names in Interface Builder.  | 
| Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin | 
association, dispose, unacceptableAspects, widget | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public EOCocoaPopUpButtonPlugin(EOWidgetAssociation association,
                                Object widget)
association - EOValueSelectionAssociation for this plugin to communicate withwidget - the NSPopUpButton object for this plugin to manage| Method Detail | 
public void breakConnection()
breakConnection in class EOWidgetAssociation.WidgetPluginpublic void establishConnection()
establishConnection in class EOWidgetAssociation.WidgetPluginpublic int selectionIndex()
selectionIndex in class EOValueSelectionAssociation.ValueSelectionPlugin
public void setSelectionIndex(int selectionIndex,
                              boolean enabled)
selectionIndex in this plugin's
 pop-up button list.
setSelectionIndex in class EOValueSelectionAssociation.ValueSelectionPluginselectionIndex - index of the item to select in
                       this plugin's pop-up button listenabled - if true, the pop-up button is enabled in the interface;
                       if false, the combo box is disabled and the user cannot change
                       the pop-up button's selected itempublic void setTitlesFromObjects(Object[] objects)
objects.
 This method is only invoked if EOAssociation.TitlesAspect is bound
 in the plugin's association.
setTitlesFromObjects in class EOValueSelectionAssociation.ValueSelectionPluginobjects - array of objects to use to populate the
                    list of items in the plugin's pop-up buttonpublic String[] titles()
titles in class EOValueSelectionAssociation.ValueSelectionPluginpublic String[] widgetKeysTaken()
Object Keys Taken: target, action
When the user chooses an item in the display object, the EOValueSelectionAssociation updates the selected object's property with the item's title, tag, or object.
widgetKeysTaken in class EOWidgetAssociation.WidgetPlugin
  | 
Last updated Mon Oct 13 15:42:52 PDT 2003. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||