Class MultiTracing

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public final class MultiTracing extends JFrame

An example that tests the ability of multithreaded use of a single Chart2D. Six different Threads are painting subsequently a single point to the chart and go to a sleep. After having painted the whole trace, each Thread sleeps for a random time, removes it's trace, sleeps for another random time and starts again.
To be true: the data for the TracePoint instances is computed a single time at startup.

This test may blow your CPU. I am currently working on an AMD Athlon 1200, 512 MB RAM so I did not get these problems.

Version:
$Revision: 1.13 $
Author:
Achim Westermann
See Also:
  • Field Details

    • m_chart

      protected Chart2D m_chart
      The chart to fill.
  • Constructor Details

    • MultiTracing

      public MultiTracing()
      Defcon.
  • Method Details

    • main

      public static void main(String[] args)
      Main entry.

      Parameters:
      args - ignored.
    • setForceXRange

      public void setForceXRange(Range forceXRange)
      Enforces to display a certain visible x range that will be expanded if traces in the chart have higher or lower values.

      Parameters:
      forceXRange - the range that at least has to be kept visible.
    • setForceYRange

      public void setForceYRange(Range forceYRange)
      Enforces to display a certain visible x range that will be expanded if traces in the chart have higher or lower values.

      Parameters:
      forceYRange - the range that at least has to be kept visible.