public final class ValueLinks
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
bigDecimalValueLink(DecimalField decimalField,
Value<java.math.BigDecimal> value) |
static void |
bigDecimalValueLink(DecimalField decimalField,
Value<java.math.BigDecimal> value,
boolean updateOnKeystroke) |
static void |
doubleValueLink(DecimalField decimalField,
Value<java.lang.Double> value,
boolean nullable) |
static void |
doubleValueLink(DecimalField decimalField,
Value<java.lang.Double> value,
boolean nullable,
boolean updateOnKeystroke) |
static void |
integerValueLink(IntegerField integerField,
Value<java.lang.Integer> value,
boolean nullable) |
static void |
integerValueLink(IntegerField integerField,
Value<java.lang.Integer> value,
boolean nullable,
boolean updateOnKeystroke) |
static javax.swing.SpinnerNumberModel |
intSpinnerValueLink(java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Integer> valueChangeEvent) |
static javax.swing.SpinnerNumberModel |
intSpinnerValueLink(java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Integer> valueChangeEvent,
boolean readOnly) |
static void |
intSpinnerValueLink(java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Integer> valueChangeEvent,
javax.swing.SpinnerNumberModel spinnerModel,
boolean readOnly) |
static void |
intSpinnerValueLink(javax.swing.SpinnerNumberModel spinnerModel,
Value<java.lang.Integer> integerValue) |
static void |
intSpinnerValueLink(javax.swing.SpinnerNumberModel spinnerModel,
Value<java.lang.Integer> integerValue,
boolean readOnly) |
static javax.swing.SpinnerNumberModel |
intSpinnerValueLink(Value<java.lang.Integer> integerValue) |
static javax.swing.SpinnerNumberModel |
intSpinnerValueLink(Value<java.lang.Integer> integerValue,
boolean readOnly) |
static void |
localDateTimeValueLink(javax.swing.JFormattedTextField textComponent,
Value<java.time.LocalDateTime> value,
java.lang.String dateFormat)
Links a date value with a given text component
|
static void |
localDateTimeValueLink(javax.swing.JFormattedTextField textComponent,
Value<java.time.LocalDateTime> value,
java.lang.String dateFormat,
boolean updateOnKeystroke)
Links a date value with a given text component
|
static void |
localDateValueLink(javax.swing.JFormattedTextField textComponent,
Value<java.time.LocalDate> value,
java.lang.String dateFormat)
Links a date value with a given text component
|
static void |
localDateValueLink(javax.swing.JFormattedTextField textComponent,
Value<java.time.LocalDate> value,
java.lang.String dateFormat,
boolean updateOnKeystroke)
Links a date value with a given text component
|
static void |
localTimeValueLink(javax.swing.JFormattedTextField textComponent,
Value<java.time.LocalTime> value,
java.lang.String dateFormat)
Links a date value with a given text component
|
static void |
localTimeValueLink(javax.swing.JFormattedTextField textComponent,
Value<java.time.LocalTime> value,
java.lang.String dateFormat,
boolean updateOnKeystroke)
Links a date value with a given text component
|
static void |
longValueLink(LongField longField,
Value<java.lang.Long> value,
boolean nullable) |
static void |
longValueLink(LongField longField,
Value<java.lang.Long> value,
boolean nullable,
boolean updateOnKeystroke) |
static <V> void |
selectedItemValueLink(javax.swing.JComboBox<V> comboBox,
java.lang.Object owner,
java.lang.String propertyName,
java.lang.Class<V> valueClass,
EventObserver<V> valueChangeEvent) |
static <V> void |
selectedItemValueLink(javax.swing.JComboBox<V> comboBox,
java.lang.Object owner,
java.lang.String propertyName,
java.lang.Class<V> valueClass,
EventObserver<V> valueChangeEvent,
boolean readOnly) |
static <V> void |
selectedItemValueLink(javax.swing.JComboBox<V> comboBox,
Value<V> value) |
static <V> void |
selectedItemValueLink(javax.swing.JComboBox<V> comboBox,
Value<V> value,
boolean readOnly) |
static void |
textValueLink(javax.swing.text.JTextComponent textComponent,
Value<java.lang.String> value) |
static void |
textValueLink(javax.swing.text.JTextComponent textComponent,
Value<java.lang.String> value,
java.text.Format format,
boolean updateOnKeystroke) |
static void |
toggleValueLink(javax.swing.ButtonModel buttonModel,
java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Boolean> valueChangeEvent) |
static void |
toggleValueLink(javax.swing.ButtonModel buttonModel,
java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Boolean> valueChangeEvent,
boolean readOnly) |
static void |
toggleValueLink(javax.swing.ButtonModel buttonModel,
Value<java.lang.Boolean> value,
boolean readOnly) |
static javax.swing.ButtonModel |
toggleValueLink(java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Boolean> valueChangeEvent) |
static javax.swing.ButtonModel |
toggleValueLink(java.lang.Object owner,
java.lang.String propertyName,
EventObserver<java.lang.Boolean> valueChangeEvent,
boolean readOnly) |
public static void localDateValueLink(javax.swing.JFormattedTextField textComponent, Value<java.time.LocalDate> value, java.lang.String dateFormat)
textComponent
- the text component to link with the valuevalue
- the model valuedateFormat
- the data formatpublic static void localDateValueLink(javax.swing.JFormattedTextField textComponent, Value<java.time.LocalDate> value, java.lang.String dateFormat, boolean updateOnKeystroke)
textComponent
- the text component to link with the valuevalue
- the model valuedateFormat
- the data formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void localTimeValueLink(javax.swing.JFormattedTextField textComponent, Value<java.time.LocalTime> value, java.lang.String dateFormat)
textComponent
- the text component to link with the valuevalue
- the model valuedateFormat
- the data formatpublic static void localTimeValueLink(javax.swing.JFormattedTextField textComponent, Value<java.time.LocalTime> value, java.lang.String dateFormat, boolean updateOnKeystroke)
textComponent
- the text component to link with the valuevalue
- the model valuedateFormat
- the data formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void localDateTimeValueLink(javax.swing.JFormattedTextField textComponent, Value<java.time.LocalDateTime> value, java.lang.String dateFormat)
textComponent
- the text component to link with the valuevalue
- the model valuedateFormat
- the data formatpublic static void localDateTimeValueLink(javax.swing.JFormattedTextField textComponent, Value<java.time.LocalDateTime> value, java.lang.String dateFormat, boolean updateOnKeystroke)
textComponent
- the text component to link with the valuevalue
- the model valuedateFormat
- the data formatupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void integerValueLink(IntegerField integerField, Value<java.lang.Integer> value, boolean nullable)
integerField
- the int field to link with the valuevalue
- the model valuenullable
- if false then 0 is used instead of nullpublic static void integerValueLink(IntegerField integerField, Value<java.lang.Integer> value, boolean nullable, boolean updateOnKeystroke)
integerField
- the int field to link with the valuevalue
- the model valuenullable
- if false then 0 is used instead of nullupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void doubleValueLink(DecimalField decimalField, Value<java.lang.Double> value, boolean nullable)
decimalField
- the decimal field to link with the valuevalue
- the model valuenullable
- if false then 0 is used instead of nullpublic static void doubleValueLink(DecimalField decimalField, Value<java.lang.Double> value, boolean nullable, boolean updateOnKeystroke)
decimalField
- the decimal field to link with the valuevalue
- the model valuenullable
- if false then 0 is used instead of nullupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void bigDecimalValueLink(DecimalField decimalField, Value<java.math.BigDecimal> value)
decimalField
- the decimal field to link with the valuevalue
- the model valuepublic static void bigDecimalValueLink(DecimalField decimalField, Value<java.math.BigDecimal> value, boolean updateOnKeystroke)
decimalField
- the decimal field to link with the valuevalue
- the model valueupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void longValueLink(LongField longField, Value<java.lang.Long> value, boolean nullable)
longField
- the long field to link with the valuevalue
- the model valuenullable
- if false then 0 is used instead of nullpublic static void longValueLink(LongField longField, Value<java.lang.Long> value, boolean nullable, boolean updateOnKeystroke)
longField
- the long field to link with the valuevalue
- the model valuenullable
- if false then 0 is used instead of nullupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static void textValueLink(javax.swing.text.JTextComponent textComponent, Value<java.lang.String> value)
textComponent
- the text component to link with the valuevalue
- the value to link with the componentpublic static void textValueLink(javax.swing.text.JTextComponent textComponent, Value<java.lang.String> value, java.text.Format format, boolean updateOnKeystroke)
textComponent
- the text component to link with the valuevalue
- the value to link with the componentformat
- the format to use when displaying the linked value, null if no formatting should be performedupdateOnKeystroke
- if true then the value is updated on each keystroke, otherwise on focus lostpublic static javax.swing.ButtonModel toggleValueLink(java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Boolean> valueChangeEvent)
owner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changespublic static javax.swing.ButtonModel toggleValueLink(java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Boolean> valueChangeEvent, boolean readOnly)
owner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changesreadOnly
- if true the component will be read onlypublic static void toggleValueLink(javax.swing.ButtonModel buttonModel, java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Boolean> valueChangeEvent)
buttonModel
- the button model to link with the valueowner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changespublic static void toggleValueLink(javax.swing.ButtonModel buttonModel, java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Boolean> valueChangeEvent, boolean readOnly)
buttonModel
- the button model to link with the valueowner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changesreadOnly
- if true the component will be read onlypublic static void toggleValueLink(javax.swing.ButtonModel buttonModel, Value<java.lang.Boolean> value, boolean readOnly)
buttonModel
- the button model to link with the valuevalue
- the model valuereadOnly
- if true the component will be read onlypublic static <V> void selectedItemValueLink(javax.swing.JComboBox<V> comboBox, java.lang.Object owner, java.lang.String propertyName, java.lang.Class<V> valueClass, EventObserver<V> valueChangeEvent)
V
- the value typecomboBox
- the combo box to link with the valueowner
- the value ownerpropertyName
- the property namevalueClass
- the value classvalueChangeEvent
- an EventObserver notified each time the value changespublic static <V> void selectedItemValueLink(javax.swing.JComboBox<V> comboBox, java.lang.Object owner, java.lang.String propertyName, java.lang.Class<V> valueClass, EventObserver<V> valueChangeEvent, boolean readOnly)
V
- the value typecomboBox
- the combo box to link with the valueowner
- the value ownerpropertyName
- the property namevalueClass
- the value classvalueChangeEvent
- an EventObserver notified each time the value changesreadOnly
- if true the component will be read onlypublic static <V> void selectedItemValueLink(javax.swing.JComboBox<V> comboBox, Value<V> value)
V
- the value typecomboBox
- the combo box to link with the valuevalue
- the model valuepublic static <V> void selectedItemValueLink(javax.swing.JComboBox<V> comboBox, Value<V> value, boolean readOnly)
V
- the value typecomboBox
- the combo box to link with the valuevalue
- the model valuereadOnly
- if true the component will be read onlypublic static javax.swing.SpinnerNumberModel intSpinnerValueLink(java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Integer> valueChangeEvent)
owner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changespublic static javax.swing.SpinnerNumberModel intSpinnerValueLink(java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Integer> valueChangeEvent, boolean readOnly)
owner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changesreadOnly
- if true the value link will be read onlypublic static javax.swing.SpinnerNumberModel intSpinnerValueLink(Value<java.lang.Integer> integerValue)
integerValue
- the valuepublic static javax.swing.SpinnerNumberModel intSpinnerValueLink(Value<java.lang.Integer> integerValue, boolean readOnly)
integerValue
- the valuereadOnly
- if true the value link will be read onlypublic static void intSpinnerValueLink(java.lang.Object owner, java.lang.String propertyName, EventObserver<java.lang.Integer> valueChangeEvent, javax.swing.SpinnerNumberModel spinnerModel, boolean readOnly)
owner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changesspinnerModel
- the spinner model to usereadOnly
- if true the value link will be read onlypublic static void intSpinnerValueLink(javax.swing.SpinnerNumberModel spinnerModel, Value<java.lang.Integer> integerValue)
spinnerModel
- the spinner modelintegerValue
- the valuepublic static void intSpinnerValueLink(javax.swing.SpinnerNumberModel spinnerModel, Value<java.lang.Integer> integerValue, boolean readOnly)
spinnerModel
- the spinner modelintegerValue
- the valuereadOnly
- if true the value link will be read only