How to add custom Properties into an AbstractVisionComponent

I try to add some custom Properties into an AbstractVisionComponent
just like we do in the designer : Righ Click \ Customizers \ Custom Properties.

I’ve seen we can add “static” properties in the HelloWorldComponentBeanInfo.java (in project ComponentExample_Designer)
but I need dynamics properties which are created when the component is dropped on a windows in the designer.

Could you please provide a sample of code for adding a Custom Properties and for changing is value.
(code to add into the AbstractVisionComponent).

I added a property “title” using the code below. I can bind a string tag to it in the designer and surprise, surprise it worked.
I apologize if I have misunderstood your question.

public ChartComponentBeanInfo() {

        super(ChartComponent.class, DynamicPropertyProviderCustomizer.VALUE_DESCRIPTOR, StyleCustomizer.VALUE_DESCRIPTOR);
    }

    @Override
    protected void initProperties() throws IntrospectionException {
        // Adds common properties
        super.initProperties();

        addProp("title", "Title", "The title of the chart", CAT_DATA, PREFERRED_MASK | BOUND_MASK);
    }
2 Likes