1 package org.simantics.sysdyn.ui.browser.contributions;
\r
3 import org.eclipse.jface.resource.ImageDescriptor;
\r
4 import org.simantics.browsing.ui.swt.ImagerContributor;
\r
5 import org.simantics.db.ReadGraph;
\r
6 import org.simantics.db.exception.DatabaseException;
\r
7 import org.simantics.simulation.ontology.SimulationResource;
\r
8 import org.simantics.sysdyn.ui.Activator;
\r
9 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;
\r
11 public class SimulationResultImager extends ImagerContributor<SimulationResultNode>{
\r
14 public ImageDescriptor getDescriptor(ReadGraph graph, SimulationResultNode result) throws DatabaseException {
\r
15 if(graph.hasStatement(result.resource, SimulationResource.getInstance(graph).IsActive))
\r
16 return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_bar.png"));
\r
18 return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_bar_blackAndWhite.png"));
\r