Class MouseWheelZoomTool

  • All Implemented Interfaces:
    MenuContributor

    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.
        Overrides:
        handleMouseWheelMoved in class Tool
        Parameters:
        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.
        Overrides:
        getDispatchPriority in class Tool
        Returns:
        the dispatch priority