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