WebObjects 5.2

com.webobjects.eointerface.swing
Class EOSwingCheckBoxPlugin

java.lang.Object
  |
  +--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
        |
        +--com.webobjects.eointerface.EOValueAssociation.ValuePlugin
              |
              +--com.webobjects.eointerface.swing.EOSwingCheckBoxPlugin
All Implemented Interfaces:
EventListener, ItemListener, NSDisposable

public class EOSwingCheckBoxPlugin
extends EOValueAssociation.ValuePlugin
implements ItemListener

EOSwingCheckBoxPlugin is a concrete subclass of EOValueAssociation.ValuePlugin which is used with Swing's JCheckBox.

Associations classes: EOValueAssociation

Widgets classes: JCheckBox


Inner classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Constructor Summary
EOSwingCheckBoxPlugin(EOWidgetAssociation association, Object widget)
          Creates a new EOSwingCheckBoxPlugin connected to an association and a UI widget.
 
Method Summary
 void breakConnection()
          Clean up (end) the plugin's connection to its JCheckBox widget.
 void establishConnection()
          Establishes a connection between the plugin and its UI widget.
 void itemStateChanged(ItemEvent event)
          Invokes widgetDidChange on the plugin's EOValueAssociation.
 void setValue(Object value, boolean isEnabled)
          Sets the checkbox to 'checked' or 'not-checked' and also sets the enabled state.
 Object value()
          Return whether or not the checkbox is checked.
 String[] widgetKeysTaken()
          Returns an array of Strings which represent outlet names in Interface Builder.
 
Methods inherited from class com.webobjects.eointerface.EOValueAssociation.ValuePlugin
endEditing, useURLAsValue
 
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

EOSwingCheckBoxPlugin

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

breakConnection

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

itemStateChanged

public void itemStateChanged(ItemEvent event)
Invokes widgetDidChange on the plugin's EOValueAssociation.
Specified by:
itemStateChanged in interface ItemListener
Parameters:
event - the ItemEvent received from the AWT event dispatcher

setValue

public void setValue(Object value,
                     boolean isEnabled)
Sets the checkbox to 'checked' or 'not-checked' and also sets the enabled state.
Overrides:
setValue in class EOValueAssociation.ValuePlugin
Parameters:
value - the new value of the checkbox, either a Boolean or Number object
isEnabled - enables or disables the checkbox

value

public Object value()
Return whether or not the checkbox is checked.
Overrides:
value in class EOValueAssociation.ValuePlugin
Returns:
a Boolean object indicating whether or not the checkbox is checked

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.