--- old/modules/graphics/src/main/java/javafx/scene/Parent.java 2016-06-03 11:04:27.129423328 -0700 +++ new/modules/graphics/src/main/java/javafx/scene/Parent.java 2016-06-03 11:04:26.985423330 -0700 @@ -113,6 +113,33 @@ } @Override + public BaseBounds doComputeGeomBounds(Node node, + BaseBounds bounds, BaseTransform tx) { + return ((Parent) node).doComputeGeomBounds(bounds, tx); + } + + @Override + public boolean doComputeContains(Node node, double localX, double localY) { + return ((Parent) node).doComputeContains(localX, localY); + } + + @Override + public void doProcessCSS(Node node) { + ((Parent) node).doProcessCSS(); + } + + @Override + public Object doProcessMXNode(Node node, MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) { + return ((Parent) node).doProcessMXNode(alg, ctx); + } + + @Override + public void doPickNodeLocal(Node node, PickRay localPickRay, + PickResultChooser result) { + ((Parent) node).doPickNodeLocal(localPickRay, result); + } + + @Override public boolean pickChildrenNode(Parent parent, PickRay pickRay, PickResultChooser result) { return parent.pickChildrenNode(pickRay, result); } @@ -126,6 +153,11 @@ public ParentTraversalEngine getTraversalEngine(Parent parent) { return parent.getTraversalEngine(); } + + @Override + public List getAllParentStylesheets(Parent parent) { + return parent.getAllParentStylesheets(); + } }); } @@ -411,7 +443,7 @@ // Note that the styles of a child do not affect the parent or // its siblings. Thus, it is only necessary to reapply css to // the Node just added and not to this parent and all of its - // children. So the following call to impl_reapplyCSS was moved + // children. So the following call to reapplyCSS was moved // to Node.parentProperty. The original comment and code were // purposely left here as documentation should there be any // question about how the code used to work and why the change @@ -419,7 +451,7 @@ // // if children have changed then I need to reapply // CSS from this node on down -// impl_reapplyCSS(); +// reapplyCSS(); // // request layout if a Group subclass has overridden doLayout OR @@ -431,7 +463,7 @@ } if (geomChanged) { - impl_geomChanged(); + NodeHelper.geomChanged(Parent.this); } // Note the starting index at which we need to update the @@ -570,7 +602,7 @@ if (removed == null) { removed = new ArrayList(); } - if (removed.size() + removedLength > REMOVED_CHILDREN_THRESHOLD || !impl_isTreeVisible()) { + if (removed.size() + removedLength > REMOVED_CHILDREN_THRESHOLD || !isTreeVisible()) { //do not populate too many children in removed list removedChildrenOptimizationDisabled = true; } @@ -793,7 +825,7 @@ boolean pickChildrenNode(PickRay pickRay, PickResultChooser result) { List orderedChildren = getOrderedChildren(); for (int i = orderedChildren.size() - 1; i >= 0; i--) { - orderedChildren.get(i).impl_pickNode(pickRay, result); + orderedChildren.get(i).pickNode(pickRay, result); if (result.isClosed()) { return false; } @@ -801,13 +833,11 @@ return true; } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version + /* + * Note: This method MUST only be called via its accessor method. */ - @Deprecated - @Override protected void impl_pickNodeLocal(PickRay pickRay, PickResultChooser result) { - double boundsDistance = impl_intersectsBounds(pickRay); + private void doPickNodeLocal(PickRay pickRay, PickResultChooser result) { + double boundsDistance = intersectsBounds(pickRay); if (!Double.isNaN(boundsDistance) && pickChildrenNode(pickRay, result)) { if (isPickOnBounds()) { @@ -1269,7 +1299,7 @@ if (scene != null) { // Notify the StyleManager if stylesheets change. This Parent's - // styleManager will get recreated in impl_processCSS. + // styleManager will get recreated in NodeHelper.processCSS. StyleManager.getInstance().stylesheetsChanged(Parent.this, c); // RT-9784 - if stylesheet is removed, reset styled properties to @@ -1282,7 +1312,7 @@ break; // no point in resetting more than once... } - impl_reapplyCSS(); + reapplyCSS(); } } }; @@ -1299,19 +1329,16 @@ */ public final ObservableList getStylesheets() { return stylesheets; } - /** + /* * This method recurses up the parent chain until parent is null. As the * stack unwinds, if the Parent has stylesheets, they are added to the * list. * * It is possible to override this method to stop the recursion. This allows * a Parent to have a set of stylesheets distinct from its Parent. - * - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version */ - @Deprecated // SB-dependency: RT-21247 has been filed to track this - public /* Do not make this final! */ List impl_getAllParentStylesheets() { + // SB-dependency: RT-21247 has been filed to track this + List getAllParentStylesheets() { List list = null; final Parent myParent = getParent(); @@ -1323,7 +1350,7 @@ // stylesheets further down the tree (closer to the leaf) have // a higer ordinal in the cascade. // - list = myParent.impl_getAllParentStylesheets(); + list = myParent.getAllParentStylesheets(); } if (stylesheets != null && stylesheets.isEmpty() == false) { @@ -1339,17 +1366,15 @@ } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version + /* + * Note: This method MUST only be called via its accessor method. */ - @Deprecated - @Override protected void impl_processCSS() { + private void doProcessCSS() { // Nothing to do... if (cssFlag == CssFlags.CLEAN) return; - // RT-29254 - If DIRTY_BRANCH, pass control to Node#processCSS. This avoids calling impl_processCSS on + // RT-29254 - If DIRTY_BRANCH, pass control to Node#processCSS. This avoids calling NodeHelper.processCSS on // this node and all of its children when css doesn't need updated, recalculated, or reapplied. if (cssFlag == CssFlags.DIRTY_BRANCH) { super.processCSS(); @@ -1357,7 +1382,7 @@ } // Let the super implementation handle CSS for this node - super.impl_processCSS(); + ParentHelper.superProcessCSS(this); // avoid the following call to children.toArray if there are no children if (children.isEmpty()) return; @@ -1388,7 +1413,7 @@ if(CssFlags.UPDATE.compareTo(child.cssFlag) > 0) { child.cssFlag = CssFlags.UPDATE; } - child.impl_processCSS(); + NodeHelper.processCSS(child); } } @@ -1478,12 +1503,7 @@ private Node near; private Node far; - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version - */ - @Deprecated - @Override public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) { + private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) { // If we have no children, our bounds are invalid if (children.isEmpty()) { return bounds.makeEmpty(); @@ -1863,7 +1883,7 @@ // go ahead and indicate that the geom has changed for this parent, // even though once we figure it all out it may be that the bounds // have not changed - impl_geomChanged(); + NodeHelper.geomChanged(this); } /** @@ -1876,16 +1896,13 @@ childExcluded(node); } - impl_geomChanged(); + NodeHelper.geomChanged(this); } - /** - * @treatAsPrivate implementation detail - * @deprecated This is an internal API that is not intended for use and will be removed in the next version + /* + * Note: This method MUST only be called via its accessor method. */ - @Deprecated - @Override - protected boolean impl_computeContains(double localX, double localY) { + private boolean doComputeContains(double localX, double localY) { final Point2D tempPt = TempState.getInstance().point; for (int i=0, max=children.size(); i