Class MapEntryControl
- 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.MapEntryControl
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MapEntryEndControl,MapEntryStartControl
public abstract class MapEntryControl extends ValueReferencingControl
Base class of aControlfor a map entry container, either the start or end of a map entry. A map entry is part of a map value. Each entry is enclosed in a container. A map entry container may have a delete button to remove the entry from the map.- Since:
- 8.5.0
- See Also:
MapEntryStartControl,MapEntryEndControl, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMapEntryControl(String type, IValueAccessor<?> root, String path, String key)Creates a new map entry control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetKey()Gets the key of the map entry this control is associated with.voidremoveRow()Mutates the referenced map by removing the entry with thekey, if possible.-
Methods inherited from class de.xima.fc.gui.model.value_descriptor_form.ValueReferencingControl
readValue, writeValue
-
-
-
-
Constructor Detail
-
MapEntryControl
protected MapEntryControl(String type, IValueAccessor<?> root, String path, String key)
Creates a new map entry control.- 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 list.key- The key of the map entry this control is associated with.
-
-
Method Detail
-
getKey
public String getKey()
Gets the key of the map entry this control is associated with.- Returns:
- The key of the map entry.
-
removeRow
public void removeRow()
Mutates the referenced map by removing the entry with thekey, if possible. If the entry cannot be removed, this method does nothing.
-
-