use of org.jfree.data.time.Millisecond in project cubrid-manager by CUBRID.
the class StatusMonitorViewPart method addAvgObservation.
/**
* Adds the average value observation
*
* @param avg double[] all the all average value
*/
private void addAvgObservation(double[] avg) {
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(2);
nf.setMinimumFractionDigits(2);
nf.setGroupingUsed(false);
for (int i = 0; i < numChart; i++) {
String value = nf.format(avg[i]);
average[i].add(new Millisecond(), Double.valueOf(value));
avgTxt[i].setText(value);
}
}
use of org.jfree.data.time.Millisecond in project cubrid-manager by CUBRID.
the class StatusMonitorViewPart method addMinObservation.
/**
* Adds the minimum value observation
*
* @param dval int[]
*/
private void addMinObservation(int[] dval) {
for (int i = 0; i < numChart; i++) {
minimum[i].add(new Millisecond(), dval[i]);
minTxt[i].setText(Integer.toString(dval[i]));
}
}
use of org.jfree.data.time.Millisecond in project cubrid-manager by CUBRID.
the class ChartCompositePart method updateValueMap.
/**
* @param valueMap the valueMap to set
*/
public void updateValueMap(Map<String, String> valueMap) {
for (Map.Entry<String, String> entry : valueMap.entrySet()) {
if (this.valueMap.containsKey(entry.getKey())) {
this.valueMap.put(entry.getKey(), entry.getValue());
}
}
// this.valueMap = valueMap;
String[] arrays = this.valueMap.values().toArray(new String[this.valueMap.size()]);
String[] arrays2 = new String[arrays.length + 1];
arrays2[0] = "";
System.arraycopy(arrays, 0, arrays2, 1, arrays.length);
seriesTableViewer.getTable().getItem(0).setText(arrays2);
for (Map.Entry<String, String> entry : this.valueMap.entrySet()) {
int value = Integer.parseInt(entry.getValue());
seriesMap.get(entry.getKey()).addOrUpdate(new Millisecond(), value);
}
}
use of org.jfree.data.time.Millisecond in project cubrid-manager by CUBRID.
the class StatusMonitorViewPart method addCurrentObservation.
/**
* Adds the current value observation
*
* @param num int[] all the unit number to be observed
*/
private void addCurrentObservation(int[] num) {
for (int i = 0; i < numChart; i++) {
current[i].add(new Millisecond(), num[i]);
currentTxt[i].setText(Integer.toString(num[i]));
}
}
Aggregations