1 /*******************************************************************************
2 * Copyright (c) 2017 Ericsson
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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.tmf
.core
.markers
;
15 import java
.util
.ArrayList
;
16 import java
.util
.List
;
18 import com
.google
.common
.collect
.Range
;
19 import com
.google
.common
.collect
.RangeSet
;
22 * Model element for configurable marker.
26 private final String fName
;
27 private final String fColor
;
28 private final List
<SubMarker
> fSubMarkers
;
31 * Private constructor.
38 protected Marker(String name
, String color
) {
42 fSubMarkers
= new ArrayList
<>();
46 * Subclass for periodic marker evenly split into segments of equal length.
49 public static class PeriodicMarker
extends Marker
{
51 private final String fLabel
;
52 private final String fId
;
53 private final double fPeriod
;
54 private final String fUnit
;
55 private final Range
<Long
> fRange
;
56 private final long fOffset
;
57 private final RangeSet
<Long
> fIndexRange
;
81 public PeriodicMarker(String name
, String label
, String id
, String color
, double period
, String unit
, Range
<Long
> range
, long offset
, RangeSet
<Long
> indexRange
) {
89 fIndexRange
= indexRange
;
95 public String
getLabel() {
102 public String
getId() {
109 public double getPeriod() {
116 public String
getUnit() {
123 public Range
<Long
> getRange() {
130 public long getOffset() {
135 * @return the index range
137 public RangeSet
<Long
> getIndexRange() {
145 public String
getName() {
152 public String
getColor() {
157 * @return the sub-markers
159 public List
<SubMarker
> getSubMarkers() {
166 * @param subMarker the sub-marker
168 public void addSubMarker(SubMarker subMarker
) {
169 fSubMarkers
.add(subMarker
);
This page took 0.034794 seconds and 5 git commands to generate.