Commit | Line | Data |
---|---|---|
fbd124dd | 1 | /******************************************************************************* |
e0752744 | 2 | * Copyright (c) 2011, 2012 Ericsson |
fbd124dd BH |
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 | |
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 | /** | |
19 | * <b><u>IHistogramDataModel</u></b> | |
20 | * <p> | |
21 | */ | |
fbd124dd BH |
22 | |
23 | public interface IHistogramDataModel extends IBaseDistributionModel { | |
24 | /** | |
25 | * Add event to the correct bucket, compacting the if needed. | |
26 | * | |
0d9a6d76 | 27 | * @param eventCount the event to count |
fbd124dd BH |
28 | * @param timestamp the timestamp of the event to count |
29 | */ | |
30 | public void countEvent(long eventCount, long timestamp); | |
31 | ||
32 | /** | |
33 | * Scale the model data to the width, height and bar width requested. | |
34 | * | |
35 | * @param width | |
36 | * @param height | |
0d9a6d76 | 37 | * @param barWidth |
fbd124dd BH |
38 | * @return the result array of size [width] and where the highest value |
39 | * doesn't exceed [height] considering the bar width [barWidth] | |
40 | */ | |
41 | public HistogramScaledData scaleTo(int width, int height, int barWidth); | |
e0752744 | 42 | |
fbd124dd | 43 | } |