Class BasicTitleSettingSpecifier

All Implemented Interfaces:
KeyedSettingSpecifier<String>, MappableSpecifier, MarkupSetting, SettingSpecifier, TitleSettingSpecifier
Direct Known Subclasses:
BasicTextFieldSettingSpecifier

public class BasicTitleSettingSpecifier extends BaseKeyedSettingSpecifier<String> implements TitleSettingSpecifier
Basic implemtation of TitleSettingSpecifier.
Version:
1.2
Author:
matt
  • Constructor Details

    • BasicTitleSettingSpecifier

      public BasicTitleSettingSpecifier(String key, String defaultValue)
      Constructor.
      Parameters:
      key - the key
      defaultValue - the default value
    • BasicTitleSettingSpecifier

      public BasicTitleSettingSpecifier(String key, String defaultValue, boolean trans)
      Constructor.
      Parameters:
      key - the key
      defaultValue - the default value
      trans - the transient flag value
    • BasicTitleSettingSpecifier

      public BasicTitleSettingSpecifier(String key, String defaultValue, boolean trans, boolean markup)
      Constructor.
      Parameters:
      key - the key
      defaultValue - the default value
      trans - the transient flag value
      markup - the markup flag value
      Since:
      1.2
  • Method Details

    • getValueTitles

      public Map<String,String> getValueTitles()
      Description copied from interface: TitleSettingSpecifier
      An optional mapping of possible values for this setting to associated titles.

      This can be used to display user-friendly titles for setting values if the setting value itself is cryptic.

      Specified by:
      getValueTitles in interface TitleSettingSpecifier
      Returns:
      the setting value titles
    • isMarkup

      public boolean isMarkup()
      Description copied from interface: MarkupSetting
      Flag indicating the setting value contains markup such as HTML, Markdown, and so on.
      Specified by:
      isMarkup in interface MarkupSetting
      Returns:
      true if the setting value contains markup, false for plain text
    • mappedWithPlaceholer

      public SettingSpecifier mappedWithPlaceholer(String template)
      Description copied from interface: MappableSpecifier
      Return a setting specifier mapped to a new path, using a format template.
      Specified by:
      mappedWithPlaceholer in interface MappableSpecifier
      Parameters:
      template - the format template
      Returns:
      the new instance
    • mappedWithMapper

      public SettingSpecifier mappedWithMapper(MappableSpecifier.Mapper mapper)
      Description copied from interface: MappableSpecifier
      Return a setting specifier mapped to a new path, using a MappableSpecifier.Mapper.
      Specified by:
      mappedWithMapper in interface MappableSpecifier
      Parameters:
      mapper - the mapper
      Returns:
      the new instance
    • setValueTitles

      public void setValueTitles(Map<String,String> valueTitles)
    • setMarkup

      public void setMarkup(boolean markup)
      Set the markup flag.
      Parameters:
      markup - true if the setting value contains markup, false for plain text
      Since:
      1.2