< prev index next >
modules/graphics/src/main/java/javafx/scene/shape/Cylinder.java
Print this page
@@ -64,10 +64,26 @@
@Override
public void doUpdatePeer(Node node) {
((Cylinder) node).doUpdatePeer();
}
+ @Override
+ public BaseBounds doComputeGeomBounds(Node node,
+ BaseBounds bounds, BaseTransform tx) {
+ return ((Cylinder) node).doComputeGeomBounds(bounds, tx);
+ }
+
+ @Override
+ public boolean doComputeContains(Node node, double localX, double localY) {
+ return ((Cylinder) node).doComputeContains(localX, localY);
+ }
+
+ @Override
+ public boolean doComputeIntersects(Node node, PickRay pickRay,
+ PickResultChooser pickResult) {
+ return ((Cylinder) node).doComputeIntersects(pickRay, pickResult);
+ }
});
}
static final int DEFAULT_DIVISIONS = 64;
static final double DEFAULT_RADIUS = 1;
static final double DEFAULT_HEIGHT = 2;
@@ -136,11 +152,11 @@
@Override
public void invalidated() {
NodeHelper.markDirty(Cylinder.this, DirtyBits.MESH_GEOM);
manager.invalidateCylinderMesh(key);
key = 0;
- impl_geomChanged();
+ NodeHelper.geomChanged(Cylinder.this);
}
};
}
return height;
}
@@ -166,11 +182,11 @@
@Override
public void invalidated() {
NodeHelper.markDirty(Cylinder.this, DirtyBits.MESH_GEOM);
manager.invalidateCylinderMesh(key);
key = 0;
- impl_geomChanged();
+ NodeHelper.geomChanged(Cylinder.this);
}
};
}
return radius;
}
@@ -210,17 +226,14 @@
*/
private NGNode doCreatePeer() {
return new NGCylinder();
}
- /**
- * @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
- public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) {
+ private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx) {
final float h = (float) getHeight();
final float r = (float) getRadius();
if (r < 0 || h < 0) {
return bounds.makeEmpty();
@@ -231,30 +244,24 @@
bounds = bounds.deriveWithNewBounds(-r, -hh, -r, r, hh, r);
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
+ /*
+ * 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) {
double w = getRadius();
double hh = getHeight()*.5f;
return -w <= localX && localX <= w &&
-hh <= localY && localY <= hh;
}
- /**
- * @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_computeIntersects(PickRay pickRay, PickResultChooser pickResult) {
+ private boolean doComputeIntersects(PickRay pickRay, PickResultChooser pickResult) {
final boolean exactPicking = divisions < DEFAULT_DIVISIONS && mesh != null;
final double r = getRadius();
final Vec3d dir = pickRay.getDirectionNoClone();
< prev index next >