com.webobjects.eointerface.cocoa
Class EOCocoaButtonPlugin
java.lang.Object
|
+--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
|
+--com.webobjects.eointerface.EOActionWidgetAssociation.ActionPlugin
|
+--com.webobjects.eointerface.cocoa.EOCocoaButtonPlugin
- All Implemented Interfaces:
- NSDisposable
- public class EOCocoaButtonPlugin
- extends EOActionWidgetAssociation.ActionPlugin
EOCocoaButtonPlugin is used in Cocoa applications to connect buttons
and button cells to action and action insertion associations. When the
button this plugin manages is pressed, the plugin calls its association's
invokeAction method.
Object Keys Taken:
action On receiving an action message from the display object,
an EOActionAssocation sends its action to the selected objects.
target On receiving an action message from the display object,
an EOActionInsertionAssociation inserts objects from the
source EODisplayGroup into the destination EODisplayGroup.
Usage:
Association classes: EOActionAssociation, EOActionInsertionAssociation
Widget classes: NSButton, NSButtonCell
Method Summary |
void |
breakConnection()
Tells the plugin to halt communication with its widget. |
void |
establishConnection()
Establishes a connection between the plugin and its UI widget. |
void |
setEnabled(boolean enabled)
Tells the plugin to enable or disable its button. |
String[] |
widgetKeysTaken()
Returns an array of Strings which represent outlet names in Interface Builder. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EOCocoaButtonPlugin
public EOCocoaButtonPlugin(EOWidgetAssociation association,
Object widget)
- Creates a new EOCocoaButtonPlugin for use with
association
and widget
.
- Parameters:
association
- EOactionWidgetAssociation for this plugin to communicate withwidget
- widget for this plugin to manage
breakConnection
public void breakConnection()
- Tells the plugin to halt communication with its widget.
This makes sure that actions from the widget don't get to this plugin.
- Overrides:
breakConnection
in class EOWidgetAssociation.WidgetPlugin
establishConnection
public void establishConnection()
- Establishes a connection between the plugin and its UI widget.
This makes sure that actions from the widget are sent to this plugin.
- Overrides:
establishConnection
in class EOWidgetAssociation.WidgetPlugin
setEnabled
public void setEnabled(boolean enabled)
- Tells the plugin to enable or disable its button.
- Overrides:
setEnabled
in class EOActionWidgetAssociation.ActionPlugin
- Parameters:
enabled
- if true
, the button is enabled in the interface,
otherwise, the button is disabled
widgetKeysTaken
public String[] widgetKeysTaken()
- Returns an array of Strings which represent outlet names in Interface Builder.
These outlets are disabled by Interface Builder once the button is
connected to this plugins association.
EOCocoaButtonPlugin takes over outlets with keys
"action" and "target".
- Overrides:
widgetKeysTaken
in class EOWidgetAssociation.WidgetPlugin
- Returns:
- String array of outlet names
Copyright © 2003 Apple Computer, Inc.