1 /*******************************************************************************
2 * Copyright (c) 2011, 2012 Ericsson
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
10 * Francois Chouinard - Initial API and implementation
11 * Bernd Hufmann - Changed to updated histogram data model
12 * Francois Chouinard - Moved from LTTng to TMF
13 *******************************************************************************/
15 package org
.eclipse
.linuxtools
.tmf
.ui
.views
.histogram
;
17 import org
.eclipse
.swt
.widgets
.Composite
;
20 * <b><u>TimeRangeHistogram</u></b>
22 * A basic histogram with the following additional features:
24 * <li>zoom in: mouse wheel up (or forward)
25 * <li>zoom out: mouse wheel down (or backward)
28 public class TimeRangeHistogram
extends Histogram
{
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
34 HistogramZoom fZoom
= null;
36 // ------------------------------------------------------------------------
38 // ------------------------------------------------------------------------
40 public TimeRangeHistogram(HistogramView view
, Composite parent
) {
42 fZoom
= new HistogramZoom(this, fCanvas
, getStartTime(), getTimeLimit());
45 // ------------------------------------------------------------------------
47 // ------------------------------------------------------------------------
50 public void updateTimeRange(long startTime
, long endTime
) {
51 ((HistogramView
) fParentView
).updateTimeRange(startTime
, endTime
);
55 public synchronized void clear() {
61 public synchronized void setTimeRange(long startTime
, long duration
) {
62 fZoom
.setNewRange(startTime
, duration
);
66 public void setFullRange(long startTime
, long endTime
) {
67 long currentFirstEvent
= getStartTime();
68 fZoom
.setFullRange((currentFirstEvent
== 0) ? startTime
: currentFirstEvent
, endTime
);
This page took 0.033625 seconds and 6 git commands to generate.