Import views plugins
[deliverable/tracecompass.git] / tmf / org.lttng.scope.tmf2.views.core / src / org / lttng / scope / tmf2 / views / core / timegraph / model / provider / drawnevents / TimeGraphDrawnEventProvider.java
1 /*
2 * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
3 *
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
8 */
9
10 package org.lttng.scope.tmf2.views.core.timegraph.model.provider.drawnevents;
11
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;
15
16 import javafx.beans.property.BooleanProperty;
17 import javafx.beans.property.ObjectProperty;
18 import javafx.beans.property.SimpleBooleanProperty;
19 import javafx.beans.property.SimpleObjectProperty;
20
21 /**
22 * Basic implementation of {@link ITimeGraphDrawnEventProvider}.
23 *
24 * Implementation of the {@link #getEventRender} method is left to subclasses.
25 *
26 * @author Alexandre Montplaisir
27 */
28 public abstract class TimeGraphDrawnEventProvider implements ITimeGraphDrawnEventProvider {
29
30 private final ObjectProperty<@Nullable ITmfTrace> fTraceProperty = new SimpleObjectProperty<>(null);
31 private final BooleanProperty fEnabledProperty = new SimpleBooleanProperty(false);
32 private final TimeGraphDrawnEventSeries fDrawnEventSeries;
33
34 /**
35 * Constructor
36 *
37 * @param drawnEventSeries
38 * The event series provided by this provider.
39 */
40 protected TimeGraphDrawnEventProvider(TimeGraphDrawnEventSeries drawnEventSeries) {
41 fDrawnEventSeries = drawnEventSeries;
42 }
43
44 @Override
45 public final ObjectProperty<@Nullable ITmfTrace> traceProperty() {
46 return fTraceProperty;
47 }
48
49 @Override
50 public final BooleanProperty enabledProperty() {
51 return fEnabledProperty;
52 }
53
54 @Override
55 public final TimeGraphDrawnEventSeries getEventSeries() {
56 return fDrawnEventSeries;
57 }
58
59 }
This page took 0.031383 seconds and 5 git commands to generate.