*/
protected void addCSSClasses(int maxClusterSize) {
StyleLibrary style = context.getStyleLibrary();
// Cluster separation lines
CSSClass cssReferenceBorder = new CSSClass(this.getClass(), CLR_BORDER_CLASS);
cssReferenceBorder.setStatement(SVGConstants.SVG_FILL_ATTRIBUTE, style.getColor(STYLE_BORDER));
svgp.addCSSClassOrLogError(cssReferenceBorder);
// Hover effect for clusters
CSSClass cluster_hover = new CSSClass(this.getClass(), CLR_HOVER_CLASS);
// Note: !important is needed to override the regular color assignment
cluster_hover.setStatement(SVGConstants.SVG_FILL_ATTRIBUTE, style.getColor(STYLE_HOVER) + " !important");
cluster_hover.setStatement(SVGConstants.SVG_CURSOR_TAG, SVGConstants.SVG_POINTER_VALUE);
svgp.addCSSClassOrLogError(cluster_hover);
// Unpaired cluster segment
CSSClass cluster_unpaired = new CSSClass(this.getClass(), CLR_UNPAIRED_CLASS);
cluster_unpaired.setStatement(SVGConstants.SVG_FILL_ATTRIBUTE, style.getBackgroundColor(STYLE));
cluster_unpaired.setStatement(SVGConstants.SVG_STROKE_ATTRIBUTE, SVGConstants.CSS_NONE_VALUE);
svgp.addCSSClassOrLogError(cluster_unpaired);
// Selected unpaired cluster segment
CSSClass cluster_unpaired_s = new CSSClass(this.getClass(), SEG_UNPAIRED_SELECTED_CLASS);
cluster_unpaired_s.setStatement(SVGConstants.SVG_FILL_ATTRIBUTE, style.getColor(STYLE_HOVER) + " !important");
svgp.addCSSClassOrLogError(cluster_unpaired_s);
// create Color shades for clusters
String firstcol = style.getColor(STYLE_GRADIENT_FIRST);
String secondcol = style.getColor(STYLE_GRADIENT_SECOND);
String[] clusterColorShades = makeGradient(maxClusterSize, new String[] { firstcol, secondcol });
for(int i = 0; i < maxClusterSize; i++) {
CSSClass clusterClasses = new CSSClass(CircleSegmentsVisualizer.class, CLR_CLUSTER_CLASS_PREFIX + "_" + i);
clusterClasses.setStatement(SVGConstants.SVG_FILL_ATTRIBUTE, clusterColorShades[i]);
clusterClasses.setStatement(SVGConstants.SVG_STROKE_ATTRIBUTE, SVGConstants.SVG_NONE_VALUE);
svgp.addCSSClassOrLogError(clusterClasses);
}
}