WebObjects 5.4.2

com.webobjects.eoapplication
Interface EOEditable

All Known Implementing Classes:
EOActionController, EOAssociationController, EOCheckBoxController, EOComboBoxController, EODefaultActionTrigger, EODetailSelectionController, EODocumentController, EOEditingController, EOEnumerationController, EOFormatValueController, EOFormController, EOImageViewController, EOInterfaceController, EOListController, EOMultipleValuesEnumerationController, EOOneValueEnumerationController, EOQuickTimeViewController, EORangeTextFieldController, EORangeValueController, EOStaticTextFieldController, EOTableColumnController, EOTableController, EOTextAreaController, EOTextFieldController, EOTitlesController, EOTreeController, EOValueAndURLController, EOValueController

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

NeverEditable

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

See Also:
Constant Field Values

AlwaysEditable

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

See Also:
Constant Field Values

IfSupercontrollerEditable

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
Method Detail

setEditability

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

editability

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

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

supercontrollerEditabilityDidChange

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

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 June 2008

Copyright © 2000-2008 Apple Inc.