org.apache.batik.util.gui
public static class MemoryMonitor.Usage extends JPanel implements MemoryMonitor.MemoryChangeListener
Field Summary | |
---|---|
protected static int | BLOCKS
The number of blocks. |
protected static double | BLOCK_HEIGHT
The blocks height. |
protected static int | BLOCK_MARGIN
The blocks margin. |
protected static int[] | BLOCK_TYPE
The blocks type. |
protected static double | BLOCK_WIDTH
The blocks width. |
protected Font | font
The font used to draw the strings. |
protected Color[] | freeColors
The color of the free blocks for each block type. |
protected long | freeMemory
The free memory. |
protected static int | FONT_SIZE
The font size. |
protected static boolean | POSTFIX
The text position. |
static int | PREFERRED_HEIGHT
The preferred height. |
static int | PREFERRED_WIDTH
The preferred width. |
protected Color | textColor
The text color. |
protected long | totalMemory
The total memory. |
protected static String | TOTAL
The total string. |
protected Color[] | usedColors
The color of the used blocks for each block type. |
protected static String | UNITS
The units string. |
protected static String | USED
The used string. |
Constructor Summary | |
---|---|
Usage()
Creates a new Usage object. |
Method Summary | |
---|---|
void | memoryStateChanged(long total, long free)
Indicates that the memory state has changed. |
protected void | paintComponent(Graphics g)
To paint the component. |
void | setHighFreeMemoryColor(Color c)
Sets the high free memory block color. |
void | setHighUsedMemoryColor(Color c)
Sets the high used memory block color. |
void | setLowFreeMemoryColor(Color c)
Sets the low free memory block color. |
void | setLowUsedMemoryColor(Color c)
Sets the low used memory block color. |
void | setMediumFreeMemoryColor(Color c)
Sets the medium free memory block color. |
void | setMediumUsedMemoryColor(Color c)
Sets the medium used memory block color. |
void | setTextColor(Color c)
Sets the text color. |
Parameters: total The total amount of memory. free The free memory.