ch.claudio.qtedit
Class EditList

java.lang.Object
  extended by ch.claudio.qtedit.EditList

public class EditList
extends java.lang.Object

The edit list stores for each point in time of the resulting movie the number of the source of the movie.

Author:
claudio

Field Summary
static int END
          Constant to indicate end of the movie.
 
Constructor Summary
EditList()
          Reads in the list from file or initialises an empty one.
 
Method Summary
 void addSwitch(int frame, int movie)
          Add a new edit point.
 int getLength()
           
 int getMovie(int time)
          given a time as frame count, return the movie number to be displayed at this position.
 boolean isNewList()
           
 void saveEditList()
          Save the current state of the edit list.
 java.lang.String toString()
          Return a human understandable string representation of the edit list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

END

public static final int END
Constant to indicate end of the movie.

See Also:
Constant Field Values
Constructor Detail

EditList

public EditList()
Reads in the list from file or initialises an empty one. Note: This is unclean prgoramming as this works only if your program utilises no more than one edit list.

Method Detail

isNewList

public boolean isNewList()
Returns:
true if no list has been loaded.

addSwitch

public void addSwitch(int frame,
                      int movie)
Add a new edit point. At the given frame a switch to the selected movie occurs. If the movie number is END, then the nd of the edited movie is adjusted. If the movie is shortened, then all edit points following the END point are lost.

Parameters:
frame - time of switch as frame number.
movie - New movie to which to switch.

getMovie

public int getMovie(int time)
given a time as frame count, return the movie number to be displayed at this position.

Parameters:
time - as number of frame since start of the edited movie.
Returns:
number of the movie to display.

getLength

public int getLength()

saveEditList

public void saveEditList()
Save the current state of the edit list. Call this often.


toString

public java.lang.String toString()
Return a human understandable string representation of the edit list.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()