{
FormattedType ft = (FormattedType) item.getData();
if (ft == null)
return;
UmsatzTyp ut = ft.type;
if (ut == null)
return;
Color c = null;
if (ut.isCustomColor())
{
int[] color = ut.getColor();
if (color == null || color.length != 3)
return;
RGB rgb = new RGB(color[0],color[1],color[2]);
c = colorCache.get(rgb.toString());
if (c == null)
{
c = new Color(GUI.getDisplay(),rgb);
colorCache.put(rgb.toString(),c);
}
}
else
{
int t = ut.getTyp();
if (t == UmsatzTyp.TYP_AUSGABE)
c = Settings.getBuchungSollForeground();
else if (t == UmsatzTyp.TYP_EINNAHME)
c = Settings.getBuchungHabenForeground();
else