59 |
|
if(Configuration.getInstance().getProperty("displayExtraData").equals("1")) { |
60 |
|
_extraData = true; |
61 |
|
} |
62 |
– |
try { |
63 |
– |
_heartbeatTimer = new PacketTimer(Integer.parseInt(Configuration.getInstance().getProperty("Host.TCPUpdateTime"))); |
64 |
– |
_dataTimer = new PacketTimer(Integer.parseInt(Configuration.getInstance().getProperty("Host.UDPUpdateTime"))); |
65 |
– |
} catch (NumberFormatException e) { |
66 |
– |
throw new NumberFormatException("unable to obtain a valid value for Host.UDP/TCPUpdateTime"); |
67 |
– |
} |
68 |
– |
_east.add(_heartbeatTimer); |
69 |
– |
_west.add(_dataTimer); |
62 |
|
|
71 |
– |
add(_east, "East"); |
72 |
– |
add(_west, "West"); |
63 |
|
add(_center, "Center"); |
64 |
|
add(_north, "North"); |
65 |
< |
|
65 |
> |
|
66 |
|
addDataComponent(new StringDataComponent("Packet Type", "packet.attributes.type")); |
67 |
|
|
68 |
|
final StringDataComponent machineName = new StringDataComponent("Host Name", "packet.attributes.machine_name"); |
112 |
|
infoFrame.setVisible(true); |
113 |
|
} |
114 |
|
}); |
115 |
+ |
try { |
116 |
+ |
_heartbeatTimer = new PacketTimer("Next Heartbeat", Integer.parseInt(Configuration.getInstance().getProperty("Host.TCPUpdateTime"))); |
117 |
+ |
_dataTimer = new PacketTimer("Next Data", Integer.parseInt(Configuration.getInstance().getProperty("Host.UDPUpdateTime"))); |
118 |
+ |
} catch (NumberFormatException e) { |
119 |
+ |
throw new NumberFormatException("unable to obtain a valid value for Host.UDP/TCPUpdateTime"); |
120 |
+ |
} |
121 |
+ |
_north.setLayout(new BoxLayout(_north, BoxLayout.X_AXIS)); |
122 |
+ |
_north.add(_dataTimer); |
123 |
+ |
_north.add(Box.createGlue()); |
124 |
|
_north.add(info); |
125 |
+ |
_north.add(Box.createGlue()); |
126 |
+ |
_north.add(_heartbeatTimer); |
127 |
|
|
128 |
|
JPanel date = new JPanel(); |
129 |
|
addVisibleDataComponent(date, new DateDataComponent("Host Time", "packet.attributes.date")); |
397 |
|
private HashMap _components = new HashMap(); |
398 |
|
|
399 |
|
/** |
399 |
– |
* The east panel, currently used for the heartbeat timer. |
400 |
– |
*/ |
401 |
– |
private final JPanel _east = new JPanel(); |
402 |
– |
|
403 |
– |
/** |
400 |
|
* The north panel, currently used for the platform info button. |
401 |
|
*/ |
402 |
|
private final JPanel _north = new JPanel(); |
407 |
– |
|
408 |
– |
/** |
409 |
– |
* The west panel, currently used for the data timer. |
410 |
– |
*/ |
411 |
– |
private final JPanel _west = new JPanel(); |
403 |
|
|
404 |
|
/** |
405 |
|
* The centre panel, where all the data is displayed. |