Class PeriodicMarkerEventSource
java.lang.Object
org.eclipse.tracecompass.tmf.ui.markers.PeriodicMarkerEventSource
- All Implemented Interfaces:
IMarkerEventSource
@NonNullByDefault
public class PeriodicMarkerEventSource
extends Object
implements IMarkerEventSource
Marker event source that produces periodic markers.
- Since:
- 2.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Reference marker time and index -
Constructor Summary
ConstructorDescriptionPeriodicMarkerEventSource
(String category, PeriodicMarkerEventSource.Reference reference, double period, long rollover, org.eclipse.swt.graphics.RGBA color, boolean foreground) Constructs a periodic marker event source with line markers at period boundaries.PeriodicMarkerEventSource
(String category, PeriodicMarkerEventSource.Reference reference, double period, long rollover, org.eclipse.swt.graphics.RGBA color1, org.eclipse.swt.graphics.RGBA color2, boolean foreground) Constructs a periodic marker event source with alternating shading markers. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of marker categories that this object provides.getMarkerLabel
(long index) Get the marker label for the given marker index.getMarkerList
(String category, long startTime, long endTime, long resolution, org.eclipse.core.runtime.IProgressMonitor monitor) Gets the list of marker events of a specific category that intersect the given time range (inclusively).boolean
isApplicable
(long index) Returns true if the marker is applicable at the specified index.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.IMarkerEventSource
getMarkerList
-
Constructor Details
-
PeriodicMarkerEventSource
public PeriodicMarkerEventSource(String category, PeriodicMarkerEventSource.Reference reference, double period, long rollover, org.eclipse.swt.graphics.RGBA color, boolean foreground) Constructs a periodic marker event source with line markers at period boundaries.The markers will have the given category and color. The reference defines the marker with the given index to be at the specified time.
- Parameters:
category
- the marker categoryreference
- the reference marker time and indexperiod
- the period in time unitsrollover
- the number of periods before the index rolls-over to 0, or 0 for no roll-overcolor
- the marker colorforeground
- true if the marker is drawn in foreground, and false otherwise
-
PeriodicMarkerEventSource
public PeriodicMarkerEventSource(String category, PeriodicMarkerEventSource.Reference reference, double period, long rollover, org.eclipse.swt.graphics.RGBA color1, org.eclipse.swt.graphics.RGBA color2, boolean foreground) Constructs a periodic marker event source with alternating shading markers.The markers will have the given category. Periods will be shaded with the first and second colors alternatively. The reference defines the marker with the given index to be at the specified time. The reference will be shaded with the first color if its index is even, or the second color if it is odd.
- Parameters:
category
- the marker categoryreference
- the reference marker time and indexperiod
- the period in time unitsrollover
- the number of periods before the index rolls-over to 0, or 0 for no roll-overcolor1
- the first marker colorcolor2
- the second marker colorforeground
- true if the marker is drawn in foreground, and false otherwise
-
-
Method Details
-
getMarkerCategories
Description copied from interface:IMarkerEventSource
Gets the list of marker categories that this object provides.- Specified by:
getMarkerCategories
in interfaceIMarkerEventSource
- Returns:
- The list of marker categories
-
getMarkerList
public List<IMarkerEvent> getMarkerList(String category, long startTime, long endTime, long resolution, org.eclipse.core.runtime.IProgressMonitor monitor) Description copied from interface:IMarkerEventSource
Gets the list of marker events of a specific category that intersect the given time range (inclusively).The list should also include the nearest previous and next markers that do not intersect the time range.
- Specified by:
getMarkerList
in interfaceIMarkerEventSource
- Parameters:
category
- The marker categorystartTime
- Start of the time rangeendTime
- End of the time rangeresolution
- The resolutionmonitor
- The progress monitor object- Returns:
- The list of marker events
-
getMarkerLabel
Get the marker label for the given marker index.This method can be overridden by clients.
- Parameters:
index
- the marker index- Returns:
- the marker label
-
isApplicable
public boolean isApplicable(long index) Returns true if the marker is applicable at the specified index.This method can be overridden by clients. Returning false will essentially filter-out the marker.
- Parameters:
index
- the marker index- Returns:
- true if the marker is applicable
- Since:
- 3.0
-