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

Print this page




 793         if (dirty != DirtyFlag.DIRTY) {
 794             dirty = DirtyFlag.DIRTY;
 795             markTreeDirty();
 796         }
 797     }
 798 
 799     /**
 800      * Mark the node as DIRTY_BY_TRANSLATION. This will call special cache invalidation
 801      */
 802     private void markDirtyByTranslation() {
 803         if (dirty == DirtyFlag.CLEAN) {
 804             if (parent != null && parent.dirty == DirtyFlag.CLEAN && !parent.childDirty) {
 805                 dirty = DirtyFlag.DIRTY_BY_TRANSLATION;
 806                 parent.childDirty = true;
 807                 parent.dirtyChildrenAccumulated++;
 808                 parent.invalidateCacheByTranslation(hint);
 809                 parent.markTreeDirty();
 810             } else {
 811                 markDirty();
 812             }


 813         }
 814     }
 815 
 816     //Mark tree dirty, but make sure this node's
 817     // dirtyChildrenAccumulated has not been incremented.
 818     // Useful when a markTree is called on a node that's not
 819     // the dirty source of change, e.g. group knows it has new child
 820     // or one of it's child has been removed
 821     protected final void markTreeDirtyNoIncrement() {
 822         if (parent != null && (!parent.childDirty || dirty == DirtyFlag.DIRTY_BY_TRANSLATION)) {
 823             markTreeDirty();
 824         }
 825     }
 826 
 827     /**
 828      * Notifies the parent (whether an NGGroup or just a NGNode) that
 829      * a child has become dirty. This walk will continue all the way up
 830      * to the root of the tree. If a node is encountered which is already
 831      * dirty, or which already has childDirty set, then this loop will
 832      * terminate (ie: there is no point going further so we might as well




 793         if (dirty != DirtyFlag.DIRTY) {
 794             dirty = DirtyFlag.DIRTY;
 795             markTreeDirty();
 796         }
 797     }
 798 
 799     /**
 800      * Mark the node as DIRTY_BY_TRANSLATION. This will call special cache invalidation
 801      */
 802     private void markDirtyByTranslation() {
 803         if (dirty == DirtyFlag.CLEAN) {
 804             if (parent != null && parent.dirty == DirtyFlag.CLEAN && !parent.childDirty) {
 805                 dirty = DirtyFlag.DIRTY_BY_TRANSLATION;
 806                 parent.childDirty = true;
 807                 parent.dirtyChildrenAccumulated++;
 808                 parent.invalidateCacheByTranslation(hint);
 809                 parent.markTreeDirty();
 810             } else {
 811                 markDirty();
 812             }
 813         } else {
 814             markDirty();
 815         }
 816     }
 817 
 818     //Mark tree dirty, but make sure this node's
 819     // dirtyChildrenAccumulated has not been incremented.
 820     // Useful when a markTree is called on a node that's not
 821     // the dirty source of change, e.g. group knows it has new child
 822     // or one of it's child has been removed
 823     protected final void markTreeDirtyNoIncrement() {
 824         if (parent != null && (!parent.childDirty || dirty == DirtyFlag.DIRTY_BY_TRANSLATION)) {
 825             markTreeDirty();
 826         }
 827     }
 828 
 829     /**
 830      * Notifies the parent (whether an NGGroup or just a NGNode) that
 831      * a child has become dirty. This walk will continue all the way up
 832      * to the root of the tree. If a node is encountered which is already
 833      * dirty, or which already has childDirty set, then this loop will
 834      * terminate (ie: there is no point going further so we might as well