tmf: Improve histogram responsiveness
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / IHistogramDataModel.java
1 /*******************************************************************************
2 * Copyright (c) 2011, 2012 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 * Francois Chouinard - Moved from LTTng to TMF
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.tmf.ui.views.histogram;
15
16 import org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel;
17
18 /**
19 * Histogram data model interface.
20 *
21 * @version 1.0
22 * @author Bernd Hufmann
23 */
24 public interface IHistogramDataModel extends IBaseDistributionModel {
25 /**
26 * Add event to the correct bucket, compacting the if needed.
27 *
28 * @param eventCount the event to count
29 * @param timestamp the timestamp of the event to count
30 */
31 public void countEvent(long eventCount, long timestamp);
32 /**
33 * Scale the model data to the width, height and bar width requested.
34 *
35 * @param width A width of the histogram canvas
36 * @param height A height of the histogram canvas
37 * @param barWidth A width (in pixel) of a histogram bar
38 * @return the result array of size [width] and where the highest value doesn't exceed [height]
39 * while considering the bar width [barWidth]
40 */
41 public HistogramScaledData scaleTo(int width, int height, int barWidth);
42
43 }
This page took 0.031957 seconds and 5 git commands to generate.