As far as I understood the 'support.firePropertyChange' should cause the GUI to update the property whenever it is changed via the 'set' method in the background.
However this update does not happen for me.
For example when I add the line 'setMaxMove(0.9999f);' to the reset property of the filter and press the reset button the displayed value does not change.
Do I have to register a Listener in the filter or do anything else such that the displayed property value changes automatically?
I wanted to clarify here first before entering this as a new ticket.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Bjorn, you ran into another feature. If a property has a getMinX and getMaxX (or just one of these, apparently) then it is interpreted to make a slider for the property.
Please rename your property from maxMove to maximumMove and it should fix it.
There is a bug I guess where only one of these is needed.
I haven't looked at code to see if this is really the case.
All this stuff is in FilterPanel class.
Let me know if that helps you out.
Tobi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good to hear about the slider feature! Didn't know about that.
Infact however this was not the problem. For the slider to show up one needs the four methods: 'getXXX' , 'setXXX' , 'getMinXXX' , 'getMaxXXX'
As it turns out my Problem was not a bug but in the line
I am not quite sure weather I do not understand it correctly or weather the GUI update is broken.
I have a filter with a property 'MaxMove' with the following getter/setter methods:
As far as I understood the 'support.firePropertyChange' should cause the GUI to update the property whenever it is changed via the 'set' method in the background.
However this update does not happen for me.
For example when I add the line 'setMaxMove(0.9999f);' to the reset property of the filter and press the reset button the displayed value does not change.
Do I have to register a Listener in the filter or do anything else such that the displayed property value changes automatically?
I wanted to clarify here first before entering this as a new ticket.
Bjorn, you ran into another feature. If a property has a getMinX and getMaxX (or just one of these, apparently) then it is interpreted to make a slider for the property.
Please rename your property from maxMove to maximumMove and it should fix it.
There is a bug I guess where only one of these is needed.
I haven't looked at code to see if this is really the case.
All this stuff is in FilterPanel class.
Let me know if that helps you out.
Tobi
Good to hear about the slider feature! Didn't know about that.
Infact however this was not the problem. For the slider to show up one needs the four methods: 'getXXX' , 'setXXX' , 'getMinXXX' , 'getMaxXXX'
As it turns out my Problem was not a bug but in the line
the property needs to be in lowercase as displayed in the GUI, not in Uppercase as in the methodname.
The corrected code is:
I might be updating the Wiki in the next days so that all these cool ways of manipulating the GUI are easier to find.
Thanks for you help Tobi!
Last edit: BjoernBeyer 2014-03-04