Commit | Line | Data |
---|---|---|
fbd124dd | 1 | /******************************************************************************* |
57a2a5ca BH |
2 | * Copyright (c) 2011, 2013 Ericsson |
3 | * | |
fbd124dd BH |
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 | |
57a2a5ca | 8 | * |
fbd124dd BH |
9 | * Contributors: |
10 | * Bernd Hufmann - Initial API and implementation | |
e0752744 | 11 | * Francois Chouinard - Moved from LTTng to TMF |
fbd124dd | 12 | *******************************************************************************/ |
e0752744 FC |
13 | |
14 | package org.eclipse.linuxtools.tmf.ui.views.histogram; | |
15 | ||
16 | import org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel; | |
fbd124dd BH |
17 | |
18 | /** | |
b544077e | 19 | * Histogram data model interface. |
57a2a5ca | 20 | * |
b544077e BH |
21 | * @version 1.0 |
22 | * @author Bernd Hufmann | |
fbd124dd | 23 | */ |
fbd124dd BH |
24 | public interface IHistogramDataModel extends IBaseDistributionModel { |
25 | /** | |
26 | * Add event to the correct bucket, compacting the if needed. | |
57a2a5ca BH |
27 | * |
28 | * @param eventCount the event to count | |
fbd124dd BH |
29 | * @param timestamp the timestamp of the event to count |
30 | */ | |
57a2a5ca | 31 | void countEvent(long eventCount, long timestamp); |
fbd124dd BH |
32 | /** |
33 | * Scale the model data to the width, height and bar width requested. | |
b544077e BH |
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] | |
fbd124dd | 40 | */ |
57a2a5ca | 41 | HistogramScaledData scaleTo(int width, int height, int barWidth); |
e0752744 | 42 | |
fbd124dd | 43 | } |