Class LinearZoomManager

  • All Implemented Interfaces:
    it.unibo.alchemist.boundary.ui.api.SlideInputManager , it.unibo.alchemist.boundary.ui.api.ZoomManager

    
    public final class LinearZoomManager
    extends AbstractSlideInputManager implements ZoomManager
                        

    A LinearZoomManager converts the sliding of any physical/virtual device/control into a zoom rate through a linear function. Zoom = amount of slides * rate.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      double getZoom() Gets the zoom rate.
      void setZoom(double z) Sets the zoom rate.
      • Methods inherited from class it.unibo.alchemist.boundary.ui.impl.AbstractSlideInputManager

        dec, inc
      • Methods inherited from class it.unibo.alchemist.boundary.ui.api.SlideInputManager

        dec, inc
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LinearZoomManager

        LinearZoomManager(double z)
        Same of LinearZoomManager but rate is 1, and minimum and maximum are +/- MAX_VALUE.
        Parameters:
        z - is the desired initial zoom
      • LinearZoomManager

        LinearZoomManager(double zoom, double rate, double min, double max)
        Initialize a new LinearZoomManager instance with the parameters in input.
        Parameters:
        zoom - is the desired initial zoom
        rate - is the linear factor
        min - minimum allowed zoom
        max - maximum allowed zoom
    • Method Detail

      • getZoom

         double getZoom()

        Gets the zoom rate.

        Returns:

        a double value representing the zoom rate

      • setZoom

         void setZoom(double z)

        Sets the zoom rate.