Class DistributionGraph

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

    public class DistributionGraph
    extends JComponent
    implements Scrollable, Clearable
    New graph for drawing distribution graph of the results. It is intended as a way to view the data after the stress has been performed. Although it can be used at runtime, it is not recommended, since it is rather intensive. The graph will draw a red line at 90% and an orange line at 50%. I like distribution graphs because they allow me to see how the data clumps. In general, the data will tend to clump in predictable ways when the application is well designed and implemented. Data that generates erratic graphs are generally not desirable.
    See Also:
    Serialized Form
    • Constructor Detail

      • DistributionGraph

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

        public DistributionGraph​(SamplingStatCalculator model)
        Constructor for the Graph object.
        Parameters:
        model - The container for the aggregated sample data
    • Method Detail

      • 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
      • 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
      • clearData

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

        public void paintComponent​(Graphics g)
        Method is responsible for calling drawSample and updating the graph.
        Overrides:
        paintComponent in class JComponent