Get data from Vision Component to Properties Editor

I have made a component where you can draw rectangles on it. Now I would like to expose coordinates of rectangle in designer’s Properties (under Data) whenever user clicks on the rectangle.
I know that for vice versa I need to override the property change method but how can I get the coordinates in properties when user clicks on rectangle? Thank you for your help.

Make properties “selectedX1”, “selectedY1”, “selectedX2”, “selectedY2” under the Data section.
The component updates these values when user selects a rectangle – selection change event or some such.
Is this what you are trying to do?

If you solved it, can you post a summary of the code?