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
.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 begin timestamp of selection
68 public ITmfTimestamp
getBeginTime() {
73 * @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 if (fBeginTime
!= null) {
85 sb
.append(fBeginTime
.toString());
86 if (!fBeginTime
.equals(fEndTime
) && fEndTime
!= null) {
88 sb
.append(fEndTime
.toString());
91 sb
.append(")]"); //$NON-NLS-1$
This page took 0.040248 seconds and 5 git commands to generate.