@Test public void testSetView() { assertEquals(tested, tested.setView(viewSupplier)); assertEquals(view, tested.getShapeView()); assertEquals(ShapeState.NONE, tested.getShapeState()); assertEquals(FILL, tested.getStateHolder().getValues().get(ShapeStateAttribute.FILL_COLOR)); assertEquals(FILL_ALPHA, tested.getStateHolder().getValues().get(ShapeStateAttribute.FILL_ALPHA)); assertEquals(STROKE, tested.getStateHolder().getValues().get(ShapeStateAttribute.STROKE_COLOR)); assertEquals(STROKE_ALPHA, tested.getStateHolder().getValues().get(ShapeStateAttribute.STROKE_ALPHA)); assertEquals(STROKE_WIDTH, tested.getStateHolder().getValues().get(ShapeStateAttribute.STROKE_WIDTH)); }
public ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier) { setViewSupplier(viewSupplier); this.state = ShapeState.NONE; saveState(); return this; }
ShapeStateAttributeHandler implements ShapeStateHandler { public ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier) { setViewSupplier(viewSupplier); this.state = ShapeState.NONE; saveState(); return this; } }
ShapeStateAttributeHandler implements ShapeStateHandler { public ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier) { setViewSupplier(viewSupplier); this.state = ShapeState.NONE; saveState(); return this; } ShapeStateAttributeHandler();  ShapeStateAttributeHandler(final BiConsumer<V, ShapeStateAttributes> stateAttributesApplier); }
ShapeStateAttributeHandler implements ShapeStateHandler { public ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier) { setViewSupplier(viewSupplier); this.state = ShapeState.NONE; saveState(); return this; } ShapeStateAttributeHandler();  ShapeStateAttributeHandler(final BiConsumer<V, ShapeStateAttributes> stateAttributesApplier); static BiConsumer<V, ShapeStateAttributes> newDefaultStateApplier(); ShapeStateAttributeHandler<V> useAttributes(final Function<ShapeState, ShapeStateAttributes> stateAttributesProvider); ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier); @Override ShapeStateAttributeHandler<V> shapeAttributesChanged(); @Override void applyState(final ShapeState shapeState); @Override ShapeState reset(); @Override ShapeState getShapeState(); V getShapeView(); }
ShapeStateAttributeHandler implements ShapeStateHandler { public ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier) { setViewSupplier(viewSupplier); this.state = ShapeState.NONE; saveState(); return this; } ShapeStateAttributeHandler();  ShapeStateAttributeHandler(final BiConsumer<V, ShapeStateAttributes> stateAttributesApplier); static BiConsumer<V, ShapeStateAttributes> newDefaultStateApplier(); ShapeStateAttributeHandler<V> useAttributes(final Function<ShapeState, ShapeStateAttributes> stateAttributesProvider); ShapeStateAttributeHandler<V> setView(final Supplier<V> viewSupplier); @Override ShapeStateAttributeHandler<V> shapeAttributesChanged(); @Override void applyState(final ShapeState shapeState); @Override ShapeState reset(); @Override ShapeState getShapeState(); V getShapeView();  }