systeminformationmonitor.swing.model
Class CpuMonitorModel

java.lang.Object
  extended by systeminformationmonitor.swing.model.CpuMonitorModel
All Implemented Interfaces:
Monitor

public class CpuMonitorModel
extends java.lang.Object
implements Monitor

Cpu Model which binds a JFreeChart and CategoryDataset. This class is responsible for updating the categoryDataset and JFreeChart.


Constructor Summary
CpuMonitorModel(org.jfree.chart.JFreeChart chart, org.jfree.data.category.DefaultCategoryDataset dataset)
          Constructor which binds a chart to a dataset which monitors all the cpus on the system.
CpuMonitorModel(org.jfree.chart.JFreeChart chart, org.jfree.data.category.DefaultCategoryDataset dataset, int series)
          Constructor which binds a chart to a dataset which monitors a specific cpu series.
 
Method Summary
 void initialize()
          Method called with this classes is added to CpuProcess.
 void update()
          Method called everytime the CpuProcess classes gets updated Cpu information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CpuMonitorModel

public CpuMonitorModel(org.jfree.chart.JFreeChart chart,
                       org.jfree.data.category.DefaultCategoryDataset dataset)
Constructor which binds a chart to a dataset which monitors all the cpus on the system.

Parameters:
chart - JFreeChart to bind to.
dataset - Dataset to bind to.

CpuMonitorModel

public CpuMonitorModel(org.jfree.chart.JFreeChart chart,
                       org.jfree.data.category.DefaultCategoryDataset dataset,
                       int series)
Constructor which binds a chart to a dataset which monitors a specific cpu series.

Parameters:
chart - JFreeChart to bind to.
dataset - Dataset to bind to.
series - Cpu series to monitor.
Method Detail

initialize

public void initialize()
Description copied from interface: Monitor
Method called with this classes is added to CpuProcess.

Specified by:
initialize in interface Monitor

update

public void update()
Description copied from interface: Monitor
Method called everytime the CpuProcess classes gets updated Cpu information.

Specified by:
update in interface Monitor