public final class FXUiUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
confirm(java.lang.String message)
Displays a confirmation dialog
|
static boolean |
confirm(java.lang.String headerText,
java.lang.String message)
Displays a confirmation dialog
|
static boolean |
confirm(java.lang.String title,
java.lang.String headerText,
java.lang.String message)
Displays a confirmation dialog
|
static javafx.scene.control.TextField |
createBigDecimalField(Property property,
FXEntityEditModel editModel)
Instantiates a
TextField for BigDecimal values, based on the given property and linked to the given edit model |
static javafx.scene.control.TextField |
createBigDecimalField(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
TextField for BigDecimal values, based on the given property and linked to the given edit model |
static StringValue<java.math.BigDecimal> |
createBigDecimalValue(Property property,
javafx.scene.control.TextField textField)
Instantiates a
StringValue for BigDecimal values, based on the given property and linked to the given text field |
static Value<java.lang.Boolean> |
createBooleanValue(javafx.scene.control.CheckBox checkBox)
Instantiates a
Value instance based on the value of the given CheckBox |
static javafx.scene.control.CheckBox |
createCheckBox()
Instantiates a new
CheckBox instance |
static javafx.scene.control.CheckBox |
createCheckBox(Property property,
FXEntityEditModel editModel)
Instantiates a
CheckBox based on the given property, linked to the given edit model |
static javafx.scene.control.CheckBox |
createCheckBox(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
CheckBox based on the given property, linked to the given edit model |
static javafx.scene.control.CheckBox |
createCheckBox(State state)
Instantiates a
CheckBox based on the given State instance |
static javafx.scene.control.CheckBox |
createCheckBox(StateObserver enabledState)
Instantiates a new
CheckBox instance |
static javafx.scene.control.Control |
createControl(Property property,
EntityConnectionProvider connectionProvider)
Instantiates a
Control based on the given property. |
static javafx.scene.control.DatePicker |
createDatePicker() |
static javafx.scene.control.DatePicker |
createDatePicker(Property property,
FXEntityEditModel editModel)
Instantiates a
DatePicker based on the given property and linked to the given edit model |
static javafx.scene.control.DatePicker |
createDatePicker(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
DatePicker based on the given property and linked to the given edit model |
static javafx.scene.control.DatePicker |
createDatePicker(StateObserver enabledState) |
static StringValue<java.time.LocalDate> |
createDateValue(Property property,
javafx.scene.control.DatePicker picker)
Instantiates a
StringValue for LocalDate values, based on the given property and linked to the given text field |
static javafx.scene.control.TextField |
createDoubleField(Property property,
FXEntityEditModel editModel)
Instantiates a
TextField for Double values, based on the given property and linked to the given edit model |
static javafx.scene.control.TextField |
createDoubleField(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
TextField for Double values, based on the given property and linked to the given edit model |
static StringValue<java.lang.Double> |
createDoubleValue(Property property,
javafx.scene.control.TextField textField)
Instantiates a
StringValue for Double values, based on the given property and linked to the given text field |
static Value<Entity> |
createEntityValue(javafx.scene.control.ComboBox<Entity> comboBox)
Instantiates a
Value instance based on the given ComboBox |
static javafx.scene.control.ComboBox<Entity> |
createForeignKeyComboBox(ForeignKeyProperty foreignKeyProperty,
FXEntityEditModel editModel)
Instantiates a
ComboBox based on the given property and linked to the given edit model |
static javafx.scene.control.TextField |
createIntegerField(Property property,
FXEntityEditModel editModel)
Instantiates a
TextField for Integer values, based on the given property and linked to the given edit model |
static javafx.scene.control.TextField |
createIntegerField(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
TextField for Integer values, based on the given property and linked to the given edit model |
static StringValue<java.lang.Integer> |
createIntegerValue(Property property,
javafx.scene.control.TextField textField)
Instantiates a
StringValue for Integer values, based on the given property and linked to the given text field |
static javafx.scene.control.TextField |
createLongField(Property property,
FXEntityEditModel editModel)
Instantiates a
TextField for Long values, based on the given property and linked to the given edit model |
static javafx.scene.control.TextField |
createLongField(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
TextField for Long values, based on the given property and linked to the given edit model |
static StringValue<java.lang.Long> |
createLongValue(Property property,
javafx.scene.control.TextField textField)
Instantiates a
StringValue for Long values, based on the given property and linked to the given text field |
static EntityLookupField |
createLookupField(ForeignKeyProperty foreignKeyProperty,
FXEntityEditModel editModel)
Instantiates a
EntityLookupField based on the given property and linked to the given edit model |
static StringValue<java.lang.String> |
createStringValue(javafx.scene.control.TextField textField)
Instantiates a
StringValue based on the given text field |
static javafx.scene.control.TextField |
createTextField(Property property)
Instantiates a
TextField based on the given property |
static javafx.scene.control.TextField |
createTextField(Property property,
FXEntityEditModel editModel)
Instantiates a
TextField based on the given property, linked to the given edit model |
static javafx.scene.control.TextField |
createTextField(Property property,
FXEntityEditModel editModel,
StateObserver enabledState)
Instantiates a
TextField based on the given property, linked to the given edit model |
static javafx.scene.control.TextField |
createTextField(Property property,
StateObserver enabledState)
Instantiates a
TextField based on the given property |
static StringValue<java.time.LocalDateTime> |
createTimestampValue(Property property,
javafx.scene.control.TextField textField)
Instantiates a
StringValue for LocalDateTime values, based on the given property and linked to the given text field |
static StringValue<java.time.LocalTime> |
createTimeValue(Property property,
javafx.scene.control.TextField textField)
Instantiates a
StringValue for LocalTime values, based on the given property and linked to the given text field |
static javafx.scene.control.ToggleButton |
createToggleButton(State state)
Instantiates a
ToggleButton based on the given State instance |
static Value |
createValue(Property property,
javafx.scene.control.Control control,
java.lang.Object defaultValue)
Instantiates a
Value instance based on the given property, linked to the given control |
static javafx.scene.control.ComboBox<Item> |
createValueListComboBox(ValueListProperty valueListProperty,
FXEntityEditModel editModel)
Instantiates a
ComboBox based on the values of the given property and linked to the given edit model |
static javafx.collections.ObservableList<Item> |
createValueListComboBoxModel(ValueListProperty property)
Instantiates a
ObservableList containing the Items associated with the given value list property |
static <T> T |
getParentOfType(javafx.scene.Node node,
java.lang.Class<T> clazz)
Finds and returns the first parent of
node of the given type |
static void |
link(javafx.beans.property.BooleanProperty property,
StateObserver stateObserver)
Links the given boolean property to the given state observer, so that changes is one are reflected in the other
|
static <T> T |
selectValue(java.util.List<T> values)
Displays a dialog for selecting one of the given values
|
static <T> java.util.List<T> |
selectValues(java.util.List<T> values)
Displays a dialog for selecting one or more of the given values
|
static <T> java.util.List<T> |
selectValues(java.util.List<T> values,
boolean single)
Displays a dialog for selecting one or more of the given values
|
static void |
setClipboard(java.lang.String string)
Sets the given string as the system clipboard value
|
static void |
showExceptionDialog(java.lang.Throwable exception)
Displays an exception dialog for the given exception
|
static User |
showLoginDialog(java.lang.String applicationTitle,
User defaultUser,
javafx.scene.image.ImageView icon)
Displays a login dialog
|
public static <T> T selectValue(java.util.List<T> values)
T - the type of valuesvalues - the values from which to chooseCancelException - in case the user cancels the operationpublic static <T> java.util.List<T> selectValues(java.util.List<T> values)
T - the type of valuesvalues - the values from which to chooseCancelException - in case the user cancels the operationpublic static <T> java.util.List<T> selectValues(java.util.List<T> values,
boolean single)
T - the type of valuesvalues - the values from which to choosesingle - if true then only a single value can be selectedCancelException - in case the user cancels the operationpublic static void setClipboard(java.lang.String string)
string - the string to add to the clipboardpublic static boolean confirm(java.lang.String message)
message - the message to displaypublic static boolean confirm(java.lang.String headerText,
java.lang.String message)
headerText - the dialog header textmessage - the message to displaypublic static boolean confirm(java.lang.String title,
java.lang.String headerText,
java.lang.String message)
title - the dialog titleheaderText - the dialog header textmessage - the message to displaypublic static Value createValue(Property property, javafx.scene.control.Control control, java.lang.Object defaultValue)
Value instance based on the given property, linked to the given controlproperty - the propertycontrol - the controldefaultValue - the default to set after instantiationValue instancepublic static Value<Entity> createEntityValue(javafx.scene.control.ComboBox<Entity> comboBox)
Value instance based on the given ComboBoxcomboBox - the combo box on which to base the valueValue instancepublic static javafx.scene.control.ToggleButton createToggleButton(State state)
ToggleButton based on the given State instancestate - the state on which to base the toggle buttonToggleButton based on the given statepublic static javafx.scene.control.CheckBox createCheckBox(State state)
CheckBox based on the given State instancestate - the state on which to base the check boxCheckBox based on the given statepublic static javafx.scene.control.Control createControl(Property property, EntityConnectionProvider connectionProvider)
Control based on the given property.property - the propertyconnectionProvider - the EntityConnectionProvider instance to useControl based on the given propertypublic static javafx.scene.control.CheckBox createCheckBox(Property property, FXEntityEditModel editModel)
CheckBox based on the given property, linked to the given edit modelproperty - the propertyeditModel - the edit modelCheckBox based on the given property and edit modelpublic static javafx.scene.control.CheckBox createCheckBox(Property property, FXEntityEditModel editModel, StateObserver enabledState)
CheckBox based on the given property, linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the check boxCheckBox based on the given property and edit modelpublic static Value<java.lang.Boolean> createBooleanValue(javafx.scene.control.CheckBox checkBox)
Value instance based on the value of the given CheckBoxcheckBox - the check box on which to base the valueValue based on the given check boxpublic static javafx.scene.control.TextField createTextField(Property property, FXEntityEditModel editModel)
TextField based on the given property, linked to the given edit modelproperty - the propertyeditModel - the edit modelTextField based on the given propertypublic static javafx.scene.control.TextField createTextField(Property property, FXEntityEditModel editModel, StateObserver enabledState)
TextField based on the given property, linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the text fieldTextField based on the given propertypublic static StringValue<java.lang.String> createStringValue(javafx.scene.control.TextField textField)
StringValue based on the given text fieldtextField - the text fieldStringValue based on the given text fieldpublic static javafx.scene.control.TextField createLongField(Property property, FXEntityEditModel editModel)
TextField for Long values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelTextField for Long values, based on the given propertypublic static javafx.scene.control.TextField createLongField(Property property, FXEntityEditModel editModel, StateObserver enabledState)
TextField for Long values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the text fieldTextField for Long values, based on the given propertypublic static StringValue<java.lang.Long> createLongValue(Property property, javafx.scene.control.TextField textField)
StringValue for Long values, based on the given property and linked to the given text fieldproperty - the propertytextField - the text fieldStringValue for Long values, based on the given propertypublic static javafx.scene.control.TextField createIntegerField(Property property, FXEntityEditModel editModel)
TextField for Integer values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelTextField for Integer values, based on the given propertypublic static javafx.scene.control.TextField createIntegerField(Property property, FXEntityEditModel editModel, StateObserver enabledState)
TextField for Integer values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the text fieldTextField for Integer values, based on the given propertypublic static StringValue<java.lang.Integer> createIntegerValue(Property property, javafx.scene.control.TextField textField)
StringValue for Integer values, based on the given property and linked to the given text fieldproperty - the propertytextField - the text fieldStringValue for Integer values, based on the given propertypublic static javafx.scene.control.TextField createDoubleField(Property property, FXEntityEditModel editModel)
TextField for Double values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelTextField for Double values, based on the given propertypublic static javafx.scene.control.TextField createDoubleField(Property property, FXEntityEditModel editModel, StateObserver enabledState)
TextField for Double values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the text fieldTextField for Double values, based on the given propertypublic static javafx.scene.control.TextField createBigDecimalField(Property property, FXEntityEditModel editModel)
TextField for BigDecimal values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelTextField for BigDecimal values, based on the given propertypublic static javafx.scene.control.TextField createBigDecimalField(Property property, FXEntityEditModel editModel, StateObserver enabledState)
TextField for BigDecimal values, based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the text fieldTextField for BigDecimal values, based on the given propertypublic static StringValue<java.lang.Double> createDoubleValue(Property property, javafx.scene.control.TextField textField)
StringValue for Double values, based on the given property and linked to the given text fieldproperty - the propertytextField - the text fieldStringValue for Double values, based on the given propertypublic static StringValue<java.math.BigDecimal> createBigDecimalValue(Property property, javafx.scene.control.TextField textField)
StringValue for BigDecimal values, based on the given property and linked to the given text fieldproperty - the propertytextField - the text fieldStringValue for BigDecimal values, based on the given propertypublic static javafx.scene.control.DatePicker createDatePicker(Property property, FXEntityEditModel editModel)
DatePicker based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelDatePicker based on the given propertypublic static javafx.scene.control.DatePicker createDatePicker(Property property, FXEntityEditModel editModel, StateObserver enabledState)
DatePicker based on the given property and linked to the given edit modelproperty - the propertyeditModel - the edit modelenabledState - the State instance controlling the enabled state of the date pickerDatePicker based on the given propertypublic static StringValue<java.time.LocalDate> createDateValue(Property property, javafx.scene.control.DatePicker picker)
StringValue for LocalDate values, based on the given property and linked to the given text fieldproperty - the propertypicker - the date pickerStringValue for LocalDate values, based on the given propertypublic static StringValue<java.time.LocalDateTime> createTimestampValue(Property property, javafx.scene.control.TextField textField)
StringValue for LocalDateTime values, based on the given property and linked to the given text fieldproperty - the propertytextField - the text fieldStringValue for LocalDateTime values, based on the given propertypublic static StringValue<java.time.LocalTime> createTimeValue(Property property, javafx.scene.control.TextField textField)
StringValue for LocalTime values, based on the given property and linked to the given text fieldproperty - the propertytextField - the text fieldStringValue for LocalTime values, based on the given propertypublic static void link(javafx.beans.property.BooleanProperty property,
StateObserver stateObserver)
property - the boolean propertystateObserver - the state observerpublic static EntityLookupField createLookupField(ForeignKeyProperty foreignKeyProperty, FXEntityEditModel editModel)
EntityLookupField based on the given property and linked to the given edit modelforeignKeyProperty - the foreign key propertyeditModel - the edit modelEntityLookupField based on the given propertypublic static javafx.scene.control.ComboBox<Entity> createForeignKeyComboBox(ForeignKeyProperty foreignKeyProperty, FXEntityEditModel editModel)
ComboBox based on the given property and linked to the given edit modelforeignKeyProperty - the foreign key propertyeditModel - the edit modelComboBox based on the given propertypublic static javafx.scene.control.ComboBox<Item> createValueListComboBox(ValueListProperty valueListProperty, FXEntityEditModel editModel)
ComboBox based on the values of the given property and linked to the given edit modelvalueListProperty - the propertyeditModel - the edit modelComboBox based on the values of the given propertypublic static javafx.scene.control.CheckBox createCheckBox()
CheckBox instancepublic static javafx.scene.control.CheckBox createCheckBox(StateObserver enabledState)
CheckBox instanceenabledState - the State instance controlling the enabled state of the check boxpublic static javafx.collections.ObservableList<Item> createValueListComboBoxModel(ValueListProperty property)
ObservableList containing the Items associated with the given value list propertyproperty - the propertyObservableList containing the Items associated with the given value list propertypublic static javafx.scene.control.TextField createTextField(Property property)
TextField based on the given propertyproperty - the propertyTextField based on the given propertypublic static javafx.scene.control.TextField createTextField(Property property, StateObserver enabledState)
TextField based on the given propertyproperty - the propertyenabledState - the State instance controlling the enabled state of the text fieldTextField based on the given propertypublic static javafx.scene.control.DatePicker createDatePicker()
DatePicker instancepublic static javafx.scene.control.DatePicker createDatePicker(StateObserver enabledState)
enabledState - the State instance controlling the enabled state of the date pickerDatePicker instancepublic static User showLoginDialog(java.lang.String applicationTitle, User defaultUser, javafx.scene.image.ImageView icon)
applicationTitle - the title to displaydefaultUser - the default user to display in the dialogicon - the icon, if anyUser instance based on the values found in the dialogCancelException - in case the user cancels the operationpublic static void showExceptionDialog(java.lang.Throwable exception)
exception - the exception to displaypublic static <T> T getParentOfType(javafx.scene.Node node,
java.lang.Class<T> clazz)
node of the given typeT - the type of the parentnode - the child nodeclazz - the type to find