|
|||||||||
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
uk.ac.starlink.util.gui.MemoryMonitor
public class MemoryMonitor
Component which displays JVM memory usage.
Clicking on it will call System.gc()
.
Nested Class Summary |
---|
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()
Constructor. |
Method Summary | |
---|---|
Color[] |
getColors()
Returns the colour scheme. |
boolean |
getReverse()
Returns whether bar movement is in the opposite sense. |
boolean |
getShowText()
Returns whether text is being displayed. |
String |
getText()
Returns the text which is painted onto this component. |
Timer |
getTimer()
Returns the timer which performs regular repaints of this component. |
boolean |
getVertical()
Returns the orientation of this component. |
void |
paintComponent(Graphics g)
|
void |
setColors(Color maxColor,
Color totalColor,
Color usedColor)
Set the colour scheme. |
void |
setReverse(boolean reverse)
Sets bar movement to the opposite sense. |
void |
setShowText(boolean showText)
Sets whether the text should be displayed. |
void |
setVertical(boolean vertical)
Sets the orientation for this component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryMonitor()
Method Detail |
---|
public Timer getTimer()
public void setVertical(boolean vertical)
vertical
- true for vertical movement of barspublic boolean getVertical()
public void setReverse(boolean reverse)
true
- to set the zero level to the non-default endpublic boolean getReverse()
public void setShowText(boolean showText)
showText
- true to display the result of getText()
public boolean getShowText()
getText()
is being displayedpublic void setColors(Color maxColor, Color totalColor, Color usedColor)
maxColor
- colour for max memory bartotalColor
- colour for total memory barusedColor
- colour for used memory barpublic Color[] getColors()
public void paintComponent(Graphics g)
paintComponent
in class JComponent
public String getText()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |