Package org.linkki.core.ui.aspects.types
Enum ReadOnlyBehaviorType
- java.lang.Object
-
- java.lang.Enum<ReadOnlyBehaviorType>
-
- org.linkki.core.ui.aspects.types.ReadOnlyBehaviorType
-
- All Implemented Interfaces:
Serializable,Comparable<ReadOnlyBehaviorType>
public enum ReadOnlyBehaviorType extends Enum<ReadOnlyBehaviorType>
Defines the behavior when setting a component to read only.DISABLED,INVISIBLE,INVISIBLE_IF_WRITABLEare currently only supported for buttons.WRITABLEis only supported bycomponentsthat implementHasValue.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISABLEDThe component is not enabled in read-only mode.INVISIBLEThe component is not visible in read-only mode.INVISIBLE_IF_WRITABLEThe component is always invisible in writable mode.WRITABLEThe component ignores the read-only status and remains active.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReadOnlyBehaviorTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ReadOnlyBehaviorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISABLED
public static final ReadOnlyBehaviorType DISABLED
The component is not enabled in read-only mode. Visible attribute is unaffected.
-
INVISIBLE
public static final ReadOnlyBehaviorType INVISIBLE
The component is not visible in read-only mode. Enabled attribute is unaffected.
-
WRITABLE
public static final ReadOnlyBehaviorType WRITABLE
The component ignores the read-only status and remains active. Enabled and visible state are still applied but the read only state is always false.This type is useful for components that need to be active although the rest of the UI is in browse mode. For example an input field for filtering the content of a table.
- API Note:
- This type is only applicable for components of type
HasValue. If the component is not of typeHasValue, aClassCastExceptionis thrown.
-
INVISIBLE_IF_WRITABLE
public static final ReadOnlyBehaviorType INVISIBLE_IF_WRITABLE
The component is always invisible in writable mode. In read-only mode, the visible aspect is respected.
-
-
Method Detail
-
values
public static ReadOnlyBehaviorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ReadOnlyBehaviorType c : ReadOnlyBehaviorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReadOnlyBehaviorType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-