@Test public void decorateValidNone() { tested.decorate(shape, IShapeDecorator.ShapeState.VALID); tested.decorate(shape, IShapeDecorator.ShapeState.NONE); verify(shape, times(2)).setFillColor(StunnerPointHandleDecorator.MAIN_COLOR); verify(shape, times(2)).setFillAlpha(0.8); verify(shape, times(2)).setStrokeAlpha(1); verify(shape, times(2)).setShadow(SHADOW_SELECTED); verify(shape, times(2)).setStrokeWidth(2); verify(shape, times(2)).setStrokeColor(StunnerPointHandleDecorator.STROKE_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; }