From 482f76c28b6e2138bc552b808a35e3d733107515 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Mon, 31 Aug 2020 22:50:06 +0300 Subject: [PATCH 1/7] Initial commit --- .../src/main/java/javafx/scene/Node.java | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index f1b7839e3e7..42c6eff4db4 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -321,9 +321,21 @@ * A shearing transformation, sometimes called a skew, effectively * rotates one axis so that the x and y axes are no longer perpendicular. *

- * Multiple transformations may be applied to a node by specifying an ordered - * chain of transforms. The order in which the transforms are applied is - * defined by the ObservableList specified in the {@link #getTransforms transforms} variable. + * + * Multiple transformations may be applied to a node. Custom transforms are applied using the + * {@link #getTransforms transforms} list. Predefined transforms are applied using the properties specified below. + * The matrices that represent the transforms are multiplied in this order: + *

    + *
  1. Layout ({@link #layoutXProperty layoutX}), {@link #layoutYProperty layoutY} and translate + * ({@link #translateXProperty translateX}, {@link #translateYProperty translateY}, {@link #translateZProperty translateZ}) + *
  2. Rotate ({@link #rotateProperty rotate}) + *
  3. Scale ({@link #scaleXProperty scaleX}, {@link #scaleYProperty scaleY}, {@link #scaleZProperty scaleZ}) + *
  4. Transforms list ({@link #getTransforms transforms}) starting from element 0 + *
+ * The transforms are applied in the reverse order of the matrix multiplication outlined above: last element of the transforms list + * to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bound in the local + * coordinates of the node are transformed to the bounds in the parent coordinate of the node (see the Bounding Rectangles + * section). * *

Bounding Rectangles

*

@@ -340,9 +352,7 @@ *

* Each {@code Node} also has a read-only {@link #boundsInParentProperty boundsInParent} variable which * specifies the bounding rectangle of the {@code Node} after all transformations - * have been applied, including those set in {@link #getTransforms transforms}, - * {@link #scaleXProperty scaleX}/{@link #scaleYProperty scaleY}, {@link #rotateProperty rotate}, - * {@link #translateXProperty translateX}/{@link #translateYProperty translateY}, and {@link #layoutXProperty layoutX}/{@link #layoutYProperty layoutY}. + * have been applied as specified in the Transformations section. * It is called "boundsInParent" because the rectangle will be relative to the * parent's coordinate system. This is the 'visual' bounds of the node. *

@@ -3388,21 +3398,12 @@ public final Bounds getBoundsInParent() { } /** - * The rectangular bounds of this {@code Node} which include its transforms. - * {@code boundsInParent} is calculated by - * taking the local bounds (defined by {@link #boundsInLocalProperty boundsInLocal}) and applying - * the transform created by setting the following additional variables - *

    - *
  1. {@link #getTransforms transforms} ObservableList
  2. - *
  3. {@link #scaleXProperty scaleX}, {@link #scaleYProperty scaleY}, {@link #scaleZProperty scaleZ}
  4. - *
  5. {@link #rotateProperty rotate}
  6. - *
  7. {@link #layoutXProperty layoutX}, {@link #layoutYProperty layoutY}
  8. - *
  9. {@link #translateXProperty translateX}, {@link #translateYProperty translateY}, - * {@link #translateZProperty translateZ}
  10. - *
+ * The rectangular bounds of this {@code Node} in the parent coordinate system. + * {@code boundsInParent} is calculated by taking the {@linkplain #boundsInLocalProperty local bounds} and applying + * the node transforms as specified in the {@linkplain Node Transformations} section of the class doc. *

* The resulting bounds will be conceptually in the coordinate space of the - * {@code Node}'s parent, however the node need not have a parent to calculate + * {@code Node}'s parent, however, the node need not have a parent to calculate * these bounds. *

* Note that this method does not take the node's visibility into account; @@ -3418,7 +3419,9 @@ public final Bounds getBoundsInParent() { * this variable. For example, the x or y variables of a shape, or * {@code translateX}, {@code translateY} should never be bound to * {@code boundsInParent} for the purpose of positioning the node. - * @return the boundsInParent for this {@code Node} + * + * @return the {@code boundsInParent} property for this {@code Node} + * @see {@linkplain Node Bounding Rectangles} section in the class docs */ public final ReadOnlyObjectProperty boundsInParentProperty() { return getMiscProperties().boundsInParentProperty(); @@ -5519,10 +5522,9 @@ public final double getViewOrder() { * * **************************************************************************/ /** - * Defines the ObservableList of {@link javafx.scene.transform.Transform} objects - * to be applied to this {@code Node}. This ObservableList of transforms is applied - * before {@link #translateXProperty translateX}, {@link #translateYProperty translateY}, {@link #scaleXProperty scaleX}, and - * {@link #scaleYProperty scaleY}, {@link #rotateProperty rotate} transforms. + * The {@code ObservableList} of custom {@link javafx.scene.transform.Transform}s + * to be applied to this {@code Node}. These transforms are applied before the predefined transforms. See the + * {@linkplain Node Transformations} section of the class docs for more information about transformation types and order. * * @return the transforms for this {@code Node} * @defaultValue empty From ff286c1fd43d5b5ad1a1a3cb6b80c715de2a50bf Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Tue, 1 Sep 2020 02:29:32 +0300 Subject: [PATCH 2/7] Remove whitespace --- modules/javafx.graphics/src/main/java/javafx/scene/Node.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index 42c6eff4db4..c7f215d5ce3 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -321,7 +321,6 @@ * A shearing transformation, sometimes called a skew, effectively * rotates one axis so that the x and y axes are no longer perpendicular. *

- * * Multiple transformations may be applied to a node. Custom transforms are applied using the * {@link #getTransforms transforms} list. Predefined transforms are applied using the properties specified below. * The matrices that represent the transforms are multiplied in this order: From d56f8d024ccd6cbb88a28a0e9c19beb30021fd00 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Tue, 1 Sep 2020 02:31:28 +0300 Subject: [PATCH 3/7] Remove whitespace --- .../javafx.graphics/src/main/java/javafx/scene/Node.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index c7f215d5ce3..179cce6d9ef 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -324,7 +324,7 @@ * Multiple transformations may be applied to a node. Custom transforms are applied using the * {@link #getTransforms transforms} list. Predefined transforms are applied using the properties specified below. * The matrices that represent the transforms are multiplied in this order: - *

    + *
      *
    1. Layout ({@link #layoutXProperty layoutX}), {@link #layoutYProperty layoutY} and translate * ({@link #translateXProperty translateX}, {@link #translateYProperty translateY}, {@link #translateZProperty translateZ}) *
    2. Rotate ({@link #rotateProperty rotate}) @@ -334,7 +334,7 @@ * The transforms are applied in the reverse order of the matrix multiplication outlined above: last element of the transforms list * to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bound in the local * coordinates of the node are transformed to the bounds in the parent coordinate of the node (see the Bounding Rectangles - * section). + * section). * *

      Bounding Rectangles

      *

      @@ -3399,7 +3399,7 @@ public final Bounds getBoundsInParent() { /** * The rectangular bounds of this {@code Node} in the parent coordinate system. * {@code boundsInParent} is calculated by taking the {@linkplain #boundsInLocalProperty local bounds} and applying - * the node transforms as specified in the {@linkplain Node Transformations} section of the class doc. + * the node transforms as specified in the {@linkplain Node Transformations} section of the class doc. *

      * The resulting bounds will be conceptually in the coordinate space of the * {@code Node}'s parent, however, the node need not have a parent to calculate From e09d20f79302812b57f29cca9908d96ed8a20157 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Sat, 12 Sep 2020 16:40:41 +0300 Subject: [PATCH 4/7] Addressed review comments --- .../src/main/java/javafx/scene/Node.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index 179cce6d9ef..9addeb26f17 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -225,7 +225,7 @@ * an UnsupportedOperationException being thrown. *

      * - *

      String ID

      + *

      String ID

      *

      * Each node in the scene graph can be given a unique {@link #idProperty id}. This id is * much like the "id" attribute of an HTML tag in that it is up to the designer @@ -235,7 +235,7 @@ * scene graph. The id can also be used identify nodes for applying styles; see * the CSS section below. * - *

      Coordinate System

      + *

      Coordinate System

      *

      * The {@code Node} class defines a traditional computer graphics "local" * coordinate system in which the {@code x} axis increases to the right and the @@ -268,7 +268,7 @@ * important context-specific information about coordinate mapping and how * it can affect rendering. * - *

      Transformations

      + *

      Transformations

      *

      * Any {@code Node} can have transformations applied to it. These include * translation, rotation, scaling, or shearing. @@ -325,18 +325,18 @@ * {@link #getTransforms transforms} list. Predefined transforms are applied using the properties specified below. * The matrices that represent the transforms are multiplied in this order: *

        - *
      1. Layout ({@link #layoutXProperty layoutX}), {@link #layoutYProperty layoutY} and translate + *
      2. Layout ({@link #layoutXProperty layoutX}, {@link #layoutYProperty layoutY}) and translate * ({@link #translateXProperty translateX}, {@link #translateYProperty translateY}, {@link #translateZProperty translateZ}) *
      3. Rotate ({@link #rotateProperty rotate}) *
      4. Scale ({@link #scaleXProperty scaleX}, {@link #scaleYProperty scaleY}, {@link #scaleZProperty scaleZ}) *
      5. Transforms list ({@link #getTransforms transforms}) starting from element 0 *
      * The transforms are applied in the reverse order of the matrix multiplication outlined above: last element of the transforms list - * to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bound in the local + * to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bounds in the local * coordinates of the node are transformed to the bounds in the parent coordinate of the node (see the Bounding Rectangles * section). * - *

      Bounding Rectangles

      + *

      Bounding Rectangles

      *

      * Since every {@code Node} has transformations, every Node's geometric * bounding rectangle can be described differently depending on whether @@ -351,7 +351,7 @@ *

      * Each {@code Node} also has a read-only {@link #boundsInParentProperty boundsInParent} variable which * specifies the bounding rectangle of the {@code Node} after all transformations - * have been applied as specified in the Transformations section. + * have been applied as specified in the Transformations section. * It is called "boundsInParent" because the rectangle will be relative to the * parent's coordinate system. This is the 'visual' bounds of the node. *

      @@ -389,8 +389,7 @@ *

      The rectangles are enclosed by their
  * respective bounds

      * - * - *

      CSS

      + *

      CSS

      *

      * The {@code Node} class contains {@code id}, {@code styleClass}, and * {@code style} variables that are used in styling this node from @@ -402,6 +401,7 @@ * For further information about CSS and how to apply CSS styles * to nodes, see the CSS Reference * Guide. + * * @since JavaFX 2.0 */ @IDProperty("id") @@ -3418,9 +3418,10 @@ public final Bounds getBoundsInParent() { * this variable. For example, the x or y variables of a shape, or * {@code translateX}, {@code translateY} should never be bound to * {@code boundsInParent} for the purpose of positioning the node. + *

      + * See also the Bounding Rectangles section. * * @return the {@code boundsInParent} property for this {@code Node} - * @see {@linkplain Node Bounding Rectangles} section in the class docs */ public final ReadOnlyObjectProperty boundsInParentProperty() { return getMiscProperties().boundsInParentProperty(); @@ -5522,8 +5523,9 @@ public final double getViewOrder() { **************************************************************************/ /** * The {@code ObservableList} of custom {@link javafx.scene.transform.Transform}s - * to be applied to this {@code Node}. These transforms are applied before the predefined transforms. See the - * {@linkplain Node Transformations} section of the class docs for more information about transformation types and order. + * to be applied to this {@code Node}. These transforms are applied before the predefined transforms. + *

      + * See also the Transformations section. * * @return the transforms for this {@code Node} * @defaultValue empty From 0bf63c0b5427fe3f87e6f1f16b6dda7d17806a9d Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Sat, 12 Sep 2020 16:43:22 +0300 Subject: [PATCH 5/7] Added

    3. tags --- .../javafx.graphics/src/main/java/javafx/scene/Node.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index 9addeb26f17..c63bb8bac61 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -326,10 +326,10 @@ * The matrices that represent the transforms are multiplied in this order: *
        *
      1. Layout ({@link #layoutXProperty layoutX}, {@link #layoutYProperty layoutY}) and translate - * ({@link #translateXProperty translateX}, {@link #translateYProperty translateY}, {@link #translateZProperty translateZ}) - *
      2. Rotate ({@link #rotateProperty rotate}) - *
      3. Scale ({@link #scaleXProperty scaleX}, {@link #scaleYProperty scaleY}, {@link #scaleZProperty scaleZ}) - *
      4. Transforms list ({@link #getTransforms transforms}) starting from element 0 + * ({@link #translateXProperty translateX}, {@link #translateYProperty translateY}, {@link #translateZProperty translateZ})
      5. + *
      6. Rotate ({@link #rotateProperty rotate})
      7. + *
      8. Scale ({@link #scaleXProperty scaleX}, {@link #scaleYProperty scaleY}, {@link #scaleZProperty scaleZ})
      9. + *
      10. Transforms list ({@link #getTransforms transforms}) starting from element 0
      11. *
      * The transforms are applied in the reverse order of the matrix multiplication outlined above: last element of the transforms list * to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bounds in the local From 453435efe385a39ab55d89e2206094825679e583 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Sat, 12 Sep 2020 16:50:41 +0300 Subject: [PATCH 6/7] Replaced link --- modules/javafx.graphics/src/main/java/javafx/scene/Node.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index c63bb8bac61..5b4ef763478 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -3399,7 +3399,7 @@ public final Bounds getBoundsInParent() { /** * The rectangular bounds of this {@code Node} in the parent coordinate system. * {@code boundsInParent} is calculated by taking the {@linkplain #boundsInLocalProperty local bounds} and applying - * the node transforms as specified in the {@linkplain Node Transformations} section of the class doc. + * the node transforms as specified in the Transformations section of the class doc. *

      * The resulting bounds will be conceptually in the coordinate space of the * {@code Node}'s parent, however, the node need not have a parent to calculate From 45f9d8aa88a3552ed1b8f399663d288b38082719 Mon Sep 17 00:00:00 2001 From: nlisker <37422899+nlisker@users.noreply.github.com> Date: Sat, 12 Sep 2020 18:11:56 +0300 Subject: [PATCH 7/7] Replaced a link --- modules/javafx.graphics/src/main/java/javafx/scene/Node.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java index 5b4ef763478..a6dbb22ad1c 100644 --- a/modules/javafx.graphics/src/main/java/javafx/scene/Node.java +++ b/modules/javafx.graphics/src/main/java/javafx/scene/Node.java @@ -333,8 +333,8 @@ *

    * The transforms are applied in the reverse order of the matrix multiplication outlined above: last element of the transforms list * to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bounds in the local - * coordinates of the node are transformed to the bounds in the parent coordinate of the node (see the Bounding Rectangles - * section). + * coordinates of the node are transformed to the bounds in the parent coordinate of the node (see the + * Bounding Rectangles section). * *

    Bounding Rectangles

    *