Item for use in the
PropertySheet control based on a property belonging to a
JavaBean - simply provide a PropertyDescriptor and the rest will be
taken care of automatically.
Item, PropertySheet, PropertyDescriptor
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final PropertyDescriptor | |
| public static final String | CATEGORY_LABEL_KEY
Unique identifier to provide a custom category label within
|
| private boolean | |
| private Optional | |
| private final Method |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public Object | |
| public String | getCategory()
Implements org. Returns a String representation of the category of the property. |
| public String | getDescription()
Implements org. A String that will be shown to the user as a tooltip. |
| public String | getName()
Implements org. Returns the display name of the property, which should be short (i.e. less than two words). |
| public Optional | getObservableValue()
Implements org. Returns the underlying ObservableValue, where one exists, that the editor can monitor for changes. |
| public PropertyDescriptor | getPropertyDescriptor()
Returns: The |
| public Optional | getPropertyEditorClass()
Overrides default org. Returns an Optional wrapping the class of the PropertyEditor that should be used for editing this item. |
| public Class | getType()
Implements org. Returns the class type of the property. |
| public Object | getValue()
Implements org. Returns the current value of the property. |
| public boolean | isEditable()
Overrides default org. Indicates whether the PropertySheet should allow editing of this property, or whether it is read-only. |
| public void | |
| public void | setValue(final Object value)
Implements org. Sets the current value of the property. |
| bean | back to summary |
|---|---|
| private final Object bean | |
| beanPropertyDescriptor | back to summary |
|---|---|
| private final PropertyDescriptor beanPropertyDescriptor | |
| CATEGORY_LABEL_KEY | back to summary |
|---|---|
| public static final String CATEGORY_LABEL_KEY Unique identifier to provide a custom category label within
final PropertyDescriptor propertyDescriptor = new PropertyDescriptor("yourProperty", YourBean.class);
propertyDescriptor.setDisplayName("Your Display Name");
propertyDescriptor.setShortDescription("Your explanation about this property.");
// then provide a custom category
propertyDescriptor.setValue(BeanProperty.CATEGORY_LABEL_KEY, "Your custom category");
| |
| editable | back to summary |
|---|---|
| private boolean editable | |
| observableValue | back to summary |
|---|---|
| private Optional<ObservableValue<? extends Object>> observableValue | |
| readMethod | back to summary |
|---|---|
| private final Method readMethod | |
| BeanProperty | back to summary |
|---|---|
| public BeanProperty(final Object bean, final PropertyDescriptor propertyDescriptor) | |
| findObservableValue | back to summary |
|---|---|
| private void findObservableValue() | |
| getBean | back to summary |
|---|---|
public Object getBean()
| |
| getCategory | back to summary |
|---|---|
| public String getCategory() Implements org. Doc from org. Returns a String representation of the category of the property. This
is relevant when the
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements org. Doc from org. 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 the
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. 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 the
| |
| getObservableValue | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Returns the underlying ObservableValue, where one exists, that the editor can monitor for changes.
| |
| getPropertyDescriptor | back to summary |
|---|---|
public PropertyDescriptor getPropertyDescriptor()
| |
| getPropertyEditorClass | back to summary |
|---|---|
| public Optional Overrides default org. Doc from org. 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
| |
| getType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Returns the class type of the property.
| |
| getValue | back to summary |
|---|---|
| public Object getValue() Implements org. Doc from org. Returns the current value of the property.
| |
| isEditable | back to summary |
|---|---|
| public boolean isEditable() Overrides default org. Doc from org. Indicates whether the PropertySheet should allow editing of this property, or whether it is read-only. The default implementation returns true.
| |
| setEditable | back to summary |
|---|---|
public void setEditable(final boolean editable)
| |
| setValue | back to summary |
|---|---|
| public void setValue(final Object value) Implements org. Doc from org. Sets the current value of the property.
| |