/** * Set the current cursor tool * * @param tool the tool to set; null means no active cursor tool */ public void setCursorTool(CursorTool tool) { if (tool == null) { toolManager.setNoCursorTool(); this.setCursor(CursorManager.getInstance().getArrowCursor()); toolCanDraw = false; toolCanMove = false; } else { this.setCursor(tool.getCursor()); toolManager.setCursorTool(tool); toolCanDraw = tool.canDraw(); toolCanMove = tool.canMove(); } }
/** * Constructs a new zoom out tool. To activate the tool only on certain mouse events provide a * single mask, e.g. {@link SWT#BUTTON1}, or a combination of multiple SWT-masks. * * @param triggerButtonMask Mouse button which triggers the tool's activation or {@value * #ANY_BUTTON} if the tool is to be triggered by any button */ public ZoomOutTool(int triggerButtonMask) { super(triggerButtonMask); cursor = CursorManager.getInstance().getZoomoutCursor(); }