-
- All Known Implementing Classes:
BeanProperty
- Enclosing class:
- PropertySheet
public static interface PropertySheet.Item
A wrapper interface for a single property to be displayed in aPropertySheet
control.- See Also:
PropertySheet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getCategory()
Returns a String representation of the category of the property.String
getDescription()
A String that will be shown to the user as a tooltip.String
getName()
Returns the display name of the property, which should be short (i.e.Optional<ObservableValue<? extends Object>>
getObservableValue()
Returns the underlying ObservableValue, where one exists, that the editor can monitor for changes.default Optional<Class<? extends PropertyEditor<?>>>
getPropertyEditorClass()
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.Object
getValue()
Returns the current value of the property.default boolean
isEditable()
Indicates whether the PropertySheet should allow editing of this property, or whether it is read-only.void
setValue(Object value)
Sets the current value of the property.
-
-
-
Method Detail
-
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
void setValue(Object value)
Sets the current value of the property.
-
getObservableValue
Optional<ObservableValue<? extends Object>> getObservableValue()
Returns the underlying ObservableValue, where one exists, that the editor can monitor for changes.
-
getPropertyEditorClass
default Optional<Class<? extends PropertyEditor<?>>> 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.
-
-