Class FontDescriptor
java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<FontInfo>
com.motivewave.platform.sdk.common.desc.FontDescriptor
Describes a Font and its Color.
-
Constructor Summary
ConstructorDescriptionFontDescriptor
(String id, String label, Font font) ConstructorFontDescriptor
(String id, String label, Font font, Color color, boolean supportsColor) ConstructorFontDescriptor
(String id, String label, Font font, Color color, boolean supportsColor, boolean enabled, boolean supportsDisable) ConstructorFontDescriptor
(String id, String label, Font font, Color color, boolean supportsColor, Color bgColor, boolean supportsBgColor, 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 background color of the font.getColor()
Gets the color of the font.Gets the default value for this setting.getFont()
Gets the font.boolean
Determines if this setting is used for display purposes only.boolean
Indicates if background color is supported for the font.boolean
Indicates if color is supported for the font.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
-
FontDescriptor
Constructor- Parameters:
id
- name of this settinglabel
- label displayed to the userfont
- default font value
-
FontDescriptor
Constructor- Parameters:
id
- - Name of this settinglabel
- - Label displayed to the userfont
- - default font valuecolor
- - default color valuesupportsColor
- true if color is supported
-
FontDescriptor
public FontDescriptor(String id, String label, Font font, Color color, boolean supportsColor, boolean enabled, boolean supportsDisable) Constructor- Parameters:
id
- - Name of this settinglabel
- - Label displayed to the userfont
- - default font valuecolor
- - default color valuesupportsColor
- true if color is supportedenabled
- true if this font is enabledsupportsDisable
- true if this font can be disabled
-
FontDescriptor
public FontDescriptor(String id, String label, Font font, Color color, boolean supportsColor, Color bgColor, boolean supportsBgColor, boolean enabled, boolean supportsDisable) Constructor- Parameters:
id
- - Name of this settinglabel
- - Label displayed to the userfont
- - default font valuecolor
- - default color valuesupportsColor
- true if color is supportedbgColor
- - default background color valuesupportsBgColor
- true if background color is supportedenabled
- true if this font is enabledsupportsDisable
- true if this font can be disabled
-
-
Method Details
-
getDefaultValue
Gets the default value for this setting.- Overrides:
getDefaultValue
in classSettingDescriptor<FontInfo>
- 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<FontInfo>
- 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<FontInfo>
- Returns:
- true if this setting is for display purposes only
-
getColor
Gets the color of the font.- Returns:
- font color
-
getBgColor
Gets the background color of the font.- Returns:
- background color
-
getFont
Gets the font.- Returns:
- font
-
isSupportsColor
public boolean isSupportsColor()Indicates if color is supported for the font.- Returns:
- true if color is supported for this font.
-
isSupportsBgColor
public boolean isSupportsBgColor()Indicates if background color is supported for the font.- Returns:
- true if background color is supported for this font.
-
fromJson
- Overrides:
fromJson
in classSettingDescriptor<FontInfo>
-