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

Non-bindable Window and Stage properties should extend from ReadOnlyProperty to enforce non-bindability

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx

      Description

      The following Window properties use NonBindableDoubleProperty, a subclass of DoublePropertyBase, which throws a RuntimeException on an attempt to bind to them.

      x, y, width, height

      The user has no compile-time way of knowing this, since the public *Property() methods return a DoubleProperty object.

      Additionally, the following Stage attributes use an ordinary BooleanProperty:

      fullScreen, iconified

      These must be made non-bindable (see RT-16087). Rather than extending the pattern of using an internal NonBindable* class to enforce non-bindability at runtime, we should use the pattern of making these ReadOnlyProperty objects, even though they also have a corresponding set method. Note that this also will prevent directly animating these properties (which doesn't make sense for someone to do anyway).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ekrejcir Eva Krejčířová (Inactive)
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: