150 |
|
|
151 |
|
// theses next two are DataComponents, but not VisibleDataComponents |
152 |
|
// this is because they hold the value but do NOT display it |
153 |
< |
MemoryTotalDataComponent totalMem = new MemoryTotalDataComponent("Total Memory", "packet.memory.total"); |
153 |
> |
StorageTotalDataComponent totalMem = new StorageTotalDataComponent("Total Memory", "packet.memory.total"); |
154 |
|
addDataComponent(totalMem); |
155 |
< |
MemoryTotalDataComponent totalSwap = new MemoryTotalDataComponent("Total Swap", "packet.swap.total"); |
155 |
> |
StorageTotalDataComponent totalSwap = new StorageTotalDataComponent("Total Swap", "packet.swap.total"); |
156 |
|
addDataComponent(totalSwap); |
157 |
|
|
158 |
|
_center.add(new javax.swing.JLabel("--- Memory ---")); |
160 |
|
// these next two are passed the non-visible datacomponents |
161 |
|
JPanel memory = new JPanel(); |
162 |
|
memory.setLayout(new BoxLayout(memory, BoxLayout.Y_AXIS)); |
163 |
< |
addVisibleDataComponent(memory, new MemoryFreeDataComponent("Memory in use", "packet.memory.free", totalMem)); |
164 |
< |
addVisibleDataComponent(memory, new MemoryFreeDataComponent("Swap in use", "packet.swap.free", totalSwap)); |
163 |
> |
addVisibleDataComponent(memory, new StorageFreeDataComponent("Memory in use", "packet.memory.free","Mb", totalMem)); |
164 |
> |
addVisibleDataComponent(memory, new StorageFreeDataComponent("Swap in use", "packet.swap.free", "Mb", totalSwap)); |
165 |
|
_center.add(memory); |
166 |
|
_center.add(new javax.swing.JLabel("--- Users ---")); |
167 |
|
addVisibleDataComponent(_center, new StringDataComponent("Number of users", "packet.users.count")); |
168 |
|
UsersDataComponent users = new UsersDataComponent("User List", "packet.users.list"); |
169 |
|
addVisibleDataComponent(_center, users); |
170 |
|
|
171 |
+ |
_center.add(new javax.swing.JLabel("--- Disks ---")); |
172 |
+ |
_disks = new JPanel(); |
173 |
+ |
_disks.setLayout(new BoxLayout(_disks, BoxLayout.Y_AXIS)); |
174 |
+ |
_center.add(_disks); |
175 |
+ |
|
176 |
|
// everything else we get is "extra", but we still want to display it |
177 |
|
_center.add(new javax.swing.JLabel("--- Extra Data ---")); |
178 |
|
} |
221 |
|
// if there are no components looking after this data |
222 |
|
// create a new StringDataComponent for it |
223 |
|
if(!_components.containsKey(dataKey)) { |
224 |
+ |
|
225 |
+ |
|
226 |
|
addVisibleDataComponent(_center, new StringDataComponent(dataKey, dataKey)); |
227 |
|
} |
228 |
|
|
310 |
|
private Thread _heartbeatTimerThread = null; |
311 |
|
private Thread _dataTimerThread = null; |
312 |
|
private final String _hostName; |
313 |
+ |
private final JPanel _disks; |
314 |
+ |
|
315 |
|
//---STATIC ATTRIBUTES--- |
316 |
|
|
317 |
|
} |