Class StepSelector


  • public class StepSelector
    extends java.lang.Object
    Chooses the next step from a list of steps given a current value (which may lie between steps) and a number of steps to move. An example use is a ZUI with both freeform and selectable preset zoom values (100%, 125%, etc.).
    Author:
    Chris
    • Constructor Summary

      Constructors 
      Constructor Description
      StepSelector​(double[] steps)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double select​(double fromNearestTo, int stepValue)  
      • Methods inherited from class java.lang.Object

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

      • StepSelector

        public StepSelector​(double[] steps)
    • Method Detail

      • select

        public double select​(double fromNearestTo,
                             int stepValue)