/*****************************************************************************
- * Copyright (c) 2007, 2013 Intel Corporation, Ericsson.
+ * Copyright (c) 2007, 2014 Intel Corporation, Ericsson
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Intel Corporation - Initial API and implementation
* Ruslan A. Scherbakov, Intel - Initial API and implementation
* Alvaro Sanchez-Leon - Updated for TMF
- * Patrick Tasse - Refactoring
+ * Geneviève Bastien - Added methods to save a time range selection
+ * Patrick Tasse - Refactoring, support for range selection
*****************************************************************************/
package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;
public interface ITimeDataProvider {
/**
- * @return The selected time
+ * Updates the selection begin and end time and notifies any registered
+ * listeners about the new time range (if necessary)
+ *
+ * @param beginTime the selection begin time
+ * @param endTime the selection end time
+ * @since 3.0
+ */
+ void setSelectionRangeNotify(long beginTime, long endTime);
+
+ /**
+ * Updates the selection begin and end time
+ *
+ * @param beginTime the selection begin time
+ * @param endTime the selection end time
+ * @since 3.0
+ */
+ void setSelectionRange(long beginTime, long endTime);
+
+ /**
+ * @return The begin time of the current selection
+ * @since 3.0
+ */
+ long getSelectionBegin();
+
+ /**
+ * @return The end time of the current selection
+ * @since 3.0
*/
- long getSelectedTime();
+ long getSelectionEnd();
/**
* @return The beginning time
* Ensure visibility of new time (will adjust time range if
* necessary)
*/
- public void setSelectedTimeNotify(long time, boolean ensureVisible);
+ void setSelectedTimeNotify(long time, boolean ensureVisible);
/**
* Updates the selected time and adjusts the time range if necessary without
* Ensure visibility of new time (will adjust time range if
* necessary)
*/
- public void setSelectedTime(long time, boolean ensureVisible);
+ void setSelectedTime(long time, boolean ensureVisible);
/**
* Reset the start and end times