Class OTSControlPanel.ClockLabel

    • Constructor Detail

      • ClockLabel

        ClockLabel​(JLabel speedLabel)
        Construct a clock panel.
        Parameters:
        speedLabel - JLabel; speed label
    • Method Detail

      • cancelTimer

        public void cancelTimer()
        Cancel the timer task.
      • getSpeedLabel

        protected JLabel getSpeedLabel()
        Returns:
        speedLabel.
      • getSpeed

        protected double getSpeed​(double t)
        Returns the simulation speed.
        Parameters:
        t - double; simulation time
        Returns:
        simulation speed
      • isForeground

        public boolean isForeground()
        Returns whether this item has a controllable foreground.
        Specified by:
        isForeground in interface AppearanceControl
        Returns:
        whether this item has a controllable foreground