public final class UiValues
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Value<java.math.BigDecimal> |
bigDecimalValue(DecimalField decimalField) |
static Value<java.math.BigDecimal> |
bigDecimalValue(DecimalField decimalField,
boolean updateOnKeystroke) |
static Value<java.lang.Boolean> |
booleanValue(javax.swing.ButtonModel buttonModel) |
static Value<java.lang.Double> |
doubleValue(DecimalField decimalField,
boolean nullable) |
static Value<java.lang.Double> |
doubleValue(DecimalField decimalField,
boolean nullable,
boolean updateOnKeystroke) |
static Value<java.lang.Double> |
doubleValue(javax.swing.SpinnerNumberModel spinnerModel) |
static Value<java.lang.Integer> |
integerValue(javax.swing.BoundedRangeModel boundedRangeModel) |
static Value<java.lang.Integer> |
integerValue(IntegerField integerField,
boolean nullable) |
static Value<java.lang.Integer> |
integerValue(IntegerField integerField,
boolean nullable,
boolean updateOnKeystroke) |
static Value<java.lang.Integer> |
integerValue(javax.swing.SpinnerNumberModel spinnerModel) |
static Value<java.time.LocalDateTime> |
localDateTimeValue(javax.swing.JFormattedTextField textComponent,
java.lang.String dateFormat) |
static Value<java.time.LocalDateTime> |
localDateTimeValue(javax.swing.JFormattedTextField textComponent,
java.lang.String dateFormat,
boolean updateOnKeystroke) |
static Value<java.time.LocalDate> |
localDateValue(javax.swing.JFormattedTextField textComponent,
java.lang.String dateFormat) |
static Value<java.time.LocalDate> |
localDateValue(javax.swing.JFormattedTextField textComponent,
java.lang.String dateFormat,
boolean updateOnKeystroke) |
static Value<java.time.LocalTime> |
localTimeValue(javax.swing.JFormattedTextField textComponent,
java.lang.String dateFormat) |
static Value<java.time.LocalTime> |
localTimeValue(javax.swing.JFormattedTextField textComponent,
java.lang.String dateFormat,
boolean updateOnKeystroke) |
static Value<java.lang.Long> |
longValue(LongField longField,
boolean nullable) |
static Value<java.lang.Long> |
longValue(LongField longField,
boolean nullable,
boolean updateOnKeystroke) |
static <V> Value<V> |
selectedItemValue(javax.swing.JComboBox<V> comboBox) |
static Value<java.lang.String> |
textValue(javax.swing.text.JTextComponent textComponent) |
static Value<java.lang.String> |
textValue(javax.swing.text.JTextComponent textComponent,
java.text.Format format) |
static Value<java.lang.String> |
textValue(javax.swing.text.JTextComponent textComponent,
java.text.Format format,
boolean updateOnKeystroke) |
public static Value<java.time.LocalDate> localDateValue(javax.swing.JFormattedTextField textComponent, java.lang.String dateFormat)
textComponent
- the componentdateFormat
- the date formatpublic static Value<java.time.LocalDate> localDateValue(javax.swing.JFormattedTextField textComponent, java.lang.String dateFormat, boolean updateOnKeystroke)
textComponent
- the componentdateFormat
- the date formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.time.LocalTime> localTimeValue(javax.swing.JFormattedTextField textComponent, java.lang.String dateFormat)
textComponent
- the componentdateFormat
- the date formatpublic static Value<java.time.LocalTime> localTimeValue(javax.swing.JFormattedTextField textComponent, java.lang.String dateFormat, boolean updateOnKeystroke)
textComponent
- the componentdateFormat
- the date formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.time.LocalDateTime> localDateTimeValue(javax.swing.JFormattedTextField textComponent, java.lang.String dateFormat)
textComponent
- the componentdateFormat
- the date formatpublic static Value<java.time.LocalDateTime> localDateTimeValue(javax.swing.JFormattedTextField textComponent, java.lang.String dateFormat, boolean updateOnKeystroke)
textComponent
- the componentdateFormat
- the date formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.lang.Integer> integerValue(IntegerField integerField, boolean nullable)
integerField
- the componentnullable
- if false then the resulting Value returns 0 instead of nullpublic static Value<java.lang.Integer> integerValue(IntegerField integerField, boolean nullable, boolean updateOnKeystroke)
integerField
- the componentnullable
- if false then the resulting Value returns 0 instead of nullupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.lang.Integer> integerValue(javax.swing.SpinnerNumberModel spinnerModel)
spinnerModel
- the spinner modelpublic static Value<java.lang.Integer> integerValue(javax.swing.BoundedRangeModel boundedRangeModel)
boundedRangeModel
- the bounded range modelpublic static Value<java.lang.Double> doubleValue(javax.swing.SpinnerNumberModel spinnerModel)
spinnerModel
- the spinner modelpublic static Value<java.lang.Double> doubleValue(DecimalField decimalField, boolean nullable)
decimalField
- the componentnullable
- if false then the resulting Value returns 0 instead of nullpublic static Value<java.lang.Double> doubleValue(DecimalField decimalField, boolean nullable, boolean updateOnKeystroke)
decimalField
- the componentnullable
- if false then the resulting Value returns 0 instead of nullupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.math.BigDecimal> bigDecimalValue(DecimalField decimalField)
decimalField
- the componentpublic static Value<java.math.BigDecimal> bigDecimalValue(DecimalField decimalField, boolean updateOnKeystroke)
decimalField
- the componentupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.lang.Long> longValue(LongField longField, boolean nullable)
longField
- the componentnullable
- if false then the resulting Value returns 0 instead of nullpublic static Value<java.lang.Long> longValue(LongField longField, boolean nullable, boolean updateOnKeystroke)
longField
- the componentnullable
- if false then the resulting Value returns 0 instead of nullupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.lang.String> textValue(javax.swing.text.JTextComponent textComponent)
textComponent
- the componentpublic static Value<java.lang.String> textValue(javax.swing.text.JTextComponent textComponent, java.text.Format format)
textComponent
- the componentformat
- the formatpublic static Value<java.lang.String> textValue(javax.swing.text.JTextComponent textComponent, java.text.Format format, boolean updateOnKeystroke)
textComponent
- the componentformat
- the formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static Value<java.lang.Boolean> booleanValue(javax.swing.ButtonModel buttonModel)
buttonModel
- the button modelpublic static <V> Value<V> selectedItemValue(javax.swing.JComboBox<V> comboBox)
V
- the value typecomboBox
- the combo box