X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fparticipant%2FRulerPainter.java;fp=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Fparticipant%2FRulerPainter.java;h=74a5f358674009cc44b2ae52ef731c6e579a9997;hb=fd9e089735dcfd10e49329a4f521c551fd3a7a74;hp=e4f90791e2123b8fa1c01bf1566ae82de90ac0f7;hpb=35dc1a8814a9597c4b2b09101ef7abcf9fd42de7;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/participant/RulerPainter.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/participant/RulerPainter.java index e4f90791e..74a5f3586 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/participant/RulerPainter.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/participant/RulerPainter.java @@ -102,11 +102,15 @@ public class RulerPainter extends AbstractCanvasParticipant { @SGInit public void initSG(G2DParentNode parent) { - node = parent.addNode("ruler", RulerNode.class); + node = parent.addNode("ruler", getNodeClass()); node.setZIndex(PAINT_PRIORITY); updateNode(); } + protected Class getNodeClass() { + return RulerNode.class; + } + @SGCleanup public void cleanupSG() { node.remove();