Package jmri
Class SelectionPropertyDescriptor
- java.lang.Object
-
- jmri.NamedBeanPropertyDescriptor<java.lang.String>
-
- jmri.SelectionPropertyDescriptor
-
public abstract class SelectionPropertyDescriptor extends NamedBeanPropertyDescriptor<java.lang.String>
Implementation of NamedBeanPropertyDescriptor for multiple choice properties.- Since:
- 4.21.3
-
-
Field Summary
-
Fields inherited from class jmri.NamedBeanPropertyDescriptor
defaultValue, propertyKey
-
-
Constructor Summary
Constructors Constructor Description SelectionPropertyDescriptor(java.lang.String key, java.lang.String[] options, java.lang.String[] optionTips, java.lang.String defVal)
Create a new SelectionPropertyDescriber.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getOptions()
Get the property options.java.util.List<java.lang.String>
getOptionToolTips()
Get Tool-tips for the options.-
Methods inherited from class jmri.NamedBeanPropertyDescriptor
equals, getColumnHeaderText, getValueClass, hashCode, isEditable
-
-
-
-
Constructor Detail
-
SelectionPropertyDescriptor
public SelectionPropertyDescriptor(@Nonnull java.lang.String key, @Nonnull java.lang.String[] options, @Nonnull java.lang.String[] optionTips, @Nonnull java.lang.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 Detail
-
getOptions
public java.lang.String[] getOptions()
Get the property options. Should be same length as getOptionToolTips()- Returns:
- copy of the property options.
-
getOptionToolTips
public java.util.List<java.lang.String> getOptionToolTips()
Get Tool-tips for the options. Should be same length as getOptions()- Returns:
- list of tool-tips.
-
-