WebObjects 5.2.3

com.webobjects.eointerface.cocoa
Class EOCocoaButtonPlugin

java.lang.Object
  extended bycom.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
      extended bycom.webobjects.eointerface.EOActionWidgetAssociation.ActionPlugin
          extended bycom.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


Nested Class Summary
 
Nested classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Constructor Summary
EOCocoaButtonPlugin(EOWidgetAssociation association, Object widget)
          Creates a new EOCocoaButtonPlugin for use with association and widget.
 
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 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

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 with
widget - widget for this plugin to manage
Method Detail

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.

Specified by:
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

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

Copyright © 2004 Apple Computer, Inc.