Class HistogramScaledData
java.lang.Object
org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramScaledData
Convenience class/struct for scaled histogram data.
- Version:
- 1.0
- Author:
- Francois Chouinard
-
Field Summary
FieldsModifier and TypeFieldDescriptionintWidth of one histogram bar (number of pixels).doubleThe bucket duration of a scaled data bucket.Array of scaled valueslongTime of first bucket.longThe time of the first event.intHeight of histogram canvas (number of pixels).intThe index of the last bucket.final int[]Array of scaled values combined including the lost events.longthe maximum of events of all buckets including the lost eventslongThe maximum number of events of all buckets.doubleThe scaling factor used to fill the scaled data.doubleThe scaling factor used to fill the scaled data including the lost events.intThe index of the selection begin bucket.intThe index of the selection end bucket.intWidth of histogram canvas (number of pixels).static booleanshow the lost events or notstatic final intIndicator value that bucket is out of range (not filled). -
Constructor Summary
ConstructorsConstructorDescriptionHistogramScaledData(int width, int height, int barWidth) Constructor.Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionlonggetBucketEndTime(int index) Returns the time of the bucket end time for given index.longgetBucketStartTime(int index) Returns the time of the bucket start time for given index.longReturns the time of the first bucket of the scaled data.longReturns the time of the last bucket.voidsetFirstBucketTime(long firstEventTime) Set the first event time.
-
Field Details
-
OUT_OF_RANGE_BUCKET
public static final int OUT_OF_RANGE_BUCKETIndicator value that bucket is out of range (not filled).- See Also:
-
fWidth
public int fWidthWidth of histogram canvas (number of pixels). -
fHeight
public int fHeightHeight of histogram canvas (number of pixels). -
fBarWidth
public int fBarWidthWidth of one histogram bar (number of pixels). -
fData
Array of scaled values -
fLostEventsData
public final int[] fLostEventsDataArray of scaled values combined including the lost events. This array contains the number of lost events for each bar in the histogram -
fBucketDuration
public double fBucketDurationThe bucket duration of a scaled data bucket. -
fMaxValue
public long fMaxValueThe maximum number of events of all buckets. -
fMaxCombinedValue
public long fMaxCombinedValuethe maximum of events of all buckets including the lost events -
fSelectionBeginBucket
public int fSelectionBeginBucketThe index of the selection begin bucket. -
fSelectionEndBucket
public int fSelectionEndBucketThe index of the selection end bucket. -
fLastBucket
public int fLastBucketThe index of the last bucket. -
fScalingFactor
public double fScalingFactorThe scaling factor used to fill the scaled data. -
fScalingFactorCombined
public double fScalingFactorCombinedThe scaling factor used to fill the scaled data including the lost events. -
fFirstBucketTime
public long fFirstBucketTimeTime of first bucket. -
fFirstEventTime
public long fFirstEventTimeThe time of the first event. -
hideLostEvents
public static volatile boolean hideLostEventsshow the lost events or not
-
-
Constructor Details
-
HistogramScaledData
public HistogramScaledData(int width, int height, int barWidth) Constructor.- Parameters:
width- the canvas widthheight- the canvas heightbarWidth- the required bar width
-
HistogramScaledData
Copy constructor- Parameters:
other- another scaled data.
-
-
Method Details
-
getFirstBucketTime
public long getFirstBucketTime()Returns the time of the first bucket of the scaled data.- Returns:
- the time of the first bucket.
-
setFirstBucketTime
public void setFirstBucketTime(long firstEventTime) Set the first event time.- Parameters:
firstEventTime- The time to set
-
getLastBucketTime
public long getLastBucketTime()Returns the time of the last bucket.- Returns:
- last bucket time
-
getBucketStartTime
public long getBucketStartTime(int index) Returns the time of the bucket start time for given index.- Parameters:
index- A bucket index.- Returns:
- the time of the bucket start time
-
getBucketEndTime
public long getBucketEndTime(int index) Returns the time of the bucket end time for given index.- Parameters:
index- A bucket index.- Returns:
- the time of the bucket end time
-