Package jmri
Class NamedBeanPropertyDescriptor<E>
java.lang.Object
jmri.NamedBeanPropertyDescriptor<E>
- Type Parameters:
E- class of describer, e.g. Boolean.class
- Direct Known Subclasses:
BooleanPropertyDescriptor,SelectionPropertyDescriptor
Describes metadata about a given property key for a NamedBean.
This metadata is used by the BeanTable actions to display and edit the properties in question.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNamedBeanPropertyDescriptor(String propertyKey, E defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquals based on Property Key and Default value Class.abstract StringReturn user-visible text to render as a column header for the BeanTable representing this setting.Class<?>Get the Class of the property.inthashCode()hashCode based on Property Key and Default value Class.abstract booleanisEditable(NamedBean bean) Determines whether this property is editable.
-
Field Details
-
propertyKey
Key of the property, to be used in the setProperty and getProperty functions on the NamedBean. -
defaultValue
What should be displayed when a given Bean does not have this property set.
-
-
Constructor Details
-
NamedBeanPropertyDescriptor
-
-
Method Details
-
getColumnHeaderText
Return user-visible text to render as a column header for the BeanTable representing this setting.- Returns:
- localized string
-
isEditable
Determines whether this property is editable.- Parameters:
bean- the Bean object of the given row.- Returns:
- true for editable, false for disabled.
-
getValueClass
Get the Class of the property.This class is used to find a matching Renderer for the BeanTable column to display and edit the value of this property. For example returning Boolean.class will show a checkbox.
- Returns:
- Class for the property values.
-
equals
Equals based on Property Key and Default value Class. -
hashCode
hashCode based on Property Key and Default value Class.
-