1 package org.simantics.sysdyn.ui.properties.widgets.arrays;
\r
3 import org.simantics.browsing.ui.CheckedState;
\r
4 import org.simantics.browsing.ui.graph.contributor.labeler.CheckedStateContributor;
\r
5 import org.simantics.databoard.Bindings;
\r
6 import org.simantics.db.ReadGraph;
\r
7 import org.simantics.db.exception.DatabaseException;
\r
8 import org.simantics.sysdyn.SysdynResource;
\r
10 public class ShowInChartsCheckBox extends CheckedStateContributor<EnumerationIndexNode> {
\r
13 public CheckedState getState(ReadGraph graph, EnumerationIndexNode input)
\r
14 throws DatabaseException {
\r
15 SysdynResource sr = SysdynResource.getInstance(graph);
\r
16 Boolean selected = graph.getPossibleRelatedValue(input.data, sr.ShowEnumerationIndexInCharts, Bindings.BOOLEAN);
\r
17 return selected ? CheckedState.CHECKED : CheckedState.NOT_CHECKED;
\r