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);