1 /*******************************************************************************
2 * Copyright (c) 2009 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.ui
.model
.trange
;
19 public abstract class TimeRangeComponent
implements ITimeRangeComponent
{
21 // ========================================================================
23 // =======================================================================
24 protected Long startTime
= 0L;
25 protected Long stopTime
= Long
.MAX_VALUE
;
26 protected TimeRangeComposite eventParent
= null;
27 private boolean visible
= true;
31 // ========================================================================
33 // =======================================================================
34 public TimeRangeComponent(Long stime
, Long etime
,
35 TimeRangeComposite eventParent
) {
36 this.startTime
= stime
;
37 this.stopTime
= etime
;
38 this.eventParent
= eventParent
;
41 // ========================================================================
43 // =======================================================================
45 * This method shall not be used to estimate the starting drawing point of
46 * the time range-event. see interface method getTime(). However this method
47 * can be used to retrieve the tool tip information where we need to reflect
48 * that the actual start of this event is unknown
52 public long getStartTime() {
53 return startTime
.longValue();
56 public void setStartTime(long time
) {
62 public long getStopTime() {
63 return stopTime
.longValue();
66 public void setStopTime(long stopTime
) {
68 this.stopTime
= stopTime
;
72 public ITimeRangeComponent
getEventParent() {
76 public void setEventParent(TimeRangeComposite eventParent
) {
77 this.eventParent
= eventParent
;
80 public abstract String
getName();
83 public void setVisible(boolean visible
) {
84 this.visible
= visible
;
88 * @see org.eclipse.linuxtools.lttng.ui.model.trange.ITimeRangeComponent#isVisible()
90 public boolean isVisible() {