Class FileDescriptor
java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<File>
com.motivewave.platform.sdk.common.desc.FileDescriptor
Describes a File Input.
-
Constructor Summary
ConstructorDescriptionFileDescriptor
(String name, String label, File file) ConstructorFileDescriptor
(String name, String label, File file, boolean enabled, boolean supportsDisable) Constructor -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.Node
createInputFX
(Settings settings, boolean readOnly) Creates an editor for this input and returns it as a JavaFX Node.Gets the default value for this setting.Gets the list of file extensions to filter in the file chooser dialog.getFile()
Gets the File.Gets the name of the filter to display when showing the file chooser dialog.boolean
Determines if this setting is used for display purposes only.void
setExtensions
(List<String> extensions) Sets the list of file extensions to filter in the file chooser dialog.void
setFilterName
(String filterName) Sets the name of the filter to display when showing the file chooser dialog.Methods inherited from class com.motivewave.platform.sdk.common.desc.SettingDescriptor
createInput, createTBInput, getDescription, getGridWidth, getHelpLink, getIconFactory, getId, getLabel, getName, isAllowUserDefaults, isEnabled, isShowLabel, isSupportsDisable, setAllowUserDefaults, setDefaultValue, setDescription, setEnabled, setGridWidth, setHelpLink, setIconFactory, setShowLabel, setSupportsDisable
-
Constructor Details
-
FileDescriptor
Constructor- Parameters:
name
- name of this settinglabel
- label displayed to the userfile
- default file value
-
FileDescriptor
public FileDescriptor(String name, String label, File file, boolean enabled, boolean supportsDisable) Constructor- Parameters:
name
- - Name of this settinglabel
- - Label displayed to the userfile
- - default file valueenabled
- true if this file input is enabledsupportsDisable
- true if this file input can be disabled
-
-
Method Details
-
getDefaultValue
Gets the default value for this setting.- Overrides:
getDefaultValue
in classSettingDescriptor<File>
- Returns:
- default value for the setting
-
createInputFX
Creates an editor for this input and returns it as a JavaFX Node.- Specified by:
createInputFX
in classSettingDescriptor<File>
- Parameters:
settings
- settings for the studyreadOnly
- true if the component should not accept user input- Returns:
- component that will accept user input.
-
isDisplaySetting
public boolean isDisplaySetting()Determines if this setting is used for display purposes only.- Overrides:
isDisplaySetting
in classSettingDescriptor<File>
- Returns:
- true if this setting is for display purposes only
-
getFile
Gets the File.- Returns:
- File
-
setExtensions
Sets the list of file extensions to filter in the file chooser dialog. For example: *.txt, *.TXT- Parameters:
extensions
- list of file extensions in the form '*.ext'
-
getExtensions
Gets the list of file extensions to filter in the file chooser dialog. For example: *.txt, *.TXT- Returns:
- file extensions used to filter in the file chooser dialog in the form '*.ext'.
-
getFilterName
Gets the name of the filter to display when showing the file chooser dialog.- Returns:
- filter name
-
setFilterName
Sets the name of the filter to display when showing the file chooser dialog.- Parameters:
filterName
- filter name
-
fromJson
- Overrides:
fromJson
in classSettingDescriptor<File>
-