WebObjects 5.2.3

com.webobjects.eointerface
Class EOWidgetAssociation.WidgetPlugin

java.lang.Object
  extended bycom.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
All Implemented Interfaces:
NSDisposable
Direct Known Subclasses:
EOActionWidgetAssociation.ActionPlugin, EOTableAssociation.TablePlugin, EOTableColumnAssociation.TableColumnPlugin, EOTreeAssociation.TreePlugin, EOValueAssociation.ValuePlugin, EOValueSelectionAssociation.ValueSelectionPlugin
Enclosing class:
EOWidgetAssociation

public abstract static class EOWidgetAssociation.WidgetPlugin
extends Object
implements NSDisposable

WidgetPlugin is an abstract superclass for plugins that provide a layer of abstraction between user interface widgets and EOWidgetAssociation subclasses. Concrete subclasses of WidgetPlugin communicate with specific UI widgets on behalf of its widget association. This way, EOWidgetAssociations don't have to know anything about the specific API used to communicate with an UI element. There are plugins that work with Swing/JFC widgets as well as Cocoa widgets, yet the WidgetAssociations contain no knowledge of either Swing or Cocoa.


Nested Class Summary
static interface EOWidgetAssociation.WidgetPlugin.Formatting
          The Formatting interface defines the basic methods needed to enable setting and getting formatting for a display object.
 
Constructor Summary
EOWidgetAssociation.WidgetPlugin(EOWidgetAssociation association, Object widget)
          Subclasses should override this constructor to perform any additional setup and then invoke super's implementation.
 
Method Summary
 EOWidgetAssociation association()
          Returns this plugin's associated EOAssociation.
 void breakConnection()
          Removes the receiver from its EOAssociation and display object.
 void dispose()
          Clears all references this plugin has to other objects especially its display object and EOAssociation.
 void establishConnection()
          Overridden by subclasses to attach the receiver to its display object, and to otherwise configure the display object.
 String[] unacceptableAspects()
          Returns an array of Strings representing the aspect keys that must not be bound in this plugin.
 Object widget()
          Returns the user interface widget this plugin manages for its association.
 String[] widgetKeysTaken()
          Returns an array of String "keys" the plugin will "take over" in its widget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOWidgetAssociation.WidgetPlugin

public EOWidgetAssociation.WidgetPlugin(EOWidgetAssociation association,
                                        Object widget)
Subclasses should override this constructor to perform any additional setup and then invoke super's implementation.

Parameters:
association - EOActionWidgetAssociation that the plugin will communicate with
widget - the UI widget that the plugin will communicate with
Method Detail

association

public EOWidgetAssociation association()
Returns this plugin's associated EOAssociation.

Returns:
this plugin's EOWidgetAssociation

breakConnection

public void breakConnection()
Removes the receiver from its EOAssociation and display object. Subclasses should override this method to clear references to the display object and association and invoke super's implementation at the end.


dispose

public void dispose()
Clears all references this plugin has to other objects especially its display object and EOAssociation. Call this method before nulling out a reference to this plugin to ensure it gets garbage collected properly. Subclasses should override this method to do any additional cleanup that may be needed and invoke super's implementation at the end.

Specified by:
dispose in interface NSDisposable
See Also:
NSDisposable

establishConnection

public void establishConnection()
Overridden by subclasses to attach the receiver to its display object, and to otherwise configure the display object. Subclasses should invoke super's implementation after establishing their own connections.


unacceptableAspects

public String[] unacceptableAspects()
Returns an array of Strings representing the aspect keys that must not be bound in this plugin.

Returns:
an array of Strings representing the aspect keys that must not be bound in this plugin

widget

public Object widget()
Returns the user interface widget this plugin manages for its association.

Returns:
this plugin's UI widget

widgetKeysTaken

public String[] widgetKeysTaken()
Returns an array of String "keys" the plugin will "take over" in its widget. For Swing widgets and plugins, the keys are the event listener methods for the widget. For Cocoa widgets and plugins, the keys are the widget outlets used for event notification and targets.

Returns:
array of String keys that the plugin will take over in its widget

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

Copyright © 2004 Apple Computer, Inc.