Class BeanProperty

    • Field Detail

      • CATEGORY_LABEL_KEY

        public static final String CATEGORY_LABEL_KEY
        Unique identifier to provide a custom category label within PropertySheet.Item.getCategory(). How to use it: with a PropertyDescriptor, provide the custom category through a a named attribute FeatureDescriptor.setValue(String, Object).
         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");
         
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        public 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 the PropertyEditor. If you need to explain more detail to the user, consider placing it in the PropertySheet.Item.getDescription().
        Specified by:
        getName in interface PropertySheet.Item
      • getBean

        public Object getBean()
        Returns:
        The object passed in to the constructor of the BeanProperty.
      • getPropertyEditorClass

        public 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
        Specified by:
        getPropertyEditorClass in interface PropertySheet.Item
      • isEditable

        public boolean isEditable()
        Indicates whether the PropertySheet should allow editing of this property, or whether it is read-only. The default implementation returns true.
        Specified by:
        isEditable in interface PropertySheet.Item
      • setEditable

        public void setEditable​(boolean editable)
        Parameters:
        editable - Whether this property should be editable in the PropertySheet.