]> gerrit.simantics Code Review - simantics/sysdyn.git/blob
1bc94307423f64a68a7e3f22a66641c1318e525d
[simantics/sysdyn.git] /
1 package org.simantics.sysdyn.ui.browser.contributions;\r
2 \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.sysdyn.ui.Activator;\r
8 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;\r
9 \r
10 public class SimulationResultImager extends ImagerContributor<SimulationResultNode>{\r
11 \r
12     @Override\r
13     public ImageDescriptor getDescriptor(ReadGraph graph, SimulationResultNode result) throws DatabaseException {\r
14         if(graph.hasStatement(result.resource, graph.getBuiltins().IsActive))\r
15             return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_bar.png"));\r
16         else\r
17             return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_bar_blackAndWhite.png"));\r
18     }\r
19 \r
20 }\r