org.ascape.movie
Class MovieRecorder

java.lang.Object
  extended by org.ascape.movie.MovieRecorder
Direct Known Subclasses:
QuickTimeRecorder

public abstract class MovieRecorder
extends java.lang.Object

A Base class for recording views.

Since:
1.9 todo return support for non-ionternal frame usage
Version:
3.0
Author:
Miles Parker

Field Summary
protected  java.io.File file
          The movie file.
protected  RecorderListener listener
          A recorder listenening for changes.
protected  int recordFrameNum
          THe frame number currently being recorded
protected  RecorderTarget target
          The target we are taking a movie of.
 
Constructor Summary
MovieRecorder()
          Called to create recording session and setup control dialog.
MovieRecorder(javax.swing.JDesktopPane desktop)
          Called to create recording session and setup control dialog.
 
Method Summary
 void addListener(RecorderListener listener)
          Sets the listener responsible for this recording.
 void cancelOrStop()
          Called to stop or cancel recording.
abstract  void close()
          Closes the movie and the file it is being saved to.
protected  javax.swing.JComboBox createQualityComboBox()
          Creates a list of qualities to select.
 int getFramesPerSecond()
          Returns the number of frames to be displayed per second.
 RecorderListener getListener()
          Returns the listener responsible for this recording.
 java.lang.String getStatusMsg()
          Returns a message indicating target and frame number.
 RecorderTarget getTarget()
          Retuns the target we are recording.
 java.lang.String getTargetName()
           
 void recordFrame()
          Called the listener or target to record the next frame.
protected  void requestFile()
          Called to start recording.
abstract  void setComponent(java.awt.Component component)
          Sets the component to record.
 void setFile(java.io.File file)
          Sets the file to save the movie to.
 void setFramesPerSecond(int framesPerSecond)
          Sets the number of frames to be displayed per second.
 void setTarget(RecorderTarget recorderTarget)
          Sets the target to record.
 void setTargetName(java.lang.String targetName)
           
 void start()
          Creates the movie, preparing it for recording of frames.
 void statusUpdate()
          Updates the status display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.io.File file
The movie file.


target

protected RecorderTarget target
The target we are taking a movie of.


listener

protected RecorderListener listener
A recorder listenening for changes.


recordFrameNum

protected int recordFrameNum
THe frame number currently being recorded

Constructor Detail

MovieRecorder

public MovieRecorder()
Called to create recording session and setup control dialog.


MovieRecorder

public MovieRecorder(javax.swing.JDesktopPane desktop)
Called to create recording session and setup control dialog.

Method Detail

cancelOrStop

public void cancelOrStop()
Called to stop or cancel recording.


requestFile

protected void requestFile()
Called to start recording.


createQualityComboBox

protected javax.swing.JComboBox createQualityComboBox()
Creates a list of qualities to select. In the basic version, there are none.


recordFrame

public void recordFrame()
Called the listener or target to record the next frame.


start

public void start()
Creates the movie, preparing it for recording of frames.


close

public abstract void close()
Closes the movie and the file it is being saved to.


statusUpdate

public void statusUpdate()
Updates the status display.


getFramesPerSecond

public int getFramesPerSecond()
Returns the number of frames to be displayed per second.


setFramesPerSecond

public void setFramesPerSecond(int framesPerSecond)
Sets the number of frames to be displayed per second.


setFile

public void setFile(java.io.File file)
Sets the file to save the movie to.


getTarget

public RecorderTarget getTarget()
Retuns the target we are recording.


setTarget

public void setTarget(RecorderTarget recorderTarget)
Sets the target to record.


setComponent

public abstract void setComponent(java.awt.Component component)
Sets the component to record.


getListener

public RecorderListener getListener()
Returns the listener responsible for this recording.


addListener

public void addListener(RecorderListener listener)
Sets the listener responsible for this recording. Warning: for now, does not support multiple listeners.


getStatusMsg

public java.lang.String getStatusMsg()
Returns a message indicating target and frame number.


getTargetName

public java.lang.String getTargetName()

setTargetName

public void setTargetName(java.lang.String targetName)


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.