Package ca.phon.media

Class TimeComponent

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
RecordGrid, SpeechAnalysisTier, Timebar, TimelineTier, TimelineTitledSeparator, WaveformDisplay

public abstract class TimeComponent extends JComponent
Base class for components which display information on a horizontal timeline
See Also:
  • Field Details

  • Constructor Details

    • TimeComponent

      public TimeComponent()
    • TimeComponent

      public TimeComponent(TimeUIModel timeModel)
  • Method Details

    • getDefaultCursor

      public Cursor getDefaultCursor()
    • setDefaultCursor

      public void setDefaultCursor(Cursor cursor)
    • setUI

      public void setUI(ComponentUI ui)
      Overrides:
      setUI in class JComponent
    • getUI

      public TimeComponentUI getUI()
      Overrides:
      getUI in class JComponent
    • getTimeModel

      public TimeUIModel getTimeModel()
    • setTimeModel

      public void setTimeModel(TimeUIModel timeModel)
    • getStartTime

      public float getStartTime()
    • setStartTime

      public void setStartTime(float startTime)
    • getEndTime

      public float getEndTime()
    • setEndTime

      public void setEndTime(float endTime)
    • getPixelsPerSecond

      public float getPixelsPerSecond()
    • setPixelsPerSecond

      public void setPixelsPerSecond(float pixelsPerSecond)
    • timeAtX

      public float timeAtX(double x)
    • xForTime

      public double xForTime(float time)
    • getWindowStart

      public float getWindowStart()
      Return the start time in our visible rectangle
      Returns:
      first visible time in s
    • getWindowEnd

      public float getWindowEnd()
      Returns the last time visible in our visible rectangle
      Returns:
      final visible time in s
    • getWindowStartX

      public double getWindowStartX()
      Get x position of first visible start time
      Returns:
    • getWindowEndX

      public double getWindowEndX()
      Get x position of last visible time
      Returns:
    • getWindowLength

      public float getWindowLength()
      Get visible window length in seconds
      Returns:
    • rectForInterval

      public Rectangle rectForInterval(float startTime, float endTime)
    • getSelectionColor

      public Color getSelectionColor()
    • isRepaintAll

      public boolean isRepaintAll()
      Flag for repaint events on intervals which do not belong to this component. If true this component will receive all repaint events for intervals registered with the same TimeUIModel
      Returns:
      true if repaints all interval events, false otherwise
    • repaint

      public void repaint(float startTime, float endTime)
      Repaint rectangle between given time values
      Parameters:
      startTime -
      endTime -
    • repaint

      public void repaint(long tn, float startTime, float endTime)
      Repaint rectangle between given time values
      Parameters:
      tn -
      startTime -
      endTime -
    • repaintInterval

      public void repaintInterval(TimeUIModel.Interval interval)
    • repaintInterval

      public void repaintInterval(long tn, TimeUIModel.Interval interval)
    • repaintMarker

      public void repaintMarker(TimeUIModel.Marker marker)
    • repaintMarker

      public void repaintMarker(long tn, TimeUIModel.Marker marker)