ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / IHistogramDataModel.java
1 /*******************************************************************************
2 * Copyright (c) 2011, 2013 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 * Xavier Raynaud - Support multi-trace coloring
13 *******************************************************************************/
14
15 package org.eclipse.linuxtools.tmf.ui.views.histogram;
16
17 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
18 import org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel;
19
20 /**
21 * Histogram data model interface.
22 *
23 * @version 1.0
24 * @author Bernd Hufmann
25 */
26 public interface IHistogramDataModel extends IBaseDistributionModel {
27 /**
28 * Add event to the correct bucket, compacting the if needed.
29 *
30 * @param eventCount the event to count
31 * @param timestamp the timestamp of the event to count
32 * @param trace the trace corresponding to given events
33 * @since 3.0
34 */
35 void countEvent(long eventCount, long timestamp, ITmfTrace trace);
36
37 /**
38 * Scale the model data to the width, height and bar width requested.
39 *
40 * @param width A width of the histogram canvas
41 * @param height A height of the histogram canvas
42 * @param barWidth A width (in pixel) of a histogram bar
43 * @return the result array of size [width] and where the highest value doesn't exceed [height]
44 * while considering the bar width [barWidth]
45 */
46 HistogramScaledData scaleTo(int width, int height, int barWidth);
47
48 }
This page took 0.03471 seconds and 5 git commands to generate.