2 * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
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 package org
.lttng
.scope
.tmf2
.views
.core
.timegraph
.model
.provider
.drawnevents
;
12 import org
.eclipse
.jdt
.annotation
.Nullable
;
13 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
14 import org
.lttng
.scope
.tmf2
.views
.core
.timegraph
.model
.render
.drawnevents
.TimeGraphDrawnEventSeries
;
16 import javafx
.beans
.property
.BooleanProperty
;
17 import javafx
.beans
.property
.ObjectProperty
;
18 import javafx
.beans
.property
.SimpleBooleanProperty
;
19 import javafx
.beans
.property
.SimpleObjectProperty
;
22 * Basic implementation of {@link ITimeGraphDrawnEventProvider}.
24 * Implementation of the {@link #getEventRender} method is left to subclasses.
26 * @author Alexandre Montplaisir
28 public abstract class TimeGraphDrawnEventProvider
implements ITimeGraphDrawnEventProvider
{
30 private final ObjectProperty
<@Nullable ITmfTrace
> fTraceProperty
= new SimpleObjectProperty
<>(null);
31 private final BooleanProperty fEnabledProperty
= new SimpleBooleanProperty(false);
32 private final TimeGraphDrawnEventSeries fDrawnEventSeries
;
37 * @param drawnEventSeries
38 * The event series provided by this provider.
40 protected TimeGraphDrawnEventProvider(TimeGraphDrawnEventSeries drawnEventSeries
) {
41 fDrawnEventSeries
= drawnEventSeries
;
45 public final ObjectProperty
<@Nullable ITmfTrace
> traceProperty() {
46 return fTraceProperty
;
50 public final BooleanProperty
enabledProperty() {
51 return fEnabledProperty
;
55 public final TimeGraphDrawnEventSeries
getEventSeries() {
56 return fDrawnEventSeries
;