public static class Options.DateOption extends Options.Option<Date,JComponent>
Options.addDateOption(String, String, java.util.Date)XMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportTypeROOT_ELEMENT_NAME| Modifier and Type | Method and Description |
|---|---|
protected JComponent |
createComponent()
Create a graphical component representing this option.
|
protected Date |
generateValidValue(Date candidateValue)
Converts a potentially invalid value into a valid one.
|
Date |
getValueFromString(String value)
Convert a String into an instance of the object type used by this option.
|
protected void |
setValueOnComponent(JComponent component,
Date value)
Set the value on this component.
|
addChangeListener, addChildOptionsDependent, addDependent, fromXML, getComponent, getDefaultValue, getDescription, getDescriptionAndState, getDisplayedLabel, getExtraPersistentInformation, getLabel, getName, getParentOptions, getPossibleValues, getValue, getValueAsString, getValueAsString, getVerticalWeight, handleSetEnabled, hideWarningMessage, isAdvanced, isEnabled, isFillHorizontalSpace, isProOnly, isRestoreDefaultApplies, isRestorePreferenceApplies, isSpanningComponent, isVisible, moveToOptions, removeChangeListener, restoreDefault, setAdvanced, setAlwaysUsesDefaultPreferenceLocation, setDefaultValue, setDescription, setDisabledValue, setEnabled, setExtraPersistentInformation, setFillHorizontalSpace, setHidden, setLabelComponent, setPreferredHeight, setPreferredWidth, setProOnly, setRestoreDefaultApplies, setRestorePreferenceApplies, setShouldSaveValue, setSpanningComponent, setValue, setValue, setValueFromString, setVerticalWeight, setVisible, setWarningMessage, shouldSaveValue, toString, toXMLpublic Date getValueFromString(String value)
Options.OptionOptions.Option.getValueAsString(Object) .getValueFromString in class Options.Option<Date,JComponent>value - the string representation of the object valueprotected void setValueOnComponent(JComponent component, Date value)
Options.OptionsetValueOnComponent in class Options.Option<Date,JComponent>component - a component return from Options.Option.createComponent()value - the value to set.protected JComponent createComponent()
Options.OptionOptions.Option.getValue().
The implementation is also responsible for making sure that the returned component
listens to any changes made to itself and
reflects those changes in the value of this option
using the Options.Option.setValue(Object) method.
This method will only be called once for each instance of an Option.
After it has been called, getComponent() will return a cached copy of it.createComponent in class Options.Option<Date,JComponent>protected Date generateValidValue(Date candidateValue)
Options.OptioncandidateValue, implying that all
values are valid. Subclasses can override this method e.g. to
clamp integer values to a certain interval, or to ensure that a
disabled radio item cannot be selected. If a new value is
determined to be invalid, a subclass may choose to return the
current value (Options.Option.getValue() or any arbitrary other value.
IMPORTANT: subclasses which implement this method should call Options.Option.setDefaultValue(Object) at the end of their constructor(s)generateValidValue in class Options.Option<Date,JComponent>candidateValue - the value to determine the validity of