1 /*******************************************************************************
2 * Copyright (c) 2009, 2014 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 * Patrick Tasse - Deprecate current time
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.tmf
.core
.signal
;
16 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.TmfTimeRange
;
19 * A new range has been selected for the visible (zoom) time range.
21 * To update the selection range instead, use
22 * {@link TmfSelectionRangeUpdatedSignal}.
24 * @author Francois Chouinard
27 public class TmfWindowRangeUpdatedSignal
extends TmfSignal
{
29 private final TmfTimeRange fCurrentRange
;
35 * Object sending this signal
39 public TmfWindowRangeUpdatedSignal(Object source
, TmfTimeRange range
) {
41 fCurrentRange
= range
;
45 * @return This signal's time range
47 public TmfTimeRange
getCurrentRange() {
52 public String
toString() {
53 StringBuilder sb
= new StringBuilder(getClass().getSimpleName() + " [source="); //$NON-NLS-1$
55 if (getSource() != null) {
56 sb
.append(getSource().toString());
58 sb
.append("null"); //$NON-NLS-1$
61 sb
.append(", range="); //$NON-NLS-1$
63 if (fCurrentRange
!= null) {
64 sb
.append(fCurrentRange
.toString());
66 sb
.append("null"); //$NON-NLS-1$