Class MonitorGraph

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Clearable, MonitorGuiListener

public class MonitorGraph extends JComponent implements MonitorGuiListener, Clearable
MonitorGraph will draw the performance history of a given server. It displays 4 lines:
See Also:
  • Constructor Details

    • MonitorGraph

      @Deprecated public MonitorGraph()
      Deprecated.
      Only for use in unit testing
      Needed for Serialization tests.
    • MonitorGraph

      public MonitorGraph(MonitorAccumModel model)
  • Method Details

    • setHealth

      public void setHealth(boolean health)
    • setLoad

      public void setLoad(boolean load)
    • setMem

      public void setMem(boolean mem)
    • setThread

      public void setThread(boolean thread)
    • updateGui

      public void updateGui(MonitorModel model)
      The method will first check to see if the graph is visible. If it is, it will repaint the graph.
      Specified by:
      updateGui in interface MonitorGuiListener
    • paintComponent

      public void paintComponent(Graphics g)
      painComponent is responsible for drawing the actual graph. This is because of how screen works. Tried to use clipping, but I don't understand it well enough to get the desired effect.
      Overrides:
      paintComponent in class JComponent
    • updateGui

      public void updateGui()
      updateGui() will call repaint
      Specified by:
      updateGui in interface MonitorGuiListener
    • clearData

      public void clearData()
      clear will repaint the graph
      Specified by:
      clearData in interface Clearable