Class RunUntilPanel.TimeLong

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, AppearanceControl
Enclosing class:
RunUntilPanel<T extends Number & Comparable<T>>

public static class RunUntilPanel.TimeLong extends RunUntilPanel<Long>
RunUntilPanel for a long time. The time formatter and time display can be adjusted.

Copyright (c) 2020-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.

Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • TimeLong

      public TimeLong(SimulatorInterface<Long> simulator)
      Construct a clock panel with a long time.
      Parameters:
      simulator - SimulatorInterface<T>; the simulator
  • Method Details

    • formatSimulationTime

      protected String formatSimulationTime(Long simulationTime)
      Returns the formatted simulation time.
      Specified by:
      formatSimulationTime in class RunUntilPanel<Long>
      Parameters:
      simulationTime - T; simulation time
      Returns:
      formatted simulation time
    • parseSimulationTime

      protected Long parseSimulationTime(String simulationTimeString)
      Returns the simulation time from the formatted string.
      Specified by:
      parseSimulationTime in class RunUntilPanel<Long>
      Parameters:
      simulationTimeString - String; simulation time as a string
      Returns:
      T; simulation time contained in the String or null when not valid