- All Known Implementing Classes:
BeanProperty
- Enclosing class:
PropertySheet
public static interface PropertySheet.Item
A wrapper interface for a single property to be displayed in a
PropertySheet
control.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns a String representation of the category of the property.A String that will be shown to the user as a tooltip.getName()
Returns the display name of the property, which should be short (i.e.Returns the underlying ObservableValue, where one exists, that the editor can monitor for changes.default Optional
<Class<? extends PropertyEditor<?>>> Returns an Optional wrapping the class of the PropertyEditor that should be used for editing this item.Class
<?> getType()
Returns the class type of the property.getValue()
Returns the current value of the property.default boolean
Indicates whether the PropertySheet should allow editing of this property, or whether it is read-only.void
Sets the current value of the property.
-
Method Details
-
getType
Class<?> getType()Returns the class type of the property. -
getCategory
String getCategory()Returns a String representation of the category of the property. This is relevant when thePropertySheet
mode property
is set toPropertySheet.Mode.CATEGORY
- as then all properties with the same category will be grouped together visually. -
getName
String getName()Returns the display name of the property, which should be short (i.e. less than two words). This is used to explain to the end user what the property represents and is displayed beside thePropertyEditor
. If you need to explain more detail to the user, consider placing it in thegetDescription()
. -
getDescription
String getDescription()A String that will be shown to the user as a tooltip. This allows for a longer form of detail than what is possible with thegetName()
method. -
getValue
Object getValue()Returns the current value of the property. -
setValue
Sets the current value of the property. -
getObservableValue
Returns the underlying ObservableValue, where one exists, that the editor can monitor for changes. -
getPropertyEditorClass
Returns an Optional wrapping the class of the PropertyEditor that should be used for editing this item. The default implementation returns Optional.empty() The class must have a constructor that can accept a single argument of type PropertySheet.Item -
isEditable
default boolean isEditable()Indicates whether the PropertySheet should allow editing of this property, or whether it is read-only. The default implementation returns true.
-