< prev index next >

modules/graphics/src/main/java/javafx/scene/canvas/Canvas.java

Print this page

        

*** 83,92 **** --- 83,108 ---- @Override public void doUpdatePeer(Node node) { ((Canvas) node).doUpdatePeer(); } + + @Override + public BaseBounds doComputeGeomBounds(Node node, + BaseBounds bounds, BaseTransform tx) { + return ((Canvas) node).doComputeGeomBounds(bounds, tx); + } + + @Override + public boolean doComputeContains(Node node, double localX, double localY) { + return ((Canvas) node).doComputeContains(localX, localY); + } + + @Override + public Object doProcessMXNode(Node node, MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) { + return ((Canvas) node).doProcessMXNode(alg, ctx); + } }); } static final int DEFAULT_VAL_BUF_SIZE = 1024; static final int DEFAULT_OBJ_BUF_SIZE = 32; private static final int SIZE_HISTORY = 5;
*** 179,189 **** width = new DoublePropertyBase() { @Override public void invalidated() { NodeHelper.markDirty(Canvas.this, DirtyBits.NODE_GEOMETRY); ! impl_geomChanged(); if (theContext != null) { theContext.updateDimensions(); } } --- 195,205 ---- width = new DoublePropertyBase() { @Override public void invalidated() { NodeHelper.markDirty(Canvas.this, DirtyBits.NODE_GEOMETRY); ! NodeHelper.geomChanged(Canvas.this); if (theContext != null) { theContext.updateDimensions(); } }
*** 222,232 **** height = new DoublePropertyBase() { @Override public void invalidated() { NodeHelper.markDirty(Canvas.this, DirtyBits.NODE_GEOMETRY); ! impl_geomChanged(); if (theContext != null) { theContext.updateDimensions(); } } --- 238,248 ---- height = new DoublePropertyBase() { @Override public void invalidated() { NodeHelper.markDirty(Canvas.this, DirtyBits.NODE_GEOMETRY); ! NodeHelper.geomChanged(Canvas.this); if (theContext != null) { theContext.updateDimensions(); } }
*** 269,310 **** current = null; } } } ! /** ! * @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 ! protected boolean impl_computeContains(double localX, double localY) { double w = getWidth(); double h = getHeight(); return (w > 0 && h > 0 && localX >= 0 && localY >= 0 && localX < w && localY < h); } ! /** ! * @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) { bounds = new RectBounds(0f, 0f, (float) getWidth(), (float) getHeight()); bounds = tx.transform(bounds, bounds); return bounds; } ! /** ! * @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 Object impl_processMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) { return alg.processLeafNode(this, ctx); } } --- 285,317 ---- current = null; } } } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private boolean doComputeContains(double localX, double localY) { double w = getWidth(); double h = getHeight(); return (w > 0 && h > 0 && localX >= 0 && localY >= 0 && localX < w && localY < h); } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) { bounds = new RectBounds(0f, 0f, (float) getWidth(), (float) getHeight()); bounds = tx.transform(bounds, bounds); return bounds; } ! /* ! * Note: This method MUST only be called via its accessor method. */ ! private Object doProcessMXNode(MXNodeAlgorithm alg, MXNodeAlgorithmContext ctx) { return alg.processLeafNode(this, ctx); } }
< prev index next >