doesn't color the foreground of a specific trees in a jface treeviewer
I'm trying to color the foreground of a jface tree only if it meets the
condition. Im implementing IColorProvider interface and implementing
getForeGroundColor(object element).
@Override
public Color getForeground(Object element) {
// TODO Auto-generated method stub
Device device = getTreeViewer().getTree().getDisplay();
Color color = new Color(device,162,82,82);
Schedule schedule = (Schedule) element;
if (element instanceof Schedule )
{
if
(schedule.getBeginEffectiveDate().equals(schedule.getEndEffectiveDate())
&&
schedule.getRecurrenceType().getName().equalsIgnoreCase("Once")){
return color;
}}
return null;
}
I tired to debug by putting the break point inside the second if, but it
doesn't get into that if clause.
No comments:
Post a Comment