Package org.vaadin.miki.markers
Interface HasReadOnly
-
- All Known Implementing Classes:
HeaderFooterLayoutWrapper
public interface HasReadOnlyMarker 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 booleanisReadOnly()Checks whether this object is in read-only mode.voidsetReadOnly(boolean readOnly)Sets the new read-only state.static voidsetReadOnly(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 ofComponent.getChildren().- Parameters:
readOnly- New state.component- Component. If it implementsHasReadOnlyorHasValue, the state will be updated. If it implementsHasEnabledand does not implementHasComponents, read-only means disabled. Otherwise, nothing happens.
-
-