Class FontDescriptor

java.lang.Object
com.motivewave.platform.sdk.common.desc.SettingDescriptor<FontInfo>
com.motivewave.platform.sdk.common.desc.FontDescriptor

public class FontDescriptor extends SettingDescriptor<FontInfo>
Describes a Font and its Color.
  • Constructor Details

    • FontDescriptor

      public FontDescriptor(String id, String label, Font font)
      Constructor
      Parameters:
      id - name of this setting
      label - label displayed to the user
      font - default font value
    • FontDescriptor

      public FontDescriptor(String id, String label, Font font, Color color, boolean supportsColor)
      Constructor
      Parameters:
      id - - Name of this setting
      label - - Label displayed to the user
      font - - default font value
      color - - default color value
      supportsColor - 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 setting
      label - - Label displayed to the user
      font - - default font value
      color - - default color value
      supportsColor - true if color is supported
      enabled - true if this font is enabled
      supportsDisable - 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 setting
      label - - Label displayed to the user
      font - - default font value
      color - - default color value
      supportsColor - true if color is supported
      bgColor - - default background color value
      supportsBgColor - true if background color is supported
      enabled - true if this font is enabled
      supportsDisable - true if this font can be disabled
  • Method Details

    • getDefaultValue

      public FontInfo getDefaultValue()
      Gets the default value for this setting.
      Overrides:
      getDefaultValue in class SettingDescriptor<FontInfo>
      Returns:
      default value for the setting
    • createInputFX

      public javafx.scene.Node createInputFX(Settings settings, boolean readOnly)
      Creates an editor for this input and returns it as a JavaFX Node.
      Specified by:
      createInputFX in class SettingDescriptor<FontInfo>
      Parameters:
      settings - settings for the study
      readOnly - 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 class SettingDescriptor<FontInfo>
      Returns:
      true if this setting is for display purposes only
    • getColor

      public Color getColor()
      Gets the color of the font.
      Returns:
      font color
    • getBgColor

      public Color getBgColor()
      Gets the background color of the font.
      Returns:
      background color
    • getFont

      public Font 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

      public Object fromJson(Object json)
      Overrides:
      fromJson in class SettingDescriptor<FontInfo>