Interface AttributeWriteReadOnly

All Known Subinterfaces:
UiAbstractButton, UiAbstractButtonContainer, UiAbstractCheckbox, UiAbstractChoice<O,V>, UiAbstractImage, UiAbstractInput<V>, UiAbstractLink, UiAbstractMultiChoice<V>, UiAbstractRadioButton, UiAbstractSingleChoice<V>, UiAbstractSplitPanel, UiActiveWidget, UiBindableWidget<V>, UiBorderPanel, UiButton, UiButtonPanel, UiCheckbox, UiCheckboxChoice<V>, UiClickableWidget, UiCollapsibleComposite<C>, UiCollapsiblePanel, UiColorInput, UiComboBox<V>, UiComposite<C>, UiCustomWidget<W>, UiExternalLink, UiFailureComposite<C>, UiGridPanel, UiGridRow, UiHorizontalPanel, UiHorizontalSplitPanel, UiIcon, UiImage, UiInput<V>, UiInputContainer<V>, UiInternalLink, UiLabel, UiMultiComboBox<V>, UiMutableComposite<C>, UiMutablePanel, UiMutableSingleComposite<C>, UiNativeWidget, UiPasswordInput, UiRadioButton, UiRadioChoice<V>, UiRegularWidget, UiRemovableComposite<C>, UiResponsiveColumnPanel, UiScrollPanel, UiSingleComposite<C>, UiSlot, UiStringInput, UiSwitchComposite<C>, UiText, UiTextArea, UiTextInput, UiTextualInput<V>, UiValidatableWidget<V>, UiValuedComposite<C,V>, UiValuedWidget<V>, UiVerticalPanel, UiVerticalSplitPanel, UiWidget, UiWidgetWithSelection
All Known Implementing Classes:
AbstractUiCustomWidget, AbstractUiWidget, UiCustomComposite, UiCustomEditor, UiCustomEditorButtonPanel, UiCustomGridPanel, UiCustomInput, UiCustomMutableComposite, UiCustomMutablePanel, UiCustomMutableSingleComposite, UiCustomRemovableComposite, UiCustomScrollPanel, UiCustomValidatableWidget, UiCustomValuedComposite, UiCustomValuedWidget, UiCustomVerticalPanel

public interface AttributeWriteReadOnly
Interface to read and write the read-only flag.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
     
    void
    setReadOnly(boolean readOnly)
    Switches this widget between view (read-only true) and edit (read-only false) mode.
  • Method Details

    • isReadOnly

      default boolean isReadOnly()
      Returns:
      true if this widget is read-only (value can not be edited by the user and is displayed as view only like a label), false otherwise. The read-only flag is different from enabled as a read-only widget is not grayed out but rather visualizes its value as an output (like a label).
    • setReadOnly

      void setReadOnly(boolean readOnly)
      Switches this widget between view (read-only true) and edit (read-only false) mode. This may also have effects such that a UiButtonPanel is showing a "Save" button only in edit mode, while it shows an "Edit" button in read-only mode that switches to edit mode.
      A UiComposite will propagate the read-only state to all its children when this method is called. Please note that several widgets such as UiLabel are always read-only. In such case this method will have no effect.
      Parameters:
      readOnly - the new value of isReadOnly().