Interface HasReadOnly

  • All Known Implementing Classes:
    HeaderFooterLayoutWrapper

    public interface HasReadOnly
    Marker interface for objects that can be in read-only state without having value.
    Since:
    2021-09-04
    Author:
    miki
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isReadOnly()
      Checks whether this object is in read-only mode.
      void setReadOnly​(boolean readOnly)
      Sets the new read-only state.
      static void setReadOnly​(boolean readOnly, com.vaadin.flow.component.Component component)
      Helper method to update read-only state of a component if it supports the method.
    • Method Detail

      • isReadOnly

        boolean isReadOnly()
        Checks whether this object is in read-only mode.
        Returns:
        Whether the object is in read-only mode.
      • setReadOnly

        void setReadOnly​(boolean readOnly)
        Sets the new read-only state.
        Parameters:
        readOnly - Whether the object should be in read-only mode.
      • setReadOnly

        static void setReadOnly​(boolean readOnly,
                                com.vaadin.flow.component.Component component)
        Helper method to update read-only state of a component if it supports the method. This method is recursive, as it applies itself to the contents of Component.getChildren().
        Parameters:
        readOnly - New state.
        component - Component. If it implements HasReadOnly or HasValue, the state will be updated. If it implements HasEnabled and does not implement HasComponents, read-only means disabled. Otherwise, nothing happens.