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 - Support selection range
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.tmf
.core
.signal
;
16 import static org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
.checkNotNull
;
18 import org
.eclipse
.jdt
.annotation
.NonNullByDefault
;
19 import org
.eclipse
.jdt
.annotation
.Nullable
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.ITmfTimestamp
;
23 * A new time or time range selection has been made.
25 * This is the selected time or time range. To synchronize on the visible
26 * (zoom) range, use {@link TmfRangeSynchSignal}.
28 * @author Francois Chouinard
31 public class TmfTimeSynchSignal
extends TmfSignal
{
33 private final ITmfTimestamp fBeginTime
;
34 private final ITmfTimestamp fEndTime
;
40 * Object sending this signal
42 * Timestamp of selection
44 public TmfTimeSynchSignal(@Nullable Object source
, ITmfTimestamp ts
) {
54 * Object sending this signal
56 * Timestamp of begin of selection range
58 * Timestamp of end of selection range
60 public TmfTimeSynchSignal(@Nullable Object source
, ITmfTimestamp begin
, ITmfTimestamp end
) {
67 * @return The begin timestamp of selection
69 public ITmfTimestamp
getBeginTime() {
74 * @return The end timestamp of selection
76 public ITmfTimestamp
getEndTime() {
81 public String
toString() {
82 StringBuilder sb
= new StringBuilder();
83 sb
.append("[TmfTimeSynchSignal ("); //$NON-NLS-1$
84 sb
.append(fBeginTime
.toString());
85 if (!fBeginTime
.equals(fEndTime
)) {
87 sb
.append(fEndTime
.toString());
89 sb
.append(")]"); //$NON-NLS-1$
90 return checkNotNull(sb
.toString());
This page took 0.033329 seconds and 5 git commands to generate.