org.apache.batik.util.gui

Class MemoryMonitor

public class MemoryMonitor extends JFrame implements ActionMap

This class contains a collection of components that can be used to track and display the memory usage.
Nested Class Summary
protected classMemoryMonitor.CloseButtonAction
The action associated with the 'Close' button of the memory monitor.
protected classMemoryMonitor.CollectButtonAction
The action associated with the 'Collect' button of the memory monitor.
static classMemoryMonitor.History
Displays the memory usage history in a chart.
interfaceMemoryMonitor.MemoryChangeListener
This interface allows the RepaintThread to notify an object that the current memory state has changed.
static classMemoryMonitor.Panel
A panel composed of a Usage instance and a History instance.
static classMemoryMonitor.RepaintThread
This thread repaints a list of components.
static classMemoryMonitor.Usage
Displays the current memory usage.
Field Summary
protected static ResourceBundlebundle
The resource bundle
protected Maplisteners
The map that contains the listeners
protected MemoryMonitor.Panelpanel
The Panel instance.
protected static ResourceManagerresources
The resource manager
protected static StringRESOURCE
The resource file name
Constructor Summary
MemoryMonitor()
Creates a new memory monitor frame.
MemoryMonitor(long time)
Creates a new memory monitor frame.
Method Summary
ActiongetAction(String key)
Returns the action associated with the given string or null on error

Field Detail

bundle

protected static ResourceBundle bundle
The resource bundle

listeners

protected Map listeners
The map that contains the listeners

panel

protected MemoryMonitor.Panel panel
The Panel instance.

resources

protected static ResourceManager resources
The resource manager

RESOURCE

protected static final String RESOURCE
The resource file name

Constructor Detail

MemoryMonitor

public MemoryMonitor()
Creates a new memory monitor frame. The time beetween two repaints is 1s.

MemoryMonitor

public MemoryMonitor(long time)
Creates a new memory monitor frame.

Parameters: time The time beetween two repaints in ms.

Method Detail

getAction

public Action getAction(String key)
Returns the action associated with the given string or null on error

Parameters: key the key mapped with the action to get

Throws: MissingListenerException if the action is not found

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.