Ola pessoal ,estou estudando JFreeChart a pouco tempo,e gostaria q me tirassem uma duvida.
Tenho o seguinte método:
public Paint getItemPaint(int row, int column) {
CategoryDataset dataset = getPlot().getDataset();
Comparable coluna = dataset.getColumnKey(column);
double value = dataset.getValue(row, column).doubleValue();
if (isRealLabel()) {
CategoryTextAnnotation a = new CategoryTextAnnotation(""
+ value, coluna, low);
a.setCategoryAnchor(CategoryAnchor.START);
a.setFont(new Font("SansSerif", Font.BOLD, 12));
a.setTextAnchor(TextAnchor.BOTTOM_LEFT);
getPlot().addAnnotation(a);
}
if (coluna.equals("ACUM")) {
// getPlot().
return Color.blue;
} else if (coluna.equals("ACUM \nAno")) {
return new Color(0, 185, 0);
} else {
return Color.red; // cor da barra
}
}
else {
return Color.red; // aqui eu gostaria de retornar um codigo de cor,em vez de usar o nome,por exemplo ,usar em vez d red,o seu valor correspondente(FF0000)
Como retornar passando o código de cor em vez de usar o nome (substituir o color.red pelo codigo da cor vermelha (FF0000))
Grato.