-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
None
I think, Property interface needs method that will protect value from further rewriting.
Example, why it can be needed:
I`m making GraphEditor control, based on the ScrollPane. It contains complex logic for zoomming in/out (that`s why I took ScrollPane), creating, moving, editing and deleting graph nodes. The top ScrollPane contains Pane with a lot of listeners attached to it. There is absolutly no sense in allowing user to reset ScrollPane`s content to something else, but I can`t protect it. The only way I can do it is by adding ChangeListener, which would catch setting events and return initial Pane back.
P.S. makeImmutable() - is the first name I came up with, there should be better one
Example, why it can be needed:
I`m making GraphEditor control, based on the ScrollPane. It contains complex logic for zoomming in/out (that`s why I took ScrollPane), creating, moving, editing and deleting graph nodes. The top ScrollPane contains Pane with a lot of listeners attached to it. There is absolutly no sense in allowing user to reset ScrollPane`s content to something else, but I can`t protect it. The only way I can do it is by adding ChangeListener, which would catch setting events and return initial Pane back.
P.S. makeImmutable() - is the first name I came up with, there should be better one