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

[ScrollPane] hvalue vvalue cannot be binded by unidirectional bindings

XMLWordPrintable

      See attched video.

      I set correct enough {h,v}*{min,max} values. I try to bind hvalue or vvalue unidirectionally and catch exception.

      I note, that binding using bidirectional binding can be set, and it works.

      It can be bug on documentation, where you should write, that i can't use unidirectional binding, because your value is binded to scrollBar.values....

      java.lang.RuntimeException: A bound value cannot be set.
              at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:118)
              at javafx.scene.control.ScrollPane.setHvalue(ScrollPane.java:191)
              at com.sun.javafx.scene.control.skin.ScrollPaneSkin.updatePosX(ScrollPaneSkin.java:609)
              at com.sun.javafx.scene.control.skin.ScrollPaneSkin.access$1300(ScrollPaneSkin.java:35)
              at com.sun.javafx.scene.control.skin.ScrollPaneSkin$4.invalidated(ScrollPaneSkin.java:188)
              at com.sun.javafx.binding.ExpressionHelper$SingleInvalidationSingleChange.fireValueChangedEvent(ExpressionHelper.java:226)
              at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
              at javafx.beans.property.DoublePropertyBase.fireValueChangedEvent(DoublePropertyBase.java:82)
              at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:89)
              at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:122)
              at javafx.scene.control.ScrollBar.setValue(ScrollBar.java:115)
              at com.sun.javafx.scene.control.skin.ScrollPaneSkin.handleControlPropertyChanged(ScrollPaneSkin.java:306)
              at com.sun.javafx.scene.control.skin.SkinBase$4.changed(SkinBase.java:242)
              at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:67)
              at com.sun.javafx.binding.ExpressionHelper$MultipleChange.fireValueChangedEvent(ExpressionHelper.java:382)
              at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
              at javafx.beans.property.DoublePropertyBase.fireValueChangedEvent(DoublePropertyBase.java:82)
              at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:89)
              at javafx.beans.property.DoublePropertyBase.bind(DoublePropertyBase.java:162)
              at javafx.scene.control.test.slider.ValueController$2.invalidated(ValueController.java:94)
              at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:140)
              at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:64)
              at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:82)
              at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:89)
              at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:122)
              at javafx.scene.control.ToggleButton.setSelected(ToggleButton.java:118)
              at javafx.scene.control.ToggleButton.fire(ToggleButton.java:201)
              at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:169)
              at com.sun.javafx.scene.control.skin.SkinBase$5.handle(SkinBase.java:297)
              at com.sun.javafx.scene.control.skin.SkinBase$5.handle(SkinBase.java:290)
              at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:56)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:162)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:115)
              at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:47)
              at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
              at javafx.event.Event.fireEvent(Event.java:171)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:2699)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:2520)
              at javafx.scene.Scene$MouseHandler.access$1200(Scene.java:2493)
              at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1226)
              at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1810)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:200)
              at com.sun.glass.ui.View.handleMouseEvent(View.java:256)
              at com.sun.glass.ui.View.notifyMouse(View.java:516)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
              at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
              at java.lang.Thread.run(Thread.java:662)

            dgrieve David Grieve
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: