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

Regression: Painting artifacts when toFront called on TextBox with other nodes over it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx1.3
    • fx1.2
    • javafx
    • Ubuntu 8.04, 6u13, new scenegraph build

      This is reproducible with new scenegraph build on Ubuntu 8.04. Not reproducible with marina b10.

      Run the below program. It shows three rectangles and a textbox, all in a group. On clicking any node, node.toFront is called. On clicking the textbox, sometimes, it shows painting artifacts - with some portion of a node on top and some below. Attached is a screenshot.

      import javafx.stage.*;
      import javafx.scene.*;
      import javafx.scene.control.*;
      import javafx.scene.text.*;
      import javafx.scene.shape.*;
      import javafx.scene.paint.*;
      import javafx.scene.input.*;

      var rect1: Rectangle = Rectangle {
          x: 50
          y: 125
          width: 50
          height: 60
          arcWidth: 20
          arcHeight: 20
          fill: Color.BLACK
          onMousePressed: function( e: MouseEvent ):Void {
              rect1.toFront();
          }
      };

      var rect2: Rectangle = Rectangle {
          x: 60
          y: 150
          width: 50
          height: 60
          arcWidth: 20
          arcHeight: 20
          fill: Color.RED
          onMousePressed: function( e: MouseEvent ):Void {
              rect2.toFront();
          }
      };

      var rect3: Rectangle = Rectangle {
          x: 70
          y: 175
          width: 50
          height: 60
          arcWidth: 20
          arcHeight: 20
          fill: Color.YELLOW
          onMousePressed: function( e: MouseEvent ):Void {
              rect3.toFront();
          }
      };
      var textBox1: TextBox = TextBox {
          text: "Hi!! I'm inside the Rect Group!!!"
          columns: 20
          selectOnFocus: true
          editable: true
          translateX: 90
          translateY: 200
          blocksMouse: false
          onMousePressed: function( e: MouseEvent ):Void {
              textBox1.toFront();
          }
              
      };
      var rectGroup: Group = Group {
          content: [rect1, rect2, rect3, textBox1]
          onMousePressed: function( e: MouseEvent ):Void {
              rectGroup.toFront();
          }
      };

      var appFrame = Stage {
          scene: Scene {
              content: rectGroup
              width: 400
              height: 400
          }
      };

        1. Screenshot- .png
          4 kB
          Girish Ramachandran

            rbair Richard Bair (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: