public final class JavaFXUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
configure(javafx.scene.control.ButtonBase control,
JavaFXAction action) |
static void |
configure(javafx.scene.control.CheckBox control,
JavaFXAction action) |
static void |
configure(javafx.scene.control.CheckMenuItem control,
JavaFXAction action) |
static void |
configure(javafx.scene.control.MenuItem control,
JavaFXAction action) |
static void |
configure(javafx.scene.control.RadioButton control,
JavaFXAction action) |
static void |
configure(javafx.scene.control.RadioMenuItem control,
JavaFXAction action) |
static void |
configure(javafx.scene.control.ToggleButton control,
JavaFXAction action) |
static void |
configureControl(java.lang.Object control,
JavaFXAction action) |
static void |
connectActions(java.lang.Object node,
GriffonController controller) |
static void |
connectActions(java.lang.Object node,
GriffonController controller,
ActionMatcher actionMatcher) |
static void |
connectMessageSource(java.lang.Object node,
GriffonApplication application) |
static <E> javafx.collections.ObservableList<E> |
createJavaFXThreadProxyList(javafx.collections.ObservableList<E> source)
Deprecated.
Use
GriffonFXCollections.uiThreadAwareObservableList instead. |
static <K,V> javafx.collections.ObservableMap<K,V> |
createJavaFXThreadProxyMap(javafx.collections.ObservableMap<K,V> source)
Deprecated.
Use
GriffonFXCollections.uiThreadAwareObservableMap instead. |
static <E> javafx.collections.ObservableSet<E> |
createJavaFXThreadProxySet(javafx.collections.ObservableSet<E> source)
Deprecated.
Use
GriffonFXCollections.uiThreadAwareObservableSet instead. |
static <B> javafx.beans.property.Property<?> |
extractProperty(B bean,
java.lang.String propertyName) |
static java.lang.Object |
findElement(java.lang.Object root,
java.util.function.Predicate<java.lang.Object> predicate) |
static java.lang.Object |
findElement(java.lang.Object root,
java.lang.String id) |
static java.util.Collection<java.lang.Object> |
findElements(java.lang.Object root,
java.util.function.Predicate<java.lang.Object> predicate) |
static javafx.scene.Node |
findNode(javafx.scene.Node root,
java.lang.String id) |
static java.lang.String |
getGriffonActionId(javafx.scene.control.MenuItem menuItem)
Finds out if an
Action has been registered with the target MenuItem, returning the action id if found. |
static java.lang.String |
getGriffonActionId(javafx.scene.Node node)
Finds out if an
Action has been registered with the target Node, returning the action id if found. |
static java.lang.String |
getI18nArgs(javafx.scene.chart.Axis<?> node)
Finds out if an
arguments array has been registered with the target Node, returning the array if found. |
static java.lang.String |
getI18nArgs(javafx.scene.control.Labeled node)
Finds out if an
arguments array has been registered with the target Node, returning the array if found. |
static java.lang.String |
getI18nArgs(javafx.scene.control.MenuItem node)
Finds out if an
arguments array has been registered with the target Node, returning the array if found. |
static java.lang.String |
getI18nArgs(javafx.scene.control.Tab node)
Finds out if an
arguments array has been registered with the target Node, returning the array if found. |
static java.lang.String |
getI18nArgs(javafx.scene.control.TableColumn<?,?> node)
Finds out if an
arguments array has been registered with the target Node, returning the array if found. |
static java.lang.String |
getI18nDefaultValue(javafx.scene.chart.Axis<?> node)
Finds out if a
default value has been registered with the target Node, returning the value if found. |
static java.lang.String |
getI18nDefaultValue(javafx.scene.control.Labeled node)
Finds out if a
default value has been registered with the target Node, returning the value if found. |
static java.lang.String |
getI18nDefaultValue(javafx.scene.control.MenuItem node)
Finds out if a
default value has been registered with the target Node, returning the value if found. |
static java.lang.String |
getI18nDefaultValue(javafx.scene.control.Tab node)
Finds out if a
default value has been registered with the target Node, returning the value if found. |
static java.lang.String |
getI18nDefaultValue(javafx.scene.control.TableColumn<?,?> node)
Finds out if a
default value has been registered with the target Node, returning the value if found. |
static java.lang.String |
getI18nKey(javafx.scene.chart.Axis<?> node)
Finds out if an i18n
key has been registered with the target Node, returning the key if found. |
static java.lang.String |
getI18nKey(javafx.scene.control.Labeled node)
Finds out if an i18n
key has been registered with the target Node, returning the key if found. |
static java.lang.String |
getI18nKey(javafx.scene.control.MenuItem node)
Finds out if an i18n
key has been registered with the target Node, returning the key if found. |
static java.lang.String |
getI18nKey(javafx.scene.control.Tab node)
Finds out if an i18n
key has been registered with the target Node, returning the key if found. |
static java.lang.String |
getI18nKey(javafx.scene.control.TableColumn<?,?> node)
Finds out if an i18n
key has been registered with the target Node, returning the key if found. |
static javafx.stage.Window |
getWindowAncestor(java.lang.Object node) |
static java.lang.String |
normalizeStyle(java.lang.String style,
java.lang.String key,
java.lang.String value) |
static javafx.scene.Node |
resolveIcon(java.lang.String iconUrl) |
static void |
setGraphic(javafx.scene.control.Labeled control,
javafx.scene.image.Image graphic) |
static void |
setGraphic(javafx.scene.control.Labeled control,
javafx.scene.Node graphic) |
static void |
setGraphic(javafx.scene.control.MenuItem control,
javafx.scene.image.Image graphic) |
static void |
setGraphic(javafx.scene.control.MenuItem control,
javafx.scene.Node graphic) |
static void |
setGraphicStyle(javafx.scene.control.ButtonBase node,
java.lang.String graphicStyle) |
static void |
setGraphicStyle(javafx.scene.control.MenuItem node,
java.lang.String graphicStyle) |
static void |
setGraphicStyleClass(javafx.scene.control.ButtonBase node,
java.lang.String graphicStyleClass) |
static void |
setGraphicStyleClass(javafx.scene.control.ButtonBase node,
java.lang.String graphicStyleClass,
boolean remove) |
static void |
setGraphicStyleClass(javafx.scene.control.MenuItem node,
java.lang.String graphicStyleClass) |
static void |
setGraphicStyleClass(javafx.scene.control.MenuItem node,
java.lang.String graphicStyleClass,
boolean remove) |
static void |
setGriffonActionId(javafx.scene.control.MenuItem menuItem,
java.lang.String actionId)
Associates a
Action with a target MenuItem. |
static void |
setGriffonActionId(javafx.scene.Node node,
java.lang.String actionId)
Associates a
Action with a target Node. |
static void |
setI18nArgs(javafx.scene.chart.Axis<?> node,
java.lang.String args)
Associates an i18n arrays of arguments to a
node. |
static void |
setI18nArgs(javafx.scene.control.Labeled node,
java.lang.String args)
Associates an i18n arrays of arguments to a
node. |
static void |
setI18nArgs(javafx.scene.control.MenuItem node,
java.lang.String args)
Associates an i18n arrays of arguments to a
node. |
static void |
setI18nArgs(javafx.scene.control.TableColumn<?,?> node,
java.lang.String args)
Associates an i18n arrays of arguments to a
node. |
static void |
setI18nArgs(javafx.scene.control.Tab node,
java.lang.String args)
Associates an i18n arrays of arguments to a
node. |
static void |
setI18nDefaultValue(javafx.scene.chart.Axis<?> node,
java.lang.String defaultValue)
Associates an default value
node. |
static void |
setI18nDefaultValue(javafx.scene.control.Labeled node,
java.lang.String defaultValue)
Associates an default value
node. |
static void |
setI18nDefaultValue(javafx.scene.control.MenuItem node,
java.lang.String defaultValue)
Associates an default value
node. |
static void |
setI18nDefaultValue(javafx.scene.control.TableColumn<?,?> node,
java.lang.String defaultValue)
Associates an default value
node. |
static void |
setI18nDefaultValue(javafx.scene.control.Tab node,
java.lang.String defaultValue)
Associates an default value
node. |
static void |
setI18nKey(javafx.scene.chart.Axis<?> node,
java.lang.String key)
Associates an i18n key to a
node. |
static void |
setI18nKey(javafx.scene.control.Labeled node,
java.lang.String key)
Associates an i18n key to a
node. |
static void |
setI18nKey(javafx.scene.control.MenuItem node,
java.lang.String key)
Associates an i18n key to a
node. |
static void |
setI18nKey(javafx.scene.control.TableColumn<?,?> node,
java.lang.String key)
Associates an i18n key to a
node. |
static void |
setI18nKey(javafx.scene.control.Tab node,
java.lang.String key)
Associates an i18n key to a
node. |
static void |
setIcon(javafx.scene.control.Labeled control,
java.lang.String iconUrl) |
static void |
setIcon(javafx.scene.control.MenuItem control,
java.lang.String iconUrl) |
static void |
setStyle(javafx.scene.control.MenuItem node,
java.lang.String style) |
static void |
setStyle(javafx.scene.Node node,
java.lang.String style) |
static void |
setStyleClass(javafx.scene.control.MenuItem node,
java.lang.String styleClass) |
static void |
setStyleClass(javafx.scene.control.MenuItem node,
java.lang.String styleClass,
boolean remove) |
static void |
setStyleClass(javafx.scene.Node node,
java.lang.String styleClass) |
static void |
setStyleClass(javafx.scene.Node node,
java.lang.String styleClass,
boolean remove) |
static void |
setTooltip(javafx.scene.control.Control control,
java.lang.String text) |
public static void setI18nKey(@Nonnull
javafx.scene.control.Labeled node,
@Nonnull
java.lang.String key)
node. The key is used to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.key - the message key to be registered.@Nullable
public static java.lang.String getI18nKey(@Nonnull
javafx.scene.control.Labeled node)
key has been registered with the target Node, returning the key if found.node - the target node on which the key may have been registered.Node or null if not found.public static void setI18nArgs(@Nonnull
javafx.scene.control.Labeled node,
@Nullable
java.lang.String args)
node.
These arguments will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.args - the array of arguments to be registered.@Nullable
public static java.lang.String getI18nArgs(@Nonnull
javafx.scene.control.Labeled node)
arguments array has been registered with the target Node, returning the array if found.node - the target node on which the arguments may have been registered.Node or null if not found.public static void setI18nDefaultValue(@Nonnull
javafx.scene.control.Labeled node,
@Nullable
java.lang.String defaultValue)
node.
The value will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.defaultValue - the value to be registered.@Nullable
public static java.lang.String getI18nDefaultValue(@Nonnull
javafx.scene.control.Labeled node)
default value has been registered with the target Node, returning the value if found.node - the target node on which the value may have been registered.Node or null if not found.public static void setI18nKey(@Nonnull
javafx.scene.control.Tab node,
@Nonnull
java.lang.String key)
node. The key is used to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.key - the message key to be registered.@Nullable
public static java.lang.String getI18nKey(@Nonnull
javafx.scene.control.Tab node)
key has been registered with the target Node, returning the key if found.node - the target node on which the key may have been registered.Node or null if not found.public static void setI18nArgs(@Nonnull
javafx.scene.control.Tab node,
@Nullable
java.lang.String args)
node.
These arguments will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.args - the array of arguments to be registered.@Nullable
public static java.lang.String getI18nArgs(@Nonnull
javafx.scene.control.Tab node)
arguments array has been registered with the target Node, returning the array if found.node - the target node on which the arguments may have been registered.Node or null if not found.public static void setI18nDefaultValue(@Nonnull
javafx.scene.control.Tab node,
@Nullable
java.lang.String defaultValue)
node.
The value will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.defaultValue - the value to be registered.@Nullable
public static java.lang.String getI18nDefaultValue(@Nonnull
javafx.scene.control.Tab node)
default value has been registered with the target Node, returning the value if found.node - the target node on which the value may have been registered.Node or null if not found.public static void setI18nKey(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String key)
node. The key is used to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.key - the message key to be registered.@Nullable
public static java.lang.String getI18nKey(@Nonnull
javafx.scene.control.MenuItem node)
key has been registered with the target Node, returning the key if found.node - the target node on which the key may have been registered.Node or null if not found.public static void setI18nArgs(@Nonnull
javafx.scene.control.MenuItem node,
@Nullable
java.lang.String args)
node.
These arguments will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.args - the array of arguments to be registered.@Nullable
public static java.lang.String getI18nArgs(@Nonnull
javafx.scene.control.MenuItem node)
arguments array has been registered with the target Node, returning the array if found.node - the target node on which the arguments may have been registered.Node or null if not found.public static void setI18nDefaultValue(@Nonnull
javafx.scene.control.MenuItem node,
@Nullable
java.lang.String defaultValue)
node.
The value will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.defaultValue - the value to be registered.@Nullable
public static java.lang.String getI18nDefaultValue(@Nonnull
javafx.scene.control.MenuItem node)
default value has been registered with the target Node, returning the value if found.node - the target node on which the value may have been registered.Node or null if not found.public static void setI18nKey(@Nonnull
javafx.scene.chart.Axis<?> node,
@Nonnull
java.lang.String key)
node. The key is used to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.key - the message key to be registered.@Nullable
public static java.lang.String getI18nKey(@Nonnull
javafx.scene.chart.Axis<?> node)
key has been registered with the target Node, returning the key if found.node - the target node on which the key may have been registered.Node or null if not found.public static void setI18nArgs(@Nonnull
javafx.scene.chart.Axis<?> node,
@Nullable
java.lang.String args)
node.
These arguments will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.args - the array of arguments to be registered.@Nullable
public static java.lang.String getI18nArgs(@Nonnull
javafx.scene.chart.Axis<?> node)
arguments array has been registered with the target Node, returning the array if found.node - the target node on which the arguments may have been registered.Node or null if not found.public static void setI18nDefaultValue(@Nonnull
javafx.scene.chart.Axis<?> node,
@Nullable
java.lang.String defaultValue)
node.
The value will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.defaultValue - the value to be registered.@Nullable
public static java.lang.String getI18nDefaultValue(@Nonnull
javafx.scene.chart.Axis<?> node)
default value has been registered with the target Node, returning the value if found.node - the target node on which the value may have been registered.Node or null if not found.public static void setI18nKey(@Nonnull
javafx.scene.control.TableColumn<?,?> node,
@Nonnull
java.lang.String key)
node. The key is used to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.key - the message key to be registered.@Nullable
public static java.lang.String getI18nKey(@Nonnull
javafx.scene.control.TableColumn<?,?> node)
key has been registered with the target Node, returning the key if found.node - the target node on which the key may have been registered.Node or null if not found.public static void setI18nArgs(@Nonnull
javafx.scene.control.TableColumn<?,?> node,
@Nullable
java.lang.String args)
node.
These arguments will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.args - the array of arguments to be registered.@Nullable
public static java.lang.String getI18nArgs(@Nonnull
javafx.scene.control.TableColumn<?,?> node)
arguments array has been registered with the target Node, returning the array if found.node - the target node on which the arguments may have been registered.Node or null if not found.public static void setI18nDefaultValue(@Nonnull
javafx.scene.control.TableColumn<?,?> node,
@Nullable
java.lang.String defaultValue)
node.
The value will be used alongside a key to resolve a message via the application's MessageSource.node - the target node on which the key will be registered.defaultValue - the value to be registered.@Nullable
public static java.lang.String getI18nDefaultValue(@Nonnull
javafx.scene.control.TableColumn<?,?> node)
default value has been registered with the target Node, returning the value if found.node - the target node on which the value may have been registered.Node or null if not found.public static void connectMessageSource(@Nonnull
java.lang.Object node,
@Nonnull
GriffonApplication application)
public static void setGriffonActionId(@Nonnull
javafx.scene.Node node,
@Nonnull
java.lang.String actionId)
Action with a target Node.node - the target node on which the action will be registered.actionId - the id of the action to be registered.@Nullable
public static java.lang.String getGriffonActionId(@Nonnull
javafx.scene.Node node)
Action has been registered with the target Node, returning the action id if found.node - the target node on which the action may have been registered.Node or null if not found.public static void setGriffonActionId(@Nonnull
javafx.scene.control.MenuItem menuItem,
@Nonnull
java.lang.String actionId)
Action with a target MenuItem.menuItem - the target menuItem on which the action will be registered.actionId - the id of the action to be registered.@Nullable
public static java.lang.String getGriffonActionId(@Nonnull
javafx.scene.control.MenuItem menuItem)
Action has been registered with the target MenuItem, returning the action id if found.menuItem - the target menuItem on which the action may have been registered.MenuItem or null if not found.@Deprecated
@Nonnull
public static <E> javafx.collections.ObservableList<E> createJavaFXThreadProxyList(@Nonnull
javafx.collections.ObservableList<E> source)
GriffonFXCollections.uiThreadAwareObservableList instead.E - the list's parameter type.source - the ObservableList to be wrappedGriffonFXCollections.uiThreadAwareObservableList(javafx.collections.ObservableList<E>)@Deprecated
@Nonnull
public static <E> javafx.collections.ObservableSet<E> createJavaFXThreadProxySet(@Nonnull
javafx.collections.ObservableSet<E> source)
GriffonFXCollections.uiThreadAwareObservableSet instead.E - the set's parameter type.source - the ObservableSet to be wrappedGriffonFXCollections.uiThreadAwareObservableSet(javafx.collections.ObservableSet<E>)@Deprecated
@Nonnull
public static <K,V> javafx.collections.ObservableMap<K,V> createJavaFXThreadProxyMap(@Nonnull
javafx.collections.ObservableMap<K,V> source)
GriffonFXCollections.uiThreadAwareObservableMap instead.K - the type of keys maintained by the mapV - the type of mapped valuessource - the ObservableMap to be wrappedGriffonFXCollections.uiThreadAwareObservableMap(javafx.collections.ObservableMap<K, V>)@Nonnull
public static <B> javafx.beans.property.Property<?> extractProperty(@Nonnull
B bean,
@Nonnull
java.lang.String propertyName)
public static void connectActions(@Nonnull
java.lang.Object node,
@Nonnull
GriffonController controller,
@Nonnull
ActionMatcher actionMatcher)
public static void connectActions(@Nonnull
java.lang.Object node,
@Nonnull
GriffonController controller)
public static void configureControl(@Nonnull
java.lang.Object control,
@Nonnull
JavaFXAction action)
public static java.lang.String normalizeStyle(@Nonnull
java.lang.String style,
@Nonnull
java.lang.String key,
@Nonnull
java.lang.String value)
public static void configure(@Nonnull
javafx.scene.control.ToggleButton control,
@Nonnull
JavaFXAction action)
public static void configure(@Nonnull
javafx.scene.control.CheckBox control,
@Nonnull
JavaFXAction action)
public static void configure(@Nonnull
javafx.scene.control.RadioButton control,
@Nonnull
JavaFXAction action)
public static void configure(@Nonnull
javafx.scene.control.ButtonBase control,
@Nonnull
JavaFXAction action)
public static void configure(@Nonnull
javafx.scene.control.CheckMenuItem control,
@Nonnull
JavaFXAction action)
public static void configure(@Nonnull
javafx.scene.control.RadioMenuItem control,
@Nonnull
JavaFXAction action)
public static void configure(@Nonnull
javafx.scene.control.MenuItem control,
@Nonnull
JavaFXAction action)
public static void setStyle(@Nonnull
javafx.scene.Node node,
@Nonnull
java.lang.String style)
public static void setStyle(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String style)
public static void setGraphicStyle(@Nonnull
javafx.scene.control.ButtonBase node,
@Nonnull
java.lang.String graphicStyle)
public static void setGraphicStyle(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String graphicStyle)
public static void setStyleClass(@Nonnull
javafx.scene.Node node,
@Nonnull
java.lang.String styleClass)
public static void setStyleClass(@Nonnull
javafx.scene.Node node,
@Nonnull
java.lang.String styleClass,
boolean remove)
public static void setStyleClass(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String styleClass)
public static void setStyleClass(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String styleClass,
boolean remove)
public static void setGraphicStyleClass(@Nonnull
javafx.scene.control.ButtonBase node,
@Nonnull
java.lang.String graphicStyleClass)
public static void setGraphicStyleClass(@Nonnull
javafx.scene.control.ButtonBase node,
@Nonnull
java.lang.String graphicStyleClass,
boolean remove)
public static void setGraphicStyleClass(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String graphicStyleClass)
public static void setGraphicStyleClass(@Nonnull
javafx.scene.control.MenuItem node,
@Nonnull
java.lang.String graphicStyleClass,
boolean remove)
public static void setTooltip(@Nonnull
javafx.scene.control.Control control,
@Nullable
java.lang.String text)
public static void setIcon(@Nonnull
javafx.scene.control.Labeled control,
@Nonnull
java.lang.String iconUrl)
public static void setIcon(@Nonnull
javafx.scene.control.MenuItem control,
@Nonnull
java.lang.String iconUrl)
public static void setGraphic(@Nonnull
javafx.scene.control.Labeled control,
@Nullable
javafx.scene.image.Image graphic)
public static void setGraphic(@Nonnull
javafx.scene.control.MenuItem control,
@Nullable
javafx.scene.image.Image graphic)
public static void setGraphic(@Nonnull
javafx.scene.control.Labeled control,
@Nullable
javafx.scene.Node graphic)
public static void setGraphic(@Nonnull
javafx.scene.control.MenuItem control,
@Nullable
javafx.scene.Node graphic)
@Nullable
public static javafx.scene.Node resolveIcon(@Nonnull
java.lang.String iconUrl)
@Nullable
public static javafx.scene.Node findNode(@Nonnull
javafx.scene.Node root,
@Nonnull
java.lang.String id)
@Nullable
public static java.lang.Object findElement(@Nonnull
java.lang.Object root,
@Nonnull
java.lang.String id)
@Nullable
public static java.lang.Object findElement(@Nonnull
java.lang.Object root,
@Nonnull
java.util.function.Predicate<java.lang.Object> predicate)
@Nonnull
public static java.util.Collection<java.lang.Object> findElements(@Nonnull
java.lang.Object root,
@Nonnull
java.util.function.Predicate<java.lang.Object> predicate)
@Nullable
public static javafx.stage.Window getWindowAncestor(@Nonnull
java.lang.Object node)