Class HistogramScaledData

java.lang.Object
org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramScaledData

public class HistogramScaledData extends Object
Convenience class/struct for scaled histogram data.
Version:
1.0
Author:
Francois Chouinard
  • Field Details

    • OUT_OF_RANGE_BUCKET

      public static final int OUT_OF_RANGE_BUCKET
      Indicator value that bucket is out of range (not filled).
      See Also:
    • fWidth

      public int fWidth
      Width of histogram canvas (number of pixels).
    • fHeight

      public int fHeight
      Height of histogram canvas (number of pixels).
    • fBarWidth

      public int fBarWidth
      Width of one histogram bar (number of pixels).
    • fData

      public HistogramBucket[] fData
      Array of scaled values
    • fLostEventsData

      public final int[] fLostEventsData
      Array 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 fBucketDuration
      The bucket duration of a scaled data bucket.
    • fMaxValue

      public long fMaxValue
      The maximum number of events of all buckets.
    • fMaxCombinedValue

      public long fMaxCombinedValue
      the maximum of events of all buckets including the lost events
    • fSelectionBeginBucket

      public int fSelectionBeginBucket
      The index of the selection begin bucket.
    • fSelectionEndBucket

      public int fSelectionEndBucket
      The index of the selection end bucket.
    • fLastBucket

      public int fLastBucket
      The index of the last bucket.
    • fScalingFactor

      public double fScalingFactor
      The scaling factor used to fill the scaled data.
    • fScalingFactorCombined

      public double fScalingFactorCombined
      The scaling factor used to fill the scaled data including the lost events.
    • fFirstBucketTime

      public long fFirstBucketTime
      Time of first bucket.
    • fFirstEventTime

      public long fFirstEventTime
      The time of the first event.
    • hideLostEvents

      public static volatile boolean hideLostEvents
      show the lost events or not
  • Constructor Details

    • HistogramScaledData

      public HistogramScaledData(int width, int height, int barWidth)
      Constructor.
      Parameters:
      width - the canvas width
      height - the canvas height
      barWidth - the required bar width
    • HistogramScaledData

      public HistogramScaledData(HistogramScaledData other)
      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