Class OTSControlPanel.TimeWarpPanel

    • Constructor Detail

      • TimeWarpPanel

        TimeWarpPanel​(double minimum,
                      double maximum,
                      double initialValue,
                      int ticksPerDecade,
                      org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator)
        Construct a new TimeWarpPanel.
        Parameters:
        minimum - double; the minimum value on the scale (the displayed scale may extend a little further than this value)
        maximum - double; the maximum value on the scale (the displayed scale may extend a little further than this value)
        initialValue - double; the initially selected value on the scale
        ticksPerDecade - int; the number of steps per decade
        simulator - DEVSSimulatorInterface<?, ?, ?>; the simulator to change the speed of
    • Method Detail

      • getTickValues

        protected Map<Integer,​Double> getTickValues()
        Access to tickValues map from within the event handler.
        Returns:
        Map<Integer, Double> the tickValues map of this TimeWarpPanel
      • getFactor

        public final double getFactor()
        Retrieve the current TimeWarp factor.
        Returns:
        double; the current TimeWarp factor
      • setSpeedFactor

        public void setSpeedFactor​(double factor)
        Set the time warp factor to the best possible approximation of a given value.
        Parameters:
        factor - double; the requested speed factor