Class Pan


  • public final class Pan
    extends AbstractConfigurationItem
    Base object to map pan options for ZoomPlugin.ID plugin configuration.
    It represents the container for PAN options.
    Author:
    Andrea "Stock" Stocchero
    • Field Detail

      • DEFAULT_ENABLED

        public static final boolean DEFAULT_ENABLED
        Default enabled, false.
        See Also:
        Constant Field Values
      • DEFAULT_THRESHOLD

        public static final double DEFAULT_THRESHOLD
        Default threshold, 10.0.
        See Also:
        Constant Field Values
    • Method Detail

      • setEnabled

        public final void setEnabled​(boolean enabled)
        Sets true to enable pan element.
        Parameters:
        enabled - true to enable pan element
      • isEnabled

        public final boolean isEnabled()
        Returns true to enable pan element.
        Returns:
        true to enable pan element
      • setModifierKey

        public void setModifierKey​(ModifierKey modifierKey)
        Sets the modifier key to activate panning.
        Parameters:
        modifierKey - the modifier key to activate panning
      • getModifierKey

        public ModifierKey getModifierKey()
        Returns the modifier key to activate panning.
        Returns:
        the modifier key to activate panning
      • setThreshold

        public void setThreshold​(double threshold)
        Sets the minimal pan distance required before actually applying pan.
        Parameters:
        threshold - the minimal pan distance required before actually applying pan
      • getThreshold

        public double getThreshold()
        Returns the minimal pan distance required before actually applying pan.
        Returns:
        the minimal pan distance required before actually applying pan
      • getMode

        public default Mode getMode()
        Returns the element (panning or zooming) directions.
        Returns:
        the element (panning or zooming) directions
      • getScaleMode

        public default Mode getScaleMode()
        Returns panning over a scale for that axis (regardless of mode).
        Returns:
        panning over a scale for that axis (regardless of mode).
      • getOverScaleMode

        public default Mode getOverScaleMode()
        Returns which of the enabled zooming directions should only be available when the mouse cursor is over one of scale.
        Returns:
        which of the enabled zooming directions should only be available when the mouse cursor is over one of scale
      • getModeCallback

        public default ModeCallback getModeCallback()
        Returns the element (panning or zooming) directions callback, to set the mode at runtime.
        Returns:
        the element (panning or zooming) directions callback
      • getScaleModeCallback

        public default ModeCallback getScaleModeCallback()
        Returns the element directions callback, to enable panning over a scale for that axis (regardless of mode).
        Returns:
        the element directions callback
      • getOverScaleModeCallback

        public default ModeCallback getOverScaleModeCallback()
        Returns the element (panning or zooming) directions callback, to set the mode at runtime, which of the enabled zooming directions should only be available when the mouse cursor is over one of scale
        Returns:
        the element (panning or zooming) directions callback
      • getProgressCallback

        public default ProgressCallback getProgressCallback()
        Returns the callback called while the user is zooming or panning.
        Returns:
        the callback called while the user is zooming or panning
      • getCompletedCallback

        public default CompletedCallback getCompletedCallback()
        Returns the callback called once zooming or panning is completed.
        Returns:
        the callback called once zooming or panning is completed
      • getRejectedCallback

        public default RejectedCallback getRejectedCallback()
        Returns the callback called once zooming or panning is rejected.
        Returns:
        the callback called once zooming or panning is rejected
      • getStartCallback

        public default StartCallback getStartCallback()
        Returns the callback called once zooming or panning is started.
        Returns:
        the callback called once zooming or panning is started