WebObjects 5.2.3

com.webobjects.eoapplication
Interface EOEditable

All Known Implementing Classes:
EOAssociationController, EODocumentController, 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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

NeverEditable

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

See Also:
Constant Field Values
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 Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.