@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());
}