Class FieldChangeTrigger<S,T>
java.lang.Object
org.esa.snap.ui.tooladapter.dialogs.components.FieldChangeTrigger<S,T>
- Type Parameters:
S
- The source field typeT
- The target field type
- All Implemented Interfaces:
Function<S,
T>
Models a relation between two entity fields such that, if one field changes, the other may change based on the new
value of the first field.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static <K,
V> FieldChangeTrigger <K, V> Creates a field change trigger with just an action.static <K,
V> FieldChangeTrigger <K, V> Creates a field change trigger with an action that will execute based on a condition.Returns the target field name
-
Method Details
-
create
Creates a field change trigger with just an action.- Type Parameters:
K
- The source field typeV
- The target field type- Parameters:
fieldName
- The target field nameaction
- The action that will set the target
-
create
public static <K,V> FieldChangeTrigger<K,V> create(String fieldName, Function<K, V> action, Predicate<K> condition) Creates a field change trigger with an action that will execute based on a condition.- Type Parameters:
K
- The source field typeV
- The target field type- Parameters:
fieldName
- The target field nameaction
- The action that may set the targetcondition
- The condition to check before performing the action
-
getTargetFieldName
Returns the target field name -
canApply
-
apply
-