* @throws IllegalArgumentException If the given canvas is null.
*/
protected ScaleRuler(final ICanvas canvas) {
super();
this.canvas = Objects.requireNonNull(canvas);
eventManager = new SwingEventManager();
eventManager.attachTo(this);
setDoubleBuffered(true);
canvas.getScrollpane().getVerticalScrollBar().addAdjustmentListener(this);
canvas.getScrollpane().getHorizontalScrollBar().addAdjustmentListener(this);