/** * Uses the configuration found in the given {@link UniqueSymbolPoint} to configure the Stroke, * Fill and WKN of the attached ProportionalPoint. * * @param usp The input {@link UniqueSymbolPoint}. */ private void affectValues(UniqueSymbolPoint usp) { boolean strokeNotNull = !(usp.getPenStroke() instanceof NullPenStrokeLegend); boolean fillNotNull = !(usp.getFillLegend() instanceof NullSolidFillLegend); if (strokeNotNull) { if (proportionalPoint.getPenStroke() instanceof NullPenStrokeLegend) { proportionalPoint.setPenStroke(new ConstantPenStrokeLegend()); } proportionalPoint.getPenStroke().setLineColor(usp.getPenStroke().getLineColor()); proportionalPoint.getPenStroke().setLineOpacity(usp.getPenStroke().getLineOpacity()); proportionalPoint.getPenStroke().setLineWidth(usp.getPenStroke().getLineWidth()); proportionalPoint.getPenStroke().setDashArray(usp.getPenStroke().getDashArray()); } else { proportionalPoint.setPenStroke(new NullPenStrokeLegend()); } if (fillNotNull) { if (proportionalPoint.getFillLegend() instanceof NullSolidFillLegend) { proportionalPoint.setFillLegend(new ConstantSolidFillLegend(new SolidFill())); } proportionalPoint.getFillLegend().setColor(usp.getFillLegend().getColor()); proportionalPoint.getFillLegend().setOpacity(usp.getFillLegend().getOpacity()); } else { proportionalPoint.setFillLegend(new NullSolidFillLegend()); } proportionalPoint.setWellKnownName(usp.getWellKnownName()); }