1 /*******************************************************************************
2 * Copyright (c) 2009, 2013 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
.linuxtools
.tmf
.core
.signal
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.ITmfTimestamp
;
19 * A new time or time range selection has been made.
21 * This is the selected time or time range. To synchronize on the visible
22 * (zoom) range, use {@link TmfRangeSynchSignal}.
25 * @author Francois Chouinard
27 public class TmfTimeSynchSignal
extends TmfSignal
{
29 private final ITmfTimestamp fBeginTime
;
30 private final ITmfTimestamp fEndTime
;
36 * Object sending this signal
38 * Timestamp of selection
41 public TmfTimeSynchSignal(Object source
, ITmfTimestamp ts
) {
51 * Object sending this signal
53 * Timestamp of begin of selection range
55 * Timestamp of end of selection range
58 public TmfTimeSynchSignal(Object source
, ITmfTimestamp begin
, ITmfTimestamp end
) {
65 * @return The synchronization timestamp of this signal
67 * @deprecated As of 2.1, use {@link #getBeginTime()} and {@link #getEndTime()}
70 public ITmfTimestamp
getCurrentTime() {
75 * @return The begin timestamp of selection
78 public ITmfTimestamp
getBeginTime() {
83 * @return The end timestamp of selection
86 public ITmfTimestamp
getEndTime() {
91 public String
toString() {
92 StringBuilder sb
= new StringBuilder();
93 sb
.append("[TmfTimeSynchSignal ("); //$NON-NLS-1$
94 if (fBeginTime
!= null) {
95 sb
.append(fBeginTime
.toString());
96 if (!fBeginTime
.equals(fEndTime
) && fEndTime
!= null) {
98 sb
.append(fEndTime
.toString());
101 sb
.append(")]"); //$NON-NLS-1$
102 return sb
.toString();
This page took 0.033319 seconds and 5 git commands to generate.