Commit | Line | Data |
---|---|---|
a23cd365 MK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2017 Ericsson | |
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.eclipse.tracecompass.tmf.ui.widgets.timegraph.model; | |
11 | ||
12 | import org.eclipse.jdt.annotation.NonNullByDefault; | |
13 | ||
14 | /** | |
15 | * <p> | |
16 | * <em>Time event styles</em>, this is for reference purposes. Many values will | |
17 | * be unsupported. | |
18 | * </p> | |
19 | * <p> | |
20 | * Special care is needed when populating the map as it is untyped. The API is | |
21 | * as follows | |
22 | * </p> | |
23 | * <ul> | |
24 | * <li>{@link #label()} a <em>String</em> to show in the legend</li> | |
25 | * <li>{@link #fillStyle()} can be {@link #solidColorFillStyle()}, | |
26 | * {@link #gradientColorFillStyle()} or {@link #hatchPatternFillStyle()}.</li> | |
27 | * <li>{@link #heightFactor()} a <em>Float</em> between 0 and 1.0f</li> | |
28 | * <li>{@link #fillColor()} an <em>integer</em> encoding RGBA over 4 bytes (1 | |
29 | * byte red, 1 byte green, 1 byte blue, 1 byte alpha)</li> | |
30 | * <li>{@link #fillColorEnd()} an <em>integer</em> encoding RGBA over 4 bytes (1 | |
31 | * byte red, 1 byte green, 1 byte blue, 1 byte alpha)</li> | |
32 | * <li>{@link #borderColor()} an <em>integer</em> encoding RGBA over 4 bytes (1 | |
33 | * byte red, 1 byte green, 1 byte blue, 1 byte alpha)</li> | |
34 | * <li>{@link #borderEnable()} a <em>boolean</em></li> | |
35 | * <li>{@link #borderThickness()} an <em>integer</em></li> | |
36 | * </ul> | |
37 | * | |
38 | * @author Matthew Khouzam | |
39 | * @noimplement This interface is not intended to be implemented by clients. | |
8eeee708 | 40 | * @since 3.0 |
a23cd365 MK |
41 | */ |
42 | @NonNullByDefault | |
43 | public interface ITimeEventStyleStrings { | |
44 | ||
45 | /** | |
46 | * The label to display in the legend | |
47 | * | |
48 | * @return the key to get the value | |
49 | */ | |
50 | static String label() { | |
51 | return ".label"; //$NON-NLS-1$ | |
52 | } | |
53 | ||
54 | /** | |
55 | * Height factor, can be between 0.0 and 1.0f. | |
56 | * | |
57 | * @return the key to get the value | |
58 | */ | |
59 | static String heightFactor() { | |
60 | return ".height.factor"; //$NON-NLS-1$ | |
61 | } | |
62 | ||
63 | /** | |
64 | * Fill style, can be {@link #solidColorFillStyle()}, | |
65 | * {@link #gradientColorFillStyle()} or {@link #hatchPatternFillStyle()} | |
66 | * | |
67 | * @return the key to get the value | |
68 | */ | |
69 | static String fillStyle() { | |
70 | return ".fill";//$NON-NLS-1$ | |
71 | } | |
72 | ||
73 | /** | |
74 | * Color fill style, this is a solid color, so it should make an event that | |
75 | * is uniformly filled with a color. The color is defined in the | |
76 | * {@link #fillColor()} parameter. | |
77 | * | |
78 | * @see #fillStyle() | |
79 | * | |
80 | * @return the color fill style | |
81 | */ | |
82 | static String solidColorFillStyle() { | |
83 | return "color"; //$NON-NLS-1$ | |
84 | } | |
85 | ||
86 | /** | |
87 | * Color fill style, this is a gradient color, it should make an event that | |
88 | * transitions from {@link #fillColor()} to {@link #fillColorEnd()}. | |
89 | * | |
90 | * @see #fillStyle() | |
91 | * | |
92 | * @return the color fill style | |
93 | */ | |
94 | static String gradientColorFillStyle() { | |
95 | return "gradient"; //$NON-NLS-1$ | |
96 | } | |
97 | ||
98 | /** | |
99 | * Color fill style, this is a hatch pattern, it should make an event that | |
100 | * has a hatch pattern with {@link #fillColor()} and | |
101 | * {@link #fillColorEnd()}. | |
102 | * | |
103 | * @see #fillStyle() | |
104 | * @return the color fill style | |
105 | */ | |
106 | static String hatchPatternFillStyle() { | |
107 | return "hatch"; //$NON-NLS-1$ | |
108 | } | |
109 | ||
110 | /** | |
111 | * Fill color, used in all styles except for image. | |
112 | * | |
113 | * @return the key to get the value | |
114 | */ | |
115 | static String fillColor() { | |
116 | return ".fill.color";//$NON-NLS-1$ | |
117 | } | |
118 | ||
119 | /** | |
120 | * Second fill color, used in gradients | |
121 | * | |
122 | * @return the key to get the value | |
123 | */ | |
124 | static String fillColorEnd() { | |
125 | return ".fill.color_end";//$NON-NLS-1$ | |
126 | } | |
127 | ||
128 | /** | |
129 | * Shadow the time event | |
130 | * | |
131 | * @return the key to get the value | |
132 | */ | |
133 | static String shadowEnabled() { | |
134 | return ".shadow.enable";//$NON-NLS-1$ | |
135 | } | |
136 | ||
137 | /** | |
138 | * Border | |
139 | * | |
140 | * @return the key to get the value | |
141 | */ | |
142 | static String borderEnable() { | |
143 | return ".border.enable";//$NON-NLS-1$ | |
144 | } | |
145 | ||
146 | /** | |
147 | * Border thickness | |
148 | * | |
149 | * @return the key to get the value | |
150 | */ | |
151 | static String borderThickness() { | |
152 | return ".border.weight";//$NON-NLS-1$ | |
153 | } | |
154 | ||
155 | /** | |
156 | * Border color | |
157 | * | |
158 | * @return the key to get the value | |
159 | */ | |
160 | static String borderColor() { | |
161 | return ".border.color";//$NON-NLS-1$ | |
162 | } | |
163 | ||
164 | } |