TMF: Consolidate some view code into the AbstractTimeGraphView
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / widgets / timegraph / widgets / ITmfTimeGraphDrawingHelper.java
1 /*******************************************************************************
2 * Copyright (c) 2013 École Polytechnique de Montréal
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 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;
14
15 /**
16 * This interface provides functions to convert a model element to a drawing
17 * element and vice versa.
18 *
19 * Views who implement this interface allow access to some model-to-canvas and
20 * vice-versa functions without having to expose their full functionnalities.
21 *
22 * @author gbastien
23 * @since 2.1
24 */
25 public interface ITmfTimeGraphDrawingHelper {
26
27 /**
28 * Return the x coordinate corresponding to a time
29 *
30 * @param time
31 * the time
32 * @return the x coordinate corresponding to the time
33 */
34 int getXForTime(long time);
35
36 /**
37 * Return the time corresponding to an x coordinate
38 *
39 * @param x
40 * the x coordinate
41 * @return the time corresponding to the x coordinate
42 */
43 long getTimeAtX(int x);
44 }
This page took 0.034026 seconds and 5 git commands to generate.