@Test public void testBuildStrokeAttributes() { ShapeStateAttributeHandler.ShapeStateAttributes attributes = strokeAttributes.apply(NONE); attributes.getValues().values().forEach( state -> assertEquals(null, state) ); assertStrokeAttributes(strokeAttributes.apply(SELECTED), COLOR_SELECTED); assertStrokeAttributes(strokeAttributes.apply(HIGHLIGHT), COLOR_HIGHLIGHT); assertStrokeAttributes(strokeAttributes.apply(INVALID), COLOR_INVALID); }
public static ShapeStateAttributes buildStrokeAttributes(final ShapeState state) { final String COLOR = getAttributeColorByState(state); if (null == COLOR) { return buildAttributes(); } return buildAttributes() .set(ShapeStateAttribute.STROKE_ALPHA, 1d) .set(ShapeStateAttribute.STROKE_COLOR, COLOR); }
ShapeStateAttributesFactory { public static ShapeStateAttributes buildStrokeAttributes(final ShapeState state) { final String COLOR = getAttributeColorByState(state); if (null == COLOR) { return buildAttributes(); } return buildAttributes() .set(ShapeStateAttribute.STROKE_ALPHA, 1d) .set(ShapeStateAttribute.STROKE_COLOR, COLOR); } }
ShapeStateAttributesFactory { public static ShapeStateAttributes buildStrokeAttributes(final ShapeState state) { final String COLOR = getAttributeColorByState(state); if (null == COLOR) { return buildAttributes(); } return buildAttributes() .set(ShapeStateAttribute.STROKE_ALPHA, 1d) .set(ShapeStateAttribute.STROKE_COLOR, COLOR); }  }
ShapeStateAttributesFactory { public static ShapeStateAttributes buildStrokeAttributes(final ShapeState state) { final String COLOR = getAttributeColorByState(state); if (null == COLOR) { return buildAttributes(); } return buildAttributes() .set(ShapeStateAttribute.STROKE_ALPHA, 1d) .set(ShapeStateAttribute.STROKE_COLOR, COLOR); }  static ShapeStateAttributes buildStrokeAttributes(final ShapeState state); static ShapeStateAttributes buildFillAttributes(final ShapeState state); }
ShapeStateAttributesFactory { public static ShapeStateAttributes buildStrokeAttributes(final ShapeState state) { final String COLOR = getAttributeColorByState(state); if (null == COLOR) { return buildAttributes(); } return buildAttributes() .set(ShapeStateAttribute.STROKE_ALPHA, 1d) .set(ShapeStateAttribute.STROKE_COLOR, COLOR); }  static ShapeStateAttributes buildStrokeAttributes(final ShapeState state); static ShapeStateAttributes buildFillAttributes(final ShapeState state);  }