Interface ITmfTimeAligned

All Known Implementing Classes:
AbstractStateSystemTimeGraphView, AbstractTimeGraphView, BaseDataProviderTimeGraphView, CounterView, ExampleTimeGraphDataProviderView, ExampleXYDataProviderView, FlameChartView, HistogramView, SegmentStoreScatterView2, TimeChartView, TmfChartView, TmfStateSystemExplorer

public interface ITmfTimeAligned
An interface that adds the time-axis alignment feature to a view. This interface provides information about the current state of alignment of the view as well as performs alignment operations in case the views become misaligned (resize, moved, etc).
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getAvailableWidth(int requestedOffset)
    Get the available width for the specified time-axis offset.
    Get the time alignment information.
    void
    performAlign(int offset, int width)
    Perform the alignment by moving the time-axis to the specified offset and the resizing it to the specified width.
  • Method Details

    • getTimeViewAlignmentInfo

      TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo()
      Get the time alignment information. The view provides information about where the time-axis is in addition to information necessary to decide whether or not views should be time-aligned with each other (Shell, location).
      Returns:
      the time alignment information
    • getAvailableWidth

      int getAvailableWidth(int requestedOffset)
      Get the available width for the specified time-axis offset. The implementation should return the width that would be available if the time-axis was to be at that offset. When about to perform a re-alignment, the alignment algorithm will choose the narrowest width to accommodate all views.
      Parameters:
      requestedOffset - the requested time-axis offset. Greater or equal to zero.
      Returns:
      the available width. Should be greater or equal to zero.
    • performAlign

      void performAlign(int offset, int width)
      Perform the alignment by moving the time-axis to the specified offset and the resizing it to the specified width. Implementations should handle cases were the requested width is greater than the width of the view. For example, Integer.MAX_VALUE can be requested in order to obtain the largest width possible.
      Parameters:
      offset - the time-axis offset. Greater or equal to zero.
      width - the time-axis width. Greater or equal to zero. Can be Integer.MAX_VALUE.