WebObjects 5.2

com.webobjects.eointerface.cocoa
Class EOCocoaSimpleTextPlugin

java.lang.Object
  |
  +--com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
        |
        +--com.webobjects.eointerface.EOValueAssociation.ValuePlugin
              |
              +--com.webobjects.eointerface.EOTextAssociation.TextPlugin
                    |
                    +--com.webobjects.eointerface.cocoa.EOCocoaSimpleTextPlugin
All Implemented Interfaces:
NSDisposable
Direct Known Subclasses:
EOCocoaTextFieldPlugin, EOCocoaTextPlugin

public abstract class EOCocoaSimpleTextPlugin
extends EOTextAssociation.TextPlugin

EOCocoaSimpleTextPlugin is the an abstract superclass for plugin classes (specifically EOCocoaTextPlugin and EOCocoaTextFieldPlugin) that want to manage Cocoa text input widgets. Subclasses still need to implement some methods defined in EOTextAssociation.TextPlugin.

Usage:
Association classes: EOCocoaTextFieldPlugin, EOCocoaTextPlugin subclasses
Widget classes: NSText, NSTextField, NSTextFieldCell, NSFormCell


Inner classes inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
EOWidgetAssociation.WidgetPlugin.Formatting
 
Constructor Summary
EOCocoaSimpleTextPlugin(EOWidgetAssociation association, Object widget)
          EOCocoaSimpleTextPlugin is an abstract class, you should never try to create a new EOCocoaSimpleTextPlugin object.
 
Method Summary
 void establishConnection()
          Establishes a connection between the plugin and its UI widget This makes sure that actions from the text widget are sent to this plugin.
 boolean hasChanges()
          Returns whether or not there are any unsaved changes in the plugin.
 boolean saveEdits()
          Saves the value to this plugin's association for aspect EOAssociation.ValueAspect.
 void setHasChanges(boolean hasChanges)
          Used to inform the plugin that its widget has changes.
 String[] widgetKeysTaken()
          Returns an array of Strings which represent outlet names in Interface Builder.
 
Methods inherited from class com.webobjects.eointerface.EOTextAssociation.TextPlugin
setColors, setFontProperties
 
Methods inherited from class com.webobjects.eointerface.EOValueAssociation.ValuePlugin
endEditing, setValue, useURLAsValue, value
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation.WidgetPlugin
association, breakConnection, dispose, unacceptableAspects, widget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOCocoaSimpleTextPlugin

public EOCocoaSimpleTextPlugin(EOWidgetAssociation association,
                               Object widget)
EOCocoaSimpleTextPlugin is an abstract class, you should never try to create a new EOCocoaSimpleTextPlugin object. Subclasses should call super from within their contructors.
Parameters:
association - EOValueAssociation for this plugin to communicate with
widget - the Cocoa text input widget for this plugin to manage
Method Detail

establishConnection

public void establishConnection()
Establishes a connection between the plugin and its UI widget This makes sure that actions from the text widget are sent to this plugin. Subclasses should override this method and call the super implementation at the end of the method.
Overrides:
establishConnection in class EOWidgetAssociation.WidgetPlugin

hasChanges

public boolean hasChanges()
Returns whether or not there are any unsaved changes in the plugin. You don't normally need to invoke this method.
Returns:
true if setHasChanges was invoked with the argument true and the edits have not been saved out to the plugin's association.

saveEdits

public boolean saveEdits()
Saves the value to this plugin's association for aspect EOAssociation.ValueAspect. Returns a boolean value indicating whether or not the new value was set in the plugin's association.
Returns:
false if setting the value in the association returned false; true otherwise, or if there were no edits to save

setHasChanges

public void setHasChanges(boolean hasChanges)
Used to inform the plugin that its widget has changes. You don't normally need to invoke this method. Subclasses may invoke this method when getting user interface events.
Parameters:
hasChanges - boolean to indicate whether or not there are changes in this plugin's widget pending to be set in its association

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 text control is connected to this plugins association.

EOCocoaSimpleTextPlugin takes over the outlet with key "delegate".

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.