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

Mouse events triggered incorrectly for a transparent node on a transparent stage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • fx1.2
    • fx1.0
    • javafx
    • None
    • Windows XP Prof, jdk6u10 b33, javafx 1.0 b54

      The below program shows a transparent (opacity = 0) rectangle and a circle inside it. Rectangle and Circle are part of a group present in a transparent stage. Mouse entered and exited events are not triggered correctly for the group - they are not consistently triggered.

      import javafx.scene.*;
      import javafx.stage.*;
      import javafx.scene.shape.*;
      import javafx.scene.paint.*;
      import javafx.scene.input.*;
      import java.lang.System;

      Stage {
          style: StageStyle.TRANSPARENT
          width: 500
          height: 500
          scene: Scene {
              fill: null
              content: Group {
                  onMouseEntered: function(e: MouseEvent) {
                      System.out.println("Group mouseEntered");
                  }
                  onMouseExited: function(e: MouseEvent) {
                      System.out.println("Group mouseExited");
                  }
                  content: [Rectangle {
                      opacity: 0
                      width: 300
                      height: 300
                      x: 100
                      y: 100
                  }, Circle {
                      radius: 50
                      centerX: 250
                      centerY: 250
                      fill: Color.BLUE
                  }]
              }
          }
      }

            tdv Dmitri Trembovetski (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: