]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/participant/RulerPainter.java
Combination of Simantics-platform related changes and fixes for district
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / participant / RulerPainter.java
index e4f90791e2123b8fa1c01bf1566ae82de90ac0f7..bffe0c9df4862a160f95ac0e61610dffb1d2a1e1 100644 (file)
@@ -102,17 +102,21 @@ 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<? extends RulerNode> getNodeClass() {
+        return RulerNode.class;
+    }
+
     @SGCleanup
     public void cleanupSG() {
         node.remove();
     }
 
-    void updateNode() {
+    protected void updateNode() {
         node.setEnabled(isPaintingEnabled());
         node.setGridSize(getGridSize());
     }