Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8103544

makeImmutable() method for properties

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: javafx
    • Subcomponent:

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              msladecek Martin Sládeček
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: