import java.util.Iterator;
import org.simantics.databoard.Bindings;
+import org.simantics.datatypes.literal.RGB;
+import org.simantics.datatypes.literal.RGB.Integer;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.WriteGraph;
Boolean current = graph.getPossibleRelatedValue(diagram, DN.Diagram_drawMapEnabled, Bindings.BOOLEAN);
return current != null ? current : true;
}
+
+ public static void changeMapBackgroundColor(WriteGraph graph, Resource resource, Integer integer) throws DatabaseException {
+ DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph);
+ graph.claimLiteral(resource, DN.Diagram_backgroundColor, integer, Bindings.getBindingUnchecked(RGB.Integer.class));
+ }
+
+ public static Boolean trackChangesEnabled(ReadGraph graph, Resource diagram) throws DatabaseException {
+ return Boolean.TRUE.equals(graph.getPossibleRelatedValue(diagram,
+ DistrictNetworkResource.getInstance(graph).Diagram_trackChangesEnabled));
+ }
}