Class DateTimeDescriptor
java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<Long>
com.motivewave.platform.sdk.common.desc.DateTimeDescriptor
Describes an input for selecting a date/time. Dates are represented using long values
(number of milliseconds since 1970, AKA epoch time)
-
Constructor Summary
ConstructorDescriptionDateTimeDescriptor
(String name, String label, long defaultValue) Constructor.DateTimeDescriptor
(String name, String label, long defaultValue, boolean dateOnly) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.Node
createInputFX
(Settings settings, boolean readOnly) Creates the component that will accept the user input.Gets the default value for this setting.boolean
Returns true if only date values are accepted (not time).void
setDateOnly
(boolean b) Sets the input to only accept date values (not time).Methods inherited from class com.motivewave.platform.sdk.common.desc.SettingDescriptor
createInput, createTBInput, getDescription, getGridWidth, getHelpLink, getIconFactory, getId, getLabel, getName, isAllowUserDefaults, isDisplaySetting, isEnabled, isShowLabel, isSupportsDisable, setAllowUserDefaults, setDefaultValue, setDescription, setEnabled, setGridWidth, setHelpLink, setIconFactory, setShowLabel, setSupportsDisable
-
Constructor Details
-
DateTimeDescriptor
Constructor.- Parameters:
name
- name of this setting (key)label
- label displayed to the userdefaultValue
- (epoch time, number of milliseconds since 1970)
-
DateTimeDescriptor
Constructor.- Parameters:
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 accepted
-
-
Method Details
-
getDefaultValue
Gets the default value for this setting.- Overrides:
getDefaultValue
in classSettingDescriptor<Long>
- Returns:
- default value for the setting
-
setDateOnly
public void setDateOnly(boolean b) Sets the input to only accept date values (not time).- Parameters:
b
- true if date only input is allowed
-
isDateOnly
public boolean isDateOnly()Returns true if only date values are accepted (not time).- Returns:
- true if only date values are accepted
-
createInputFX
Description copied from class:SettingDescriptor
Creates the component that will accept the user input. This is called by the study framework.- Specified by:
createInputFX
in classSettingDescriptor<Long>
- Parameters:
settings
- settings for the studyreadOnly
- true if the component should not accept user input- Returns:
- component that will accept user input.
-
fromJson
- Overrides:
fromJson
in classSettingDescriptor<Long>
-