Class DescriptorEditableControl<Value>
- java.lang.Object
-
- de.xima.fc.gui.model.value_descriptor_form.Control
-
- de.xima.fc.gui.model.value_descriptor_form.ValueReferencingControl
-
- de.xima.fc.gui.model.value_descriptor_form.EditableControl<Value>
-
- de.xima.fc.gui.model.value_descriptor_form.DescriptorEditableControl<Value>
-
- Type Parameters:
Value- The type of the value being edited.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BooleanControl,MultiLineLargeStringControl,SingleLineLargeStringControl
public abstract class DescriptorEditableControl<Value> extends EditableControl<Value>
AnEditableControlthat uses anIValueDescriptorto coerce values.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDescriptorEditableControl(String type, IValueAccessor<?> root, String path, IValueDescriptor<Value,?> descriptor)Creates a new editable control for editing a value described by the given descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValuecoerceValue(Object value)Coerces the given value to conform to the restrictions imposed by the value descriptor.-
Methods inherited from class de.xima.fc.gui.model.value_descriptor_form.EditableControl
getDescription, getLabel, getValue, isFcPlaceholders, isRequired, setDescription, setFcPlaceholders, setLabel, setRequired, setValue
-
Methods inherited from class de.xima.fc.gui.model.value_descriptor_form.ValueReferencingControl
readValue, writeValue
-
-
-
-
Constructor Detail
-
DescriptorEditableControl
protected DescriptorEditableControl(String type, IValueAccessor<?> root, String path, IValueDescriptor<Value,?> descriptor)
Creates a new editable control for editing a value described by the given descriptor.- Parameters:
type- The type of the control that determines how it is rendered.root- The root object against which the path is evaluated.path- The JSON path expression that references the value.descriptor- The descriptor that describes the value being edited.
-
-
Method Detail
-
coerceValue
protected final Value coerceValue(Object value)
Description copied from class:EditableControlCoerces the given value to conform to the restrictions imposed by the value descriptor. This method is called byEditableControl.getValue()andEditableControl.setValue(Object)to ensure that the value is always valid.- Specified by:
coerceValuein classEditableControl<Value>- Parameters:
value- The value to coerce.- Returns:
- The coerced value.
-
-