public class DateTimeDescriptor extends SettingDescriptor
Constructor and Description |
---|
DateTimeDescriptor(java.lang.String name,
java.lang.String label,
long defaultValue)
Constructor.
|
DateTimeDescriptor(java.lang.String name,
java.lang.String label,
long defaultValue,
boolean dateOnly)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JComponent |
createInput(Settings settings,
boolean readOnly)
Creates the component that will accept the user input.
|
java.lang.Long |
getDefaultValue()
Gets the default value as a Long (epoch time).
|
boolean |
isDateOnly()
Returns true if only date values are accepted (not time).
|
void |
setDateOnly(boolean b)
Sets the input to only accept date values (not time).
|
getGridWidth, getLabel, getName, isAllowUserDefaults, isDisplaySetting, isEnabled, isShowLabel, isSupportsDisable, setAllowUserDefaults, setDefaultValue, setEnabled, setGridWidth, setShowLabel, setSupportsDisable
public DateTimeDescriptor(java.lang.String name, java.lang.String label, long defaultValue)
name
- name of this setting (key)label
- label displayed to the userdefaultValue
- (epoch time, number of milliseconds since 1970)public DateTimeDescriptor(java.lang.String name, java.lang.String label, long defaultValue, boolean dateOnly)
name
- name of this setting (key)label
- label displayed to the userdefaultValue
- (epoch time, number of milliseconds since 1970)dateOnly
- true if only date values (not time) are acceptedpublic java.lang.Long getDefaultValue()
getDefaultValue
in class SettingDescriptor
public void setDateOnly(boolean b)
b
- true if date only input is allowedpublic boolean isDateOnly()
public javax.swing.JComponent createInput(Settings settings, boolean readOnly)
SettingDescriptor
createInput
in class SettingDescriptor
settings
- settings for the studyreadOnly
- true if the component should not accept user input