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

Incorrect boundsInLocal value for an HBox/VBox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx1.2
    • Fix Version/s: fx1.2
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows XP prof, marina b05

      Description

      This is reproducible only with marina b05, not reproducible with franca.

      HBox/VBox do not give correct value for boundsInLocal. To reproduce, run the below program. Click on the HBox which prints the value of boundsInLocal. Instead of giving a cumulative width of its nodes, boundsInLocal of HBox gives the width of only one node.

      import javafx.stage.*;
      import javafx.scene.*;
      import javafx.scene.layout.*;
      import javafx.scene.shape.*;
      import javafx.scene.paint.*;
      import javafx.scene.input.*;

      var hBox: HBox = HBox {
          content: [Rectangle {
              x: 0
              y: 0
              width: 50
              height: 40
              fill: Color.BLUE
          }, Rectangle {
              x: 0
              y: 0
              width: 50
              height: 40
              fill: Color.RED
          }]
          onMousePressed: function(e: MouseEvent) {
              println("boundsInLocal {hBox.boundsInLocal}");
          }
      };
      var scene: Scene = Scene {
          content: hBox
      };
      Stage {
          scene: Scene {
              content: hBox
          }
          width: 200
          height: 200
      };

        Attachments

          Activity

            People

            Assignee:
            amfowler Anne Fowler (Inactive)
            Reporter:
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: