]> gerrit.simantics Code Review - simantics/district.git/blob
ecdbf275d207f2eeb9f1f3c8554db97e672f93bb
[simantics/district.git] /
1 package org.simantics.district.network.ui.participants;
2
3 import org.simantics.district.network.ui.nodes.MapRulerNode;
4 import org.simantics.g2d.canvas.impl.SGNodeReflection.SGInit;
5 import org.simantics.g2d.participant.RulerPainter;
6 import org.simantics.maps.MapScalingTransform;
7 import org.simantics.scenegraph.g2d.G2DParentNode;
8
9 public class MapRulerPainter extends RulerPainter {
10
11     @SGInit
12     @Override
13     public void initSG(G2DParentNode parent) {
14         node = parent.addNode("ruler", getNodeClass());
15         node.setTransform(MapScalingTransform.INSTANCE);
16         node.setZIndex(PAINT_PRIORITY);
17         updateNode();
18     }
19     
20     @Override
21     protected Class<MapRulerNode> getNodeClass() {
22         return MapRulerNode.class;
23     }
24 }