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

Utils.pointRelativeTo doesn't position window correctly when it is overlapping with existing one

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • 8.0-controls-scrum-b528-x64

      I tried to use the following method to position CustomColorDialog relative to ColorPicker.

      public static Point2D pointRelativeTo(Object parent, double width,
                  double height, double screenX, double screenY, HPos hpos, VPos vpos)

      I specify:

      screenX = colorPicker.getX() + colorPicker.getWidth()
      screenY = colorPicker.getY()
      hpos = HPos.RIGHT
      vpos = VPos.CENTER

      When there is enough space to the left or to the right from the colorPicker, window is positioned correctly.
      Otherwise, it is positioned to the leftmost screen position. This doesn't seem to be correct. According to my hpos variable, I want it to be positioned to the right.

      So I didn't use this method in my fix to RT-27001

        1. expected.jpg
          57 kB
          Alexander Kuznetcov
        2. observed.jpg
          85 kB
          Alexander Kuznetcov

            Unassigned Unassigned
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: