WebObjects 5.4.2

com.webobjects.eointerface.swing
Class EOSwingCheckBoxPlugin

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

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


Nested Class Summary
 
Nested classes/interfaces 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

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

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

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

setValue

public void setValue(Object value,
                     boolean isEnabled)
Sets the checkbox to 'checked' or 'not-checked' and also sets the enabled state.

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

Specified by:
value in class EOValueAssociation.ValuePlugin
Returns:
a Boolean object indicating whether or not the checkbox is checked

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

Last updated June 2008

Copyright © 2000-2008 Apple Inc.