Class MouseWheelZoomTool

  • All Implemented Interfaces:

    public class MouseWheelZoomTool
    extends Tool
    Advanced MouseWheelZoom with better algorithm. Zooms in/out when the mouse wheel is rotated and the CTRL or ALT button is pressed. The zoom factor is multiplied with 1.45 for each rotation.
    • Constructor Detail

      • MouseWheelZoomTool

        public MouseWheelZoomTool()
    • Method Detail

      • handleMouseWheelMoved

        protected void handleMouseWheelMoved​(MouseWheelEditEvent e,
                                             boolean isActive)
        Description copied from class: Tool
        Invoked when the mouse wheel is rotated.
        handleMouseWheelMoved in class Tool
        e - the MouseEditEvent
        isActive - whether this tool is currently active
      • getDispatchPriority

        protected int getDispatchPriority()
        Description copied from class: Tool
        Return the dispatch priority for this tool. Tools with higher dispatch priorities receive events earlier than tools with lower priorities. The priority should be in the range Tool.MIN_PRIORITY...Tool.MAX_PRIORITY. The default priority is equal to Tool.MAX_PRIORITY minus the render priority.
        getDispatchPriority in class Tool
        the dispatch priority