Class ISOMeter

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Runnable

public class ISOMeter extends JComponent implements Runnable
ISOMsgPanel Swing based GUI to ISOMsg
See Also:
  • Constructor Details

    • ISOMeter

      public ISOMeter(ISOChannelPanel parent)
      Constructs an ISOMeter for the given channel panel.
      Parameters:
      parent - the parent ISOChannelPanel
  • Method Details

    • start

      public void start()
      Starts the meter update thread.
    • showLogList

      public void showLogList()
      Shows the log list panel.
    • createLogList

      Creates and returns the log list component.
      Returns:
      the log list JComponent
    • setValue

      public void setValue(int val)
      Sets the current meter value.
      Parameters:
      val - the value to display
    • setScroll

      public void setScroll(boolean scroll)
      Sets whether the log list auto-scrolls.
      Parameters:
      scroll - if true, auto-scroll the log
    • setRefresh

      public void setRefresh(int refreshPanel)
      Sets the refresh interval in milliseconds.
      Parameters:
      refreshPanel - the refresh interval
    • setConnected

      public void setConnected(boolean connected)
      Sets whether the channel is connected.
      Parameters:
      connected - true if connected
    • setPositiveCounter

      public void setPositiveCounter(String s)
      Sets the positive counter display string.
      Parameters:
      s - the counter string
    • setNegativeCounter

      public void setNegativeCounter(String s)
      Sets the negative counter display string.
      Parameters:
      s - the counter string
    • setValue

      public void setValue(int val, String textString)
      Sets the meter value with a text label.
      Parameters:
      val - the numeric value
      textString - the display text
    • paint

      public void paint(Graphics g)
      Paints the meter component by rendering the off-screen buffer.
      Overrides:
      paint in class JComponent
      Parameters:
      g - the graphics context
    • getPreferredSize

      Returns the preferred size of this meter component.
      Overrides:
      getPreferredSize in class JComponent
      Returns:
      preferred dimensions
    • plot

      public void plot()
      Renders the meter display.
    • run

      public void run()
      Repaint loop run by the background thread; triggers repaints at the configured interval.
      Specified by:
      run in interface Runnable
    • update

      public void update(Graphics g)
      Updates the component by delegating to paint(Graphics).
      Overrides:
      update in class JComponent
      Parameters:
      g - the graphics context