Class IntervalTierComponent

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class IntervalTierComponent extends TimeComponent
Time component for session IntervalTiers
See Also:
  • Constructor Details

  • Method Details

    • setIntervalClickedCallback

      public void setIntervalClickedCallback(BiConsumer<Integer, IntervalTier.Interval> callback)
    • getIntervalClickedCallback

      public BiConsumer<Integer, IntervalTier.Interval> getIntervalClickedCallback()
    • getSelectionModel

      public ListSelectionModel getSelectionModel()
      Get the selection model used to track selected intervals
      Returns:
      the selection model
    • getSelectedIndex

      public int getSelectedIndex()
      Get the highlight model used to track highlighted intervals
      Returns:
      the highlight model
    • setSelectedIndex

      public void setSelectedIndex(int index)
      Set the selected interval index
      Parameters:
      index - the index to select
    • addHighlightedIndex

      public void addHighlightedIndex(int index)
      Add an interval index to the list of highlighted intervals
      Parameters:
      index - the index to highlight
    • clearHighlightedIndices

      public void clearHighlightedIndices()
      Clear all highlighted intervals
    • addHighlightedIndices

      public void addHighlightedIndices(int fromIndex, int toIndex)
      Add a range of interval indices to the list of highlighted intervals
      Parameters:
      fromIndex - the start index (inclusive)
      toIndex - the end index (inclusive)v
    • getTimelineTier

      public IntervalTier getTimelineTier()
      Return the interval tier this component is associated with
      Returns:
      the interval tier
    • getIntersectingIntervals

      public int[] getIntersectingIntervals(float startTime, float endTime)
      Intervals which intersect the given time values
      Parameters:
      startTime - the start time
      endTime - the end time
      Returns:
      array of interval indices which intersect the given time values
    • getUI

      public TimeComponentUI getUI()
      Overrides:
      getUI in class TimeComponent
    • setUI

      public void setUI(ComponentUI ui)
      Overrides:
      setUI in class TimeComponent