Class Stopwatch.StopwatchPanel

    • Field Detail

      • m_Owner

        protected Stopwatch m_Owner
        the owning Stopwatch actor.
      • m_LabelTime

        protected JLabel m_LabelTime
        the label for displaying the time.
      • m_StartTime

        protected long m_StartTime
        the start time.
    • Constructor Detail

      • StopwatchPanel

        public StopwatchPanel​(Stopwatch owner)
        Initializes the panel.
        Parameters:
        owner - the owning Stopwatch actor
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • getOwner

        public Stopwatch getOwner()
        Returns the owning actor.
        Returns:
        the actor
      • setTimeFont

        public void setTimeFont​(Font value)
        Sets the font for the time display.
        Parameters:
        value - the font to use
      • getTimeFont

        public Font getTimeFont()
        Returns the font of the time display.
        Returns:
        the font in use
      • updateTime

        public void updateTime​(long time)
        Updates the time display with the given time
      • getStartTime

        public long getStartTime()
        Returns the start time of the timer.
        Returns:
        the start time in msecs
        See Also:
        System.currentTimeMillis()
      • startTimer

        public void startTimer()
        Starts the timer.
      • stopTimer

        public void stopTimer()
        Stops the timer.
      • resetTimer

        public void resetTimer()
        Resets the timer.