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

Region's layoutInArea() and positionInArea() incorrectly attempt to snap non-resizables to pixel boundaries, often causing gaps in positioning

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:

      Description

      the following code illustrates a problem in the way Region's layout code is always trying to snap positions, regardless of whether the node is resizable and can even be snapped:

                  StackPane stack = new StackPane();
                  stack.setAlignment(Pos.BOTTOM_RIGHT); // leaves a small gap on bottom-right of circle because of snap-to-pixel rounding
                  stack.setStyle("-fx-background-color: yellow;");
                  stack.getChildren().add(new Circle(20.12));

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amfowler Anne Fowler (Inactive)
                Reporter:
                amfowler Anne Fowler (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: