- java.lang.Object
-
- org.controlsfx.tools.ValueExtractor
-
public class ValueExtractor extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addObservableValueExtractor(Predicate<Control> test, Callback<Control,ObservableValue<?>> extract)
Add "obervable value extractor" for custom controls.static void
addValueExtractor(Predicate<Node> test, Callback<Node,Object> extractor)
static Optional<Callback<Control,ObservableValue<?>>>
getObservableValueExtractor(Control c)
static Object
getValue(Node n)
Attempts to return a value for the given Node.
-
-
-
Method Detail
-
addObservableValueExtractor
public static void addObservableValueExtractor(Predicate<Control> test, Callback<Control,ObservableValue<?>> extract)
Add "obervable value extractor" for custom controls.- Parameters:
test
- applicability testextract
- extraction of observable value
-
getObservableValueExtractor
public static final Optional<Callback<Control,ObservableValue<?>>> getObservableValueExtractor(Control c)
-
addValueExtractor
public static void addValueExtractor(Predicate<Node> test, Callback<Node,Object> extractor)
-
getValue
public static Object getValue(Node n)
Attempts to return a value for the given Node. This is done by checking the map of value extractors, contained within this class. This map contains value extractors for common UI controls, but more extractors can be added by callingaddObservableValueExtractor(Predicate, Callback)
.- Parameters:
n
- The node from whom a value will hopefully be extracted.- Returns:
- The value of the given node.
-
-