WebObjects 5.2

com.webobjects.eointerface.swing
Class EOSwingButtonPlugin

java.lang.Object
  |
  +--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
        |
        +--com.webobjects.eointerface.EOActionWidgetAssociation.ActionPlugin
              |
              +--com.webobjects.eointerface.swing.EOSwingButtonPlugin
All Implemented Interfaces:
ActionListener, EventListener, NSDisposable

public class EOSwingButtonPlugin
extends EOActionWidgetAssociation.ActionPlugin
implements ActionListener

EOSwingButtonPlugin is a concrete subclass of EOActionWidgetAssociation.ActionPlugin which is used with Swing buttons.

Associations classes: EOActionWidgetAssociation

Widgets classes: AbstractButton (JButton)


Inner classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Constructor Summary
EOSwingButtonPlugin(EOWidgetAssociation association, Object widget)
          Creates a new EOSwingButtonPlugin connected to an association and a UI widget.
 
Method Summary
 void actionPerformed(ActionEvent event)
          Invokes invokeAction on the plugin's EOActionWidgetAssociation
 void breakConnection()
          Clean up (end) the plugin's connection to its AbstractButton widget.
 void establishConnection()
          Establishes a connection between the plugin and its UI widget.
 void setEnabled(boolean flag)
          Will pass on the enabled state to the AbstractButton widget.
 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

EOSwingButtonPlugin

public EOSwingButtonPlugin(EOWidgetAssociation association,
                           Object widget)
Creates a new EOSwingButtonPlugin connected to an association and a UI widget.
Parameters:
association - association of class EOValueAssociation or subclass for the plugin to use
widget - widget of AbstractButton or subclass that the plugin will manage
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Invokes invokeAction on the plugin's EOActionWidgetAssociation
Specified by:
actionPerformed in interface ActionListener
Parameters:
event - the ActionEvent received from the AWT event dispatcher

breakConnection

public void breakConnection()
Clean up (end) the plugin's connection to its AbstractButton widget. This makes sure that ActionEvent's from the AbstractButton are not sent anymore 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 ActionEvent's from the AbstractButton are sent to this plugin.
Overrides:
establishConnection in class EOWidgetAssociation.WidgetPlugin

setEnabled

public void setEnabled(boolean flag)
Will pass on the enabled state to the AbstractButton widget.
Overrides:
setEnabled in class EOActionWidgetAssociation.ActionPlugin
Parameters:
flag - true if the button should be enabled

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.
Overrides:
widgetKeysTaken in class EOWidgetAssociation.WidgetPlugin
Returns:
String array of outlet names

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.