anvil.gui
Interface TimeAlignedViewer

All Superinterfaces:
AnnotationViewer

public interface TimeAlignedViewer
extends AnnotationViewer

Viewer component where tracks and track elements are visualized on a board in time-alignment, time running from left to right. Time is measured by frame number. A red playline slides across the board while the video is playing. The playline jumps from frame number to frame number.


Method Summary
 anvil.annot.TrackElement findElement(int frameNumber)
          Returns element at the specified frame position in the currently active track.
 anvil.annot.TrackElement findElement(anvil.annot.Track track, int frameNumber)
          Returns element at the specified frame position.
 int getPlayline()
          Position of the playback line (red) as frame number.
 int getRecordline()
          Position of the record line (green) as frame number.
 anvil.annot.TrackElement getSelectedElement()
          Returns track element currently selected by user.
 int getXDim()
          Returns the board's width which is the total number of frames.
 double getZoomFactor()
          Returns current zoom factor.
 void repaint()
          Refreshes graphics of viewer.
 void setPlayline(int frameNumber)
          Places playback line (red) at the specified frame number.
 void setRecordline(int frameNumber)
          Places record line (green) at the specified frame number.
 
Methods inherited from interface anvil.gui.AnnotationViewer
addViewerChangeListener, removeViewerChangeListener, showElements
 

Method Detail

findElement

public anvil.annot.TrackElement findElement(int frameNumber)
Returns element at the specified frame position in the currently active track. When two elements meet at this frame the one to the RIGHT of the frame is always returned.

Parameters:
frameNumber - Frame number to look at

findElement

public anvil.annot.TrackElement findElement(anvil.annot.Track track,
                                            int frameNumber)
Returns element at the specified frame position. When two elements meet at this frame the one to the RIGHT of the frame is always returned.

Parameters:
track - Track to be searched
frameNumber - Frame number to look at

getPlayline

public int getPlayline()
Position of the playback line (red) as frame number. Must be multiplied with the zoom factor to arrive at real pixel coordinate.

Returns:
frame number

getRecordline

public int getRecordline()
Position of the record line (green) as frame number. Must be multiplied with the zoom factor to arrive at real pixel coordinate.

Returns:
frame number

getSelectedElement

public anvil.annot.TrackElement getSelectedElement()
Returns track element currently selected by user. Can be null.


getXDim

public int getXDim()
Returns the board's width which is the total number of frames.


getZoomFactor

public double getZoomFactor()
Returns current zoom factor.


repaint

public void repaint()
Refreshes graphics of viewer.


setPlayline

public void setPlayline(int frameNumber)
Places playback line (red) at the specified frame number.

Parameters:
frameNumber - frame number

setRecordline

public void setRecordline(int frameNumber)
Places record line (green) at the specified frame number.

Parameters:
frameNumber - frame number