* Adds the required CSS-Classes
*
* @param svgp SVG-Plot
*/
private void addCSSClasses(SVGPlot svgp) {
final StyleLibrary style = context.getStyleLibrary();
// Class for the cube
if(!svgp.getCSSClassManager().contains(CSS_CUBE)) {
CSSClass cls = new CSSClass(this, CSS_CUBE);
cls.setStatement(SVGConstants.CSS_STROKE_VALUE, style.getColor(StyleLibrary.SELECTION));
cls.setStatement(SVGConstants.CSS_STROKE_OPACITY_PROPERTY, style.getOpacity(StyleLibrary.SELECTION));
cls.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, style.getLineWidth(StyleLibrary.PLOT));
cls.setStatement(SVGConstants.CSS_STROKE_LINECAP_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
cls.setStatement(SVGConstants.CSS_STROKE_LINEJOIN_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
if(nofill) {
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, SVGConstants.CSS_NONE_VALUE);
}
else {
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, style.getColor(StyleLibrary.SELECTION));
cls.setStatement(SVGConstants.CSS_FILL_OPACITY_PROPERTY, style.getOpacity(StyleLibrary.SELECTION));
}
svgp.addCSSClassOrLogError(cls);
}
// Class for the cube frame
if(!svgp.getCSSClassManager().contains(CSS_CUBEFRAME)) {
CSSClass cls = new CSSClass(this, CSS_CUBEFRAME);
cls.setStatement(SVGConstants.CSS_STROKE_VALUE, style.getColor(StyleLibrary.SELECTION));
cls.setStatement(SVGConstants.CSS_STROKE_OPACITY_PROPERTY, style.getOpacity(StyleLibrary.SELECTION));
cls.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, style.getLineWidth(StyleLibrary.SELECTION));
svgp.addCSSClassOrLogError(cls);
}
}