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

ClipView field clipY can't be bound

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: fx1.2.1
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Environment:

      Windows Vista x86
      Java 6u16
      JavaFX Marina 1.2.1

      Description

      ClipView field clipY can't be bound.

      Here is a script to reproduce:


      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.layout.VBox;
      import javafx.scene.control.Button;
      import javafx.scene.layout.ClipView;
      import javafx.animation.Timeline;
      import javafx.animation.KeyFrame;
      import javafx.animation.Interpolator;

      /**
       * @author cy6erGn0m
       */

      var y : Number = 0;
      var height : Number = 100;
      var clipY : Number = 0;

      def st : Stage = Stage {
          title: "Centered text"
          scene: Scene {
              width: 250
              height: 200
              content: [
                  ClipView {
                      translateY: bind y
                      width: bind st.scene.width
                      height: bind height
                      clipY: bind clipY
                      pannable: false

                      node: VBox {
                          content: [
                              Button {
                                  text: "Button 'Hello'"
                                  
                                  action: function() : Void {
                                      Timeline {
                                          repeatCount: 1
                                          keyFrames: [
                                              KeyFrame {
                                                  time: 1s
                                                  values: [
                                                      clipY => 100 tween Interpolator.EASEIN,
                                                      y => 10 tween Interpolator.EASEIN,
                                                      height => 0 tween Interpolator.EASEIN
                                                  ]
                                              }
                                          ]
                                      }.play();
                                  }
                              }
                          ]
                      }
                  }
              ]

          }
      }


      This code generates many many exceptions like this:

      Exception in trigger:
      com.sun.javafx.runtime.AssignToBoundException: Cannot assign to bound variable
              at com.sun.javafx.runtime.location.FloatVariable.setAsFloat(FloatVariable.java:111)
              at javafx.scene.layout.ClipView.set$clipY(ClipView.fx:66)
              at javafx.scene.layout.ClipView$_SBECL.onChange(ClipView.fx:67)
              at com.sun.javafx.runtime.location.FloatVariable.notifyListeners(FloatVariable.java:146)
              at com.sun.javafx.runtime.location.FloatVariable.replaceValue(FloatVariable.java:94)
              at com.sun.javafx.runtime.location.AbstractBindingExpression.pushValue(AbstractBindingExpression.java:94)
              at com.sun.javafx.runtime.location.FloatVariable$1.compute(FloatVariable.java:104)
              at com.sun.javafx.runtime.location.AbstractVariable.update(AbstractVariable.java:128)
              at com.sun.javafx.runtime.location.AbstractVariable.ensureValid(AbstractVariable.java:163)
              at com.sun.javafx.runtime.location.FloatVariable.getAsFloat(FloatVariable.java:177)
              at javafx.scene.layout.ClipView$_SBECL.compute(ClipView.fx:208)
              at com.sun.javafx.runtime.location.AbstractVariable.update(AbstractVariable.java:128)
              at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:142)
              at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:234)
              at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:228)
              at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:181)
              at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:254)
              at com.sun.javafx.runtime.location.AbstractLocation.invalidate(AbstractLocation.java:108)
              at com.sun.javafx.runtime.location.AbstractVariable.invalidate(AbstractVariable.java:140)
              at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:234)
              at com.sun.javafx.runtime.location.AbstractLocation$2.onAction(AbstractLocation.java:228)
              at com.sun.javafx.runtime.location.AbstractLocation.iterateChildren(AbstractLocation.java:181)
              at com.sun.javafx.runtime.location.AbstractLocation.invalidateDependencies(AbstractLocation.java:254)
              at com.sun.javafx.runtime.location.FloatVariable.notifyListeners(FloatVariable.java:140)
              at com.sun.javafx.runtime.location.FloatVariable.replaceValue(FloatVariable.java:94)
              at com.sun.javafx.runtime.location.FloatVariable.setAsFloat(FloatVariable.java:113)
              at com.sun.javafx.runtime.Pointer.set(Pointer.java:145)
              at javafx.animation.Timeline.doInterpolate(Timeline.fx:898)
              at javafx.animation.Timeline.doInterpolate(Timeline.fx:898)
              at javafx.animation.Timeline.process(Timeline.fx:844)
              at javafx.animation.Timeline.process(Timeline.fx:844)
              at javafx.animation.Timeline$1TimingTargetAdapter$anon1.timingEvent(Timeline.fx:1046)
              at javafx.animation.Timeline$1TimingTargetAdapter$anon1.timingEvent(Timeline.fx:1046)
              at com.sun.scenario.animation.Clip.fireTimingEvent(Clip.java:929)
              at com.sun.scenario.animation.Clip.process(Clip.java:919)
              at com.sun.scenario.animation.Clip.timePulse(Clip.java:887)
              at com.sun.scenario.animation.AbstractMasterTimer.process(AbstractMasterTimer.java:470)
              at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:376)
              at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:274)
              at com.sun.embeddedswing.EmbeddedEventQueue.doPulse(EmbeddedEventQueue.java:562)
              at com.sun.embeddedswing.EmbeddedEventQueue.access$000(EmbeddedEventQueue.java:74)
              at com.sun.embeddedswing.EmbeddedEventQueue$2.run(EmbeddedEventQueue.java:465)
              at java.awt.event.InvocationEvent.dispatch(Unknown Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)

        Attachments

        1. clipView.patch
          2 kB
          Parvathi Somashekar

          Activity

            People

            Assignee:
            psomashe Parvathi Somashekar (Inactive)
            Reporter:
            smashkovsunw Sergey Mashkov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: