ColorAction nodeStroke = new ColorAction(Constants.TREE_NODES,
VisualItem.STROKECOLOR);
nodeStroke.setDefaultColor(ColorManager.BORDER_COLOR_RGB);
nodeStroke.add("_hover", ColorManager.BORDER_COLOR_RGB);
Predicate noServiceItemFilter =
ExpressionParser.predicate("state=="+Constants.ACTIVE_NO_SERVICE_ITEM);
//nodeStroke.add(noServiceItemFilter,
// ColorManager.NO_SERVICE_ITEM_BORDER_COLOR_RGB);
ColorAction nodeFill = new ColorAction(Constants.TREE_NODES,
VisualItem.FILLCOLOR);
nodeFill.add("_hover", ColorManager.HOVER_COLOR_RGB);
/* Color predicates */
nodeFill.add(rootFilter, ColorManager.ROOT_COLOR_RGB);
//Predicate okayFilter =
// ExpressionParser.predicate(Constants.STATE+"=="+Constants.ACTIVE+" || " +
// Constants.STATE+"=="+Constants.ACTIVE_NO_SERVICE_ITEM);
Predicate okayFilter =
ExpressionParser.predicate(Constants.STATE+"=="+Constants.ACTIVE);
nodeFill.add(okayFilter,
ColorLib.color(colorManager.getOkayColor()));
Predicate emptyFilter =
ExpressionParser.predicate(Constants.STATE+"=="+Constants.EMPTY);
nodeFill.add(emptyFilter, ColorManager.EMPTY_COLOR_RGB);
Predicate ambiguousFilter =
ExpressionParser.predicate(Constants.STATE+"=="+Constants.WARNING);
nodeFill.add(ambiguousFilter,
ColorLib.color(colorManager.getWarningColor()));
nodeFill.add(noServiceItemFilter,
ColorLib.color(colorManager.getWarningColor()));
Predicate failureFilter =
ExpressionParser.predicate(Constants.STATE+"=="+Constants.FAILED);
nodeFill.add(failureFilter,
ColorLib.color(colorManager.getFailureColor()));
colorManager.setColorAction(nodeFill);