if(sp instanceof ClassStylingPolicy) {
ClassStylingPolicy csp = (ClassStylingPolicy) sp;
for(int i = csp.getMinStyle(); i < csp.getMaxStyle(); i++) {
String key = DATALINE + "_" + i;
if(!svgp.getCSSClassManager().contains(key)) {
CSSClass cls = new CSSClass(this, key);
cls.setStatement(SVGConstants.CSS_STROKE_LINECAP_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
cls.setStatement(SVGConstants.CSS_STROKE_LINEJOIN_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, SVGConstants.CSS_NONE_VALUE);
lines.formatCSSClass(cls, i, width);
svgp.addCSSClassOrLogError(cls);
}
}
}
else {
// Class for the distance function
if(!svgp.getCSSClassManager().contains(DATALINE)) {
CSSClass cls = new CSSClass(this, DATALINE);
cls.setStatement(SVGConstants.CSS_STROKE_LINECAP_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
cls.setStatement(SVGConstants.CSS_STROKE_LINEJOIN_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, SVGConstants.CSS_NONE_VALUE);
lines.formatCSSClass(cls, -1, width);
svgp.addCSSClassOrLogError(cls);
}
}
svgp.updateStyleElement();