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

FX component incorrectly reports its bounds when in fxcanvas

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: javafx
    • Environment:

      8.0b110, attached swt.jar, win7, x64

      Description

      Run the attached application.

      Click button move (wait 2 seconds). Application will be moved to the corner. Coordinates reporting will be done correctly.
      Move application somewhere (in the center of the scene).
      Click button move again (wait 2 seconds). Coordinates will be reported wrongly:

      Sample output:
      root.localToScreen(root.getLayoutBounds()) = BoundingBox [minX:8.0, minY:30.0, minZ:0.0, width:284.0, height:202.0, depth:0.0, maxX:292.0, maxY:232.0, maxZ:0.0]
      root.localToScreen(root.getLayoutBounds()) = BoundingBox [minX:782.0, minY:366.0, minZ:0.0, width:284.0, height:202.0, depth:0.0, maxX:1066.0, maxY:568.0, maxZ:0.0]

      So, fx content reports its coordinates wrongly starting from the second time.

      I've added waiting for 2 seconds, because interacting with application could restore correct coordinates

      Affected tests:
      ControlsAutomatedTestSuite/javafx/scene/control/test/fxcanvas/FXCanvasTest/resizingTest

        Attachments

        1. swt.jar
          1.79 MB
        2. FXCanvasApp.zip
          34 kB

          Activity

            People

            • Assignee:
              snorthov Steve Northover (Inactive)
              Reporter:
              akirov Alexander Kirov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: