|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ucar.unidata.util.MemoryMonitor
public class MemoryMonitor
Class MemoryMonitor
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MemoryMonitor()
Default constructor |
|
MemoryMonitor(int percentThreshold)
Create a new MemoryMonitor |
|
| Method Summary | |
|---|---|
boolean |
getRunning()
Get whether we are running |
static void |
main(String[] args)
Test routine |
void |
run()
Run this monitor |
void |
runGC()
Run the GC and clear the cache |
protected void |
setInTheRed(boolean red)
Set whether we are in the red or not (above the threshold) |
void |
setLabelFont(Font f)
Set the label font |
void |
setRunning(boolean r)
Set whether we are running |
void |
stop()
Stop running |
void |
toggleRunning()
Toggle running |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryMonitor()
public MemoryMonitor(int percentThreshold)
percentThreshold - the percentage of use memory before
garbage collection is run| Method Detail |
|---|
public void toggleRunning()
public void setLabelFont(Font f)
f - the fontpublic void stop()
public void runGC()
protected void setInTheRed(boolean red)
red - public void run()
run in interface Runnablepublic void setRunning(boolean r)
r - true if we are runningpublic boolean getRunning()
public static void main(String[] args)
args - not used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||