Search in sources :

Example 6 with Millisecond

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);
    }
}
Also used : Millisecond(org.jfree.data.time.Millisecond) NumberFormat(java.text.NumberFormat)

Example 7 with Millisecond

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]));
    }
}
Also used : Millisecond(org.jfree.data.time.Millisecond)

Example 8 with Millisecond

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);
    }
}
Also used : Millisecond(org.jfree.data.time.Millisecond) Map(java.util.Map) TreeMap(java.util.TreeMap)

Example 9 with Millisecond

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]));
    }
}
Also used : Millisecond(org.jfree.data.time.Millisecond)

Aggregations

Millisecond (org.jfree.data.time.Millisecond)9 IOException (java.io.IOException)2 Date (java.util.Date)2 RegularTimePeriod (org.jfree.data.time.RegularTimePeriod)2 TimeSeries (org.jfree.data.time.TimeSeries)2 TimeSeriesCollection (org.jfree.data.time.TimeSeriesCollection)2 Row (com.linkedin.thirdeye.client.comparison.Row)1 Metric (com.linkedin.thirdeye.client.comparison.Row.Metric)1 BufferedReader (java.io.BufferedReader)1 FileReader (java.io.FileReader)1 Date (java.sql.Date)1 NumberFormat (java.text.NumberFormat)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 JFreeChart (org.jfree.chart.JFreeChart)1