org.jboss.seam.cron.examples.swinggrapher
Class SwingGrapher

java.lang.Object
  extended by org.jboss.seam.cron.examples.swinggrapher.SwingGrapher

@ApplicationScoped
public class SwingGrapher
extends Object

Author:
Peter Royle

Field Summary
static String FREE_MEMORY_LABEL
          The label for the Free Memory axis.
 
Constructor Summary
SwingGrapher()
           
 
Method Summary
 void clearGraphData(Trigger e)
          Clear the graph every 2 minutes, at 20 seconds past the minute.
 void collectGarbage(Trigger minute)
          Called every minute to request garbage collection.
 org.jfree.data.category.DefaultCategoryDataset getCatDataSet()
           
 void updateChart(Trigger second)
          Called every second to update the graph data and repaint the graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FREE_MEMORY_LABEL

public static final String FREE_MEMORY_LABEL
The label for the Free Memory axis.

See Also:
Constant Field Values
Constructor Detail

SwingGrapher

public SwingGrapher()
Method Detail

getCatDataSet

@Produces
public org.jfree.data.category.DefaultCategoryDataset getCatDataSet()
Returns:
the dataset used by the graph.

updateChart

public void updateChart(@Observes
                        Trigger second)
Called every second to update the graph data and repaint the graph.

Parameters:
second - The observed event.

collectGarbage

public void collectGarbage(@Observes
                           Trigger minute)
Called every minute to request garbage collection.

Parameters:
second - The observed event.

clearGraphData

public void clearGraphData(@Observes
                           Trigger e)
Clear the graph every 2 minutes, at 20 seconds past the minute.

Parameters:
e - The event observed.


Copyright © 2011 Seam Framework. All Rights Reserved.