org.jminor.common.ui.control
Class TimestampBeanValueLink
java.lang.Object
javax.swing.AbstractAction
org.jminor.common.ui.control.Control
org.jminor.common.ui.control.AbstractValueLink<Object,Object>
org.jminor.common.ui.control.AbstractBeanValueLink
org.jminor.common.ui.control.TextBeanValueLink
org.jminor.common.ui.control.FormattedTextBeanValueLink
org.jminor.common.ui.control.TimestampBeanValueLink
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action, DocumentListener
public final class TimestampBeanValueLink
- extends FormattedTextBeanValueLink
Binds a JFormattedField to a timestamp based bean property.
- See Also:
- Serialized Form
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Method Summary |
protected Object |
translate(Object parsedValue)
Translate the given Date value to a Timestamp value. |
Methods inherited from class org.jminor.common.ui.control.Control |
getDescription, getEnabledState, getIcon, getMnemonic, getName, isEnabled, setDescription, setEnabled, setIcon, setKeyStroke, setMnemonic, setName |
TimestampBeanValueLink
public TimestampBeanValueLink(JFormattedTextField textComponent,
Object owner,
String propertyName,
EventObserver valueChangeEvent,
LinkType linkType,
DateFormat format)
- Instantiates a new TimesatmpBeanValueLink.
- Parameters:
textComponent
- the text component to link with the valueowner
- the value ownerpropertyName
- the property namevalueChangeEvent
- an EventObserver notified each time the value changeslinkType
- the link typeformat
- the date format
translate
protected Object translate(Object parsedValue)
- Translate the given Date value to a Timestamp value.
- Overrides:
translate
in class FormattedTextBeanValueLink
- Parameters:
parsedValue
- the Date parsed from the text component
- Returns:
- a Timestamp based on the Date received