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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx

      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).

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

              Created:
              Updated:
              Resolved:
              Imported: