use of com.google.code.appengine.awt.Paint in project activityinfo by bedatadriven.
the class ChartRendererJC method getDefaultPaints.
protected Paint[] getDefaultPaints(int count) {
String[] accents = Theme.getAccents();
Paint[] paints = new Paint[count];
for (int i = 0; i != paints.length; ++i) {
paints[i] = Color.decode(accents[i % accents.length]);
}
return paints;
}
use of com.google.code.appengine.awt.Paint in project activityinfo by bedatadriven.
the class ChartRendererJC method computePaints.
private Paint[] computePaints(List<PivotTableData.Axis> categories) {
Paint[] paints = getDefaultPaints(categories.size());
Dimension dim = categories.get(0).getDimension();
if (dim == null) {
return paints;
}
for (int i = 0; i != categories.size(); ++i) {
CategoryProperties props = dim.getCategories().get(categories.get(i).getCategory());
if (props != null && props.getColor() != null) {
paints[i] = new Color(props.getColor());
}
}
return paints;
}
Aggregations