*/
protected Shape createIndicatorShape(final IndicatorType indicatorType, final double x, final double y,
final double width, final double height, final double pointDistance,
final double gaugeCenterX, final double gaugeCenterY,
final ObjectProperty<Paint> indicatorFillProperty) {
Shape indicatorShape;
switch (indicatorType) {
case RECTANGLE: indicatorShape = new Rectangle(x, y, width, height);
Bindings.bindBidirectional(indicatorShape.fillProperty(), indicatorFillProperty);
break;
case CLOCK: indicatorShape = new Polygon(
x, y,
x - pointDistance, y + (height / 2d),
x, y + height,
x + width, y + (height / 2d) + (height / 4d),
x + width, y + (height / 4d));
Bindings.bindBidirectional(indicatorShape.fillProperty(), indicatorFillProperty);
break;
case KNOB:
indicatorShape = new Polygon(
x, y,
x - pointDistance, y + (indicatorHeight / 2d),
x, y + indicatorHeight,
x + (indicatorWidth / 2d), y + (indicatorHeight / 2d) + (indicatorHeight / 4d),
x + (indicatorWidth / 2d), y + (indicatorHeight / 4d));
Bindings.bindBidirectional(indicatorShape.fillProperty(), indicatorFillProperty);
indicatorShape.setStroke(Color.WHITESMOKE);
indicatorShape.setStrokeWidth(2d);
indicatorShape.setStrokeType(StrokeType.CENTERED);
indicatorShape.setEffect(createLighting());
break;
case NEEDLE: default: indicatorShape = new Polygon(
x, y + (height / 2.5d),
x, y + height - (height / 2.5d),
x + width - pointDistance, y + height,
x + width, y + (height / 2d),
x + width - pointDistance, y);
Bindings.bindBidirectional(indicatorShape.fillProperty(), indicatorFillProperty);
break;
}
indicatorShape.setCache(true);
indicatorShape.setCacheHint(CacheHint.QUALITY);
//indicatorShape.setEffect(createLighting());
return indicatorShape;
}