1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir
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 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.provisional
.tmf
.core
.views
.timegraph2
;
12 import java
.util
.Collections
;
14 import java
.util
.function
.Supplier
;
16 import org
.eclipse
.jdt
.annotation
.Nullable
;
18 public class TimeGraphDrawnEvent
{
20 public enum SymbolStyle
{
26 private final TimeGraphEvent fTimeGraphEvent
;
27 private final String fEventName
;
28 private final ColorDefinition fColor
;
29 private final SymbolStyle fSymbolStyle
;
30 private final @Nullable Supplier
<Map
<String
, String
>> fPropertySupplier
;
32 public TimeGraphDrawnEvent(TimeGraphEvent event
, String eventName
,
33 ColorDefinition color
, SymbolStyle style
,
34 @Nullable Supplier
<Map
<String
, String
>> propertySupplier
) {
35 fTimeGraphEvent
= event
;
36 fEventName
= eventName
;
39 fPropertySupplier
= propertySupplier
;
42 public TimeGraphEvent
getEvent() {
43 return fTimeGraphEvent
;
46 public String
getEventName() {
50 public ColorDefinition
getColor() {
54 public SymbolStyle
getSymbolStyle() {
58 public Map
<String
, String
> getProperties() {
59 Supplier
<Map
<String
, String
>> supplier
= fPropertySupplier
;
60 if (supplier
== null) {
61 return Collections
.EMPTY_MAP
;
63 return supplier
.get();