WebObjects 5.2

com.webobjects.eoapplication
Interface EOEditable

All Known Implementing Classes:
EODocumentController, EOAssociationController, EORangeValueController

public interface EOEditable

EOEditable is an interface that defines an API for managing the editability of a branch of the controller hierarchy. EOEditable controllers usually base the editability of their user interfaces on the editability of their supercontrollers. Thus, by default all the EOEditable subcontrollers of an editable controller are also editable. To enable or disable a portion of an application's user interface, you need only message the highest level controller associated with that user interface.


Field Summary
static int AlwaysEditable
          The constant describing that a controller is always editable.
static int IfSupercontrollerEditable
          The constant describing that a controller is editable if its supercontroller is editable.
static int NeverEditable
          The constant describing that a controller is never editable.
 
Method Summary
 int editability()
          Returns the editability of the receiver.
 boolean isEditable()
          Returns whether the receiver is currently editable.
 void setEditability(int editability)
          Sets the editability of the receiver to editability.
 void supercontrollerEditabilityDidChange()
          Invoked to notify the receiver that the editability of its supercontroller changed, giving the receiver the opportunity to update its user interface to match the editability of the supercontroller.
 void takeResponsibilityForEditabilityOfAssociation(EOAssociation association)
          Invoked when one of the receiver's subcontrollers is disposed as a transient controller.
 

Field Detail

AlwaysEditable

public static final int AlwaysEditable
The constant describing that a controller is always editable.

IfSupercontrollerEditable

public static final int IfSupercontrollerEditable
The constant describing that a controller is editable if its supercontroller is editable. If none of a controller's supercontrollers implement EOEditable, then it defaults to EOEditable.AlwaysEditable.

NeverEditable

public static final int NeverEditable
The constant describing that a controller is never editable.
Method Detail

editability

public int editability()
Returns the editability of the receiver. The default behavior should be to return EOEditable.IfSupercontrollerEditable.
Returns:
the editability, one of EOEditable.NeverEditable, EOEditable.AlwaysEditable, or EOEditable.IfSupercontrollerEditable

isEditable

public boolean isEditable()
Returns whether the receiver is currently editable. A receiver is editable if its editability is EOEditable.AlwaysEditable or its editability is EOEditable.IfSupercontrollerEditable and sending EOEditable.isEditable to the first EOEditable supercontroller of the receiver returns true.
Returns:
true if the controller is currently editable; false otherwise

setEditability

public void setEditability(int editability)
Sets the editability of the receiver to editability. See the method description of setEditability in the interface specification for EOEditable.
Parameters:
editability - the editability, one of EOEditable.NeverEditable, EOEditable.AlwaysEditable, or EOEditable.IfSupercontrollerEditable

supercontrollerEditabilityDidChange

public void supercontrollerEditabilityDidChange()
Invoked to notify the receiver that the editability of its supercontroller changed, giving the receiver the opportunity to update its user interface to match the editability of the supercontroller. This method is only sent to connected subcontrollers whose editability is EOEditable.IfSupercontrollerEditable.

takeResponsibilityForEditabilityOfAssociation

public void takeResponsibilityForEditabilityOfAssociation(EOAssociation association)
Invoked when one of the receiver's subcontrollers is disposed as a transient controller. This method instructs the receiver to assume responsibility for managing the editability of the subcontroller's EOAssociation, association.
Parameters:
association - the transient subcontroller's association

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

Copyright © 2003 Apple Computer, Inc.