Import "views" plugins
[deliverable/tracecompass.git] / tmf / org.lttng.scope.tmf2.views.core / src / org / lttng / scope / tmf2 / views / core / timegraph / model / render / states / MultiStateInterval.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.render.states;
11
12 import java.util.Collections;
13
14 import org.lttng.scope.tmf2.views.core.config.ConfigOption;
15 import org.lttng.scope.tmf2.views.core.timegraph.model.render.ColorDefinition;
16 import org.lttng.scope.tmf2.views.core.timegraph.model.render.LineThickness;
17 import org.lttng.scope.tmf2.views.core.timegraph.model.render.tree.TimeGraphTreeElement;
18
19 /**
20 * Dummy interval model object representing a "multi-state", which means a case
21 * where more than one state exists for a given pixel.
22 *
23 * @author Alexandre Montplaisir
24 */
25 public final class MultiStateInterval extends BasicTimeGraphStateInterval {
26
27 /** Configuration option for the line thickness of multi-state intervals */
28 public static final ConfigOption<LineThickness> MULTI_STATE_THICKNESS_OPTION = new ConfigOption<>(LineThickness.NORMAL);
29
30 private static final String MULTI_STATE_NAME = "Multi-state"; //$NON-NLS-1$
31 private static final ColorDefinition MULTI_STATE_COLOR = new ColorDefinition(0, 0, 0);
32 private static final ConfigOption<ColorDefinition> MULTI_STATE_COLOR_OPTION = new ConfigOption<>(MULTI_STATE_COLOR);
33
34 /**
35 * Constructor
36 *
37 * @param startTime
38 * Start time
39 * @param endTime
40 * End time
41 * @param treeElement
42 * The tree element to which this interval is associated
43 */
44 public MultiStateInterval(long startTime, long endTime, TimeGraphTreeElement treeElement) {
45 super(startTime,
46 endTime,
47 treeElement,
48 MULTI_STATE_NAME,
49 /* Label */
50 null,
51 MULTI_STATE_COLOR_OPTION,
52 MULTI_STATE_THICKNESS_OPTION,
53 Collections.emptyMap());
54 }
55
56 @Override
57 public boolean isMultiState() {
58 return true;
59 }
60
61 }
This page took 0.031462 seconds and 5 git commands to generate.