@Test public void decorateInvalid() { tested.decorate(shape, IShapeDecorator.ShapeState.INVALID); verify(shape).setFillColor(ColorName.WHITE); verify(shape).setShadow(SHADOW_SELECTED); verify(shape).setFillAlpha(1); verify(shape).setStrokeAlpha(1); verify(shape).setStrokeWidth(2); verify(shape).setStrokeColor(StunnerPointHandleDecorator.MAIN_COLOR); }
@Override public Shape decorate(Shape shape, ShapeState state) { switch (state) { case NONE: case VALID: shape.setFillColor(MAIN_COLOR) .setFillAlpha(0.8) .setStrokeAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeWidth(2) .setStrokeColor(STROKE_COLOR); break; case INVALID: shape.setFillColor(ColorName.WHITE) .setFillAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeAlpha(1) .setStrokeWidth(2) .setStrokeColor(MAIN_COLOR); break; } return shape; }
StunnerPointHandleDecorator extends PointHandleDecorator { @Override public Shape decorate(Shape shape, ShapeState state) { switch (state) { case NONE: case VALID: shape.setFillColor(MAIN_COLOR) .setFillAlpha(0.8) .setStrokeAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeWidth(2) .setStrokeColor(STROKE_COLOR); break; case INVALID: shape.setFillColor(ColorName.WHITE) .setFillAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeAlpha(1) .setStrokeWidth(2) .setStrokeColor(MAIN_COLOR); break; } return shape; } }
StunnerPointHandleDecorator extends PointHandleDecorator { @Override public Shape decorate(Shape shape, ShapeState state) { switch (state) { case NONE: case VALID: shape.setFillColor(MAIN_COLOR) .setFillAlpha(0.8) .setStrokeAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeWidth(2) .setStrokeColor(STROKE_COLOR); break; case INVALID: shape.setFillColor(ColorName.WHITE) .setFillAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeAlpha(1) .setStrokeWidth(2) .setStrokeColor(MAIN_COLOR); break; } return shape; }  }
StunnerPointHandleDecorator extends PointHandleDecorator { @Override public Shape decorate(Shape shape, ShapeState state) { switch (state) { case NONE: case VALID: shape.setFillColor(MAIN_COLOR) .setFillAlpha(0.8) .setStrokeAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeWidth(2) .setStrokeColor(STROKE_COLOR); break; case INVALID: shape.setFillColor(ColorName.WHITE) .setFillAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeAlpha(1) .setStrokeWidth(2) .setStrokeColor(MAIN_COLOR); break; } return shape; }  @Override Shape decorate(Shape shape, ShapeState state); }
StunnerPointHandleDecorator extends PointHandleDecorator { @Override public Shape decorate(Shape shape, ShapeState state) { switch (state) { case NONE: case VALID: shape.setFillColor(MAIN_COLOR) .setFillAlpha(0.8) .setStrokeAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeWidth(2) .setStrokeColor(STROKE_COLOR); break; case INVALID: shape.setFillColor(ColorName.WHITE) .setFillAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeAlpha(1) .setStrokeWidth(2) .setStrokeColor(MAIN_COLOR); break; } return shape; }  @Override Shape decorate(Shape shape, ShapeState state); static final String MAIN_COLOR; static final String STROKE_COLOR; }