Class MemoryMonitor

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Runnable, Accessible, Removable
Direct Known Subclasses:
MemoryMonitor

public class MemoryMonitor extends JPanel implements Runnable, Removable
Class MemoryMonitor
Author:
Unidata development team
See Also:
  • Constructor Details

    • MemoryMonitor

      public MemoryMonitor()
      Default constructor
    • MemoryMonitor

      public MemoryMonitor(int percentThreshold)
      Create a new MemoryMonitor
      Parameters:
      percentThreshold - the percentage of use memory before garbage collection is run
    • MemoryMonitor

      public MemoryMonitor(int percentThreshold, boolean showTheClock)
      _more_
      Parameters:
      percentThreshold - _more_
      showTheClock - _more_
  • Method Details

    • doRemove

      public void doRemove()
      _more_
      Specified by:
      doRemove in interface Removable
    • toggleRunning

      public void toggleRunning()
      Toggle running
    • setLabelFont

      public void setLabelFont(Font f)
      Set the label font
      Parameters:
      f - the font
    • stop

      public void stop()
      Stop running
    • clearCache

      public void clearCache()
      Clear the cache
    • setInTheRed

      protected void setInTheRed(boolean red)
      Set whether we are in the red or not (above the threshold)
      Parameters:
      red -
    • run

      public void run()
      Run this monitor
      Specified by:
      run in interface Runnable
    • setRunning

      public void setRunning(boolean r)
      Set whether we are running
      Parameters:
      r - true if we are running
    • getRunning

      public boolean getRunning()
      Get whether we are running
      Returns:
      true if we are
    • main

      public static void main(String[] args)
      Test routine
      Parameters:
      args - not used