Class LensMagnificationGraphMousePlugin

  • All Implemented Interfaces:
    GraphMousePlugin, java.awt.event.MouseWheelListener, java.util.EventListener

    public class LensMagnificationGraphMousePlugin
    extends AbstractGraphMousePlugin
    implements java.awt.event.MouseWheelListener
    HyperbolicMagnificationGraphMousePlugin changes the magnification within the Hyperbolic projection of the HyperbolicTransformer.
    Author:
    Tom Nelson
    • Field Detail

      • floor

        protected final float floor
      • ceiling

        protected final float ceiling
      • delta

        protected final float delta
    • Constructor Detail

      • LensMagnificationGraphMousePlugin

        public LensMagnificationGraphMousePlugin()
        Creates an instance with modifier of CTRL_MASK, and default min/max/delta zoom values of 1/4/0.2.
      • LensMagnificationGraphMousePlugin

        public LensMagnificationGraphMousePlugin​(float floor,
                                                 float ceiling,
                                                 float delta)
        Creates an instance with modifier of CTRL_MASK, and the specified zoom parameters.
        Parameters:
        floor - the minimum zoom value
        ceiling - the maximum zoom value
        delta - the change in zoom value caused by each mouse event
      • LensMagnificationGraphMousePlugin

        public LensMagnificationGraphMousePlugin​(int modifiers)
        Creates an instance with the specified modifiers and the default min/max/delta zoom values of 1/4/0.2.
        Parameters:
        modifiers - the mouse event modifiers to specify
      • LensMagnificationGraphMousePlugin

        public LensMagnificationGraphMousePlugin​(int modifiers,
                                                 float floor,
                                                 float ceiling,
                                                 float delta)
        Creates an instance with the specified mouse event modifiers and zoom parameters.
        Parameters:
        modifiers - the mouse event modifiers to specify
        floor - the minimum zoom value
        ceiling - the maximum zoom value
        delta - the change in zoom value caused by each mouse event
    • Method Detail

      • checkModifiers

        public boolean checkModifiers​(java.awt.event.MouseEvent e)
        override to check equality with a mask
        Specified by:
        checkModifiers in interface GraphMousePlugin
        Overrides:
        checkModifiers in class AbstractGraphMousePlugin
        Parameters:
        e - an event to compare to
        Returns:
        whether the member modifiers match the event modifiers
      • mouseWheelMoved

        public void mouseWheelMoved​(java.awt.event.MouseWheelEvent e)
        zoom the display in or out, depending on the direction of the mouse wheel motion.
        Specified by:
        mouseWheelMoved in interface java.awt.event.MouseWheelListener