Commit | Line | Data |
---|---|---|
fbd124dd BH |
1 | /******************************************************************************* |
2 | * Copyright (c) 2011 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 | *******************************************************************************/ | |
12 | package org.eclipse.linuxtools.lttng.ui.views.latency.model; | |
13 | ||
e0752744 | 14 | import org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel; |
fbd124dd BH |
15 | |
16 | /** | |
17 | * <b><u>IGraphDataModel</u></b> | |
18 | * <p> | |
19 | */ | |
20 | public interface IGraphDataModel extends IBaseDistributionModel { | |
21 | ||
22 | /** | |
23 | * Add event to the correct bucket, compacting the if needed. | |
24 | * | |
25 | * @param eventCount - the event count | |
26 | * @param timestamp - the timestamp (x-coordinate) of the event to count | |
27 | * @param time - the time (y-coordinate) of the event to count | |
28 | */ | |
29 | public void countEvent(int eventCount, long timestamp, long time); | |
30 | ||
31 | /** | |
32 | * Scale the model data to the width and height requested. | |
33 | * | |
34 | * @param width - width of graph | |
35 | * @param height - height of graph | |
36 | * @param barWidth - width of bar | |
37 | * @return the result array of size [width] and where the highest value | |
38 | * doesn't exceed [height] | |
39 | */ | |
40 | public GraphScaledData scaleTo(int width, int height, int barWidth); | |
41 | } |