Class Graph

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

public class Graph extends JComponent implements Scrollable, Clearable
Implements a simple graph for displaying performance results.
See Also:
  • Constructor Details

    • Graph

      public Graph()
      Constructor for the Graph object.
    • Graph

      public Graph(CachingStatCalculator model)
      Constructor for the Graph object.
      Parameters:
      model - The container for samples and statistics
  • Method Details

    • getPreferredScrollableViewportSize

      public Dimension getPreferredScrollableViewportSize()
      Gets the PreferredScrollableViewportSize attribute of the Graph object.
      Specified by:
      getPreferredScrollableViewportSize in interface Scrollable
      Returns:
      the PreferredScrollableViewportSize value
    • getScrollableUnitIncrement

      public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
      Gets the ScrollableUnitIncrement attribute of the Graph object.
      Specified by:
      getScrollableUnitIncrement in interface Scrollable
      Returns:
      the ScrollableUnitIncrement value
    • getScrollableBlockIncrement

      public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
      Gets the ScrollableBlockIncrement attribute of the Graph object.
      Specified by:
      getScrollableBlockIncrement in interface Scrollable
      Returns:
      the ScrollableBlockIncrement value
    • getScrollableTracksViewportWidth

      public boolean getScrollableTracksViewportWidth()
      Gets the ScrollableTracksViewportWidth attribute of the Graph object.
      Specified by:
      getScrollableTracksViewportWidth in interface Scrollable
      Returns:
      the ScrollableTracksViewportWidth value
    • getScrollableTracksViewportHeight

      public boolean getScrollableTracksViewportHeight()
      Gets the ScrollableTracksViewportHeight attribute of the Graph object.
      Specified by:
      getScrollableTracksViewportHeight in interface Scrollable
      Returns:
      the ScrollableTracksViewportHeight value
    • clearData

      public void clearData()
      Clears this graph.
      Specified by:
      clearData in interface Clearable
    • enableData

      public void enableData(boolean value)
    • enableAverage

      public void enableAverage(boolean value)
    • enableMedian

      public void enableMedian(boolean value)
    • enableDeviation

      public void enableDeviation(boolean value)
    • enableThroughput

      public void enableThroughput(boolean value)
    • updateGui

      public void updateGui(Sample oneSample)
    • paintComponent

      public void paintComponent(Graphics g)
      }
      Overrides:
      paintComponent in class JComponent
    • getGraphMax

      public long getGraphMax()
      Returns:
      Returns the graphMax.