Package jmri

Class SelectionPropertyDescriptor

java.lang.Object
jmri.NamedBeanPropertyDescriptor<String>
jmri.SelectionPropertyDescriptor

Implementation of NamedBeanPropertyDescriptor for multiple choice properties.
Since:
4.21.3
  • Constructor Details

    • SelectionPropertyDescriptor

      public SelectionPropertyDescriptor(@Nonnull String key, @Nonnull String[] options, @Nonnull String[] optionTips, @Nonnull String defVal)
      Create a new SelectionPropertyDescriber.
      Parameters:
      key - Property Key - used to identify the property in Bean.getProperty(String).
      options - Options for the property in String array.
      optionTips - Tool-tips for options of the property in String array.
      defVal - Default property value.
  • Method Details

    • getOptions

      public String[] getOptions()
      Get the property options. Should be same length as getOptionToolTips()
      Returns:
      copy of the property options.
    • getOptionToolTips

      Get Tool-tips for the options. Should be same length as getOptions()
      Returns:
      list of tool-tips.