package org.simantics.district.network.ui.participants; import java.awt.geom.AffineTransform; import org.simantics.district.network.ui.nodes.MapRulerNode; import org.simantics.g2d.canvas.impl.SGNodeReflection.SGInit; import org.simantics.g2d.participant.RulerPainter; import org.simantics.maps.MapScalingTransform; import org.simantics.scenegraph.g2d.G2DParentNode; public class MapRulerPainter extends RulerPainter { @SGInit @Override public void initSG(G2DParentNode parent) { node = parent.addNode("ruler", getNodeClass()); node.setTransform(new AffineTransform(MapScalingTransform.INSTANCE)); node.setZIndex(PAINT_PRIORITY); updateNode(); } @Override protected Class getNodeClass() { return MapRulerNode.class; } }