modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGNode.java

Print this page

        

@@ -187,10 +187,15 @@
      * The opacity of this node.
      */
     private float opacity = 1f;
 
     /**
+     * The priority order of this node.
+     */
+    private double priorityOrder = 0;
+
+    /**
      * The blend mode that controls how the pixels of this node blend into
      * the rest of the scene behind it.
      */
     private Blend.Mode nodeBlendMode;
 

@@ -435,10 +440,30 @@
             }
         }
     }
 
     /**
+     * Called by the FX scene graph whenever the priority order for the node
+     * changes.
+     *
+     * @param priorityOrder A value between the range of negative Double.MAX_VALUE
+     * and positive Double.MAX_VALUE.
+     */
+    public void setPriorityOrder(double priorityOrder) {
+        // If the priorityOrder value has changed, react.
+        if (priorityOrder != this.priorityOrder) {
+            this.priorityOrder = priorityOrder;
+            // Mark this node dirty and invalidate its cache.
+            visualsChanged();
+        }
+    }
+
+    public double getPriorityOrder() {
+        return priorityOrder;
+    }
+
+    /**
      * Set by the FX scene graph.
      * @param blendMode may be null to indicate "default"
      */
     public void setNodeBlendMode(Blend.Mode blendMode) {
         // The following code was a broken optimization that made an