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

Incorrect coordinates determination: need to add minX and minY.

    XMLWordPrintable

    Details

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

      8.0b88

      Description

      See https://javafx-jira.kenai.com/browse/RT-29551

      "1. In that case you'll also need to add the minX, minY of the layout bounds of the Popup's root group to the calculated x, y. There is localToScreen method on a Node which was supposed to do this, but I forgot about its existence and didn't update it when fixing RT-28775. Could you file that as a separate issue?"

      My comment :

      I tried on build, which shows sequential menus in correct order, and localToScreen works correctly, but manual coordinates evaluation - StageXY + SceneXY + LocalToScene don't show correct result - I need to add minXY. This is question of API incorrectness - after localToScene I don't need to think about any content allocation on scene.

      minX - the X coordinate of the upper-left corner
      minY - the Y coordinate of the upper-left corner

      public Bounds localToScene(Bounds localBounds)
      Transforms a bounds from the local coordinate space of this Node into the coordinate space of its Scene.
      Parameters:
      localBounds - bounds in Node's space

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lnerad Ľubomír Nerád
              Reporter:
              akirov Alexander Kirov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: