1 package org.simantics.sysdyn.ui.browser.contributions;
\r
3 import org.simantics.browsing.ui.content.LabelDecorator;
\r
4 import org.simantics.browsing.ui.graph.contributor.labeler.LabelDecoratorContributor;
\r
5 import org.simantics.db.Builtins;
\r
6 import org.simantics.db.ReadGraph;
\r
7 import org.simantics.db.exception.DatabaseException;
\r
8 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;
\r
10 public class SimulationResultDecorator extends LabelDecoratorContributor<SimulationResultNode>{
\r
13 public LabelDecorator getDecorator(ReadGraph graph, SimulationResultNode result) throws DatabaseException {
\r
14 Builtins b = graph.getBuiltins();
\r
15 if (graph.hasStatement(result.resource, b.IsActive)) {
\r
16 return new LabelDecorator.Stub() {
\r
18 public String decorateLabel(String label, String column, int itemIndex) {
\r
19 return label + " [ACTIVE]";
\r