visual.dynamic.sampled
Class AbstractFrameOp

java.lang.Object
  extended by visual.dynamic.sampled.AbstractFrameOp
All Implemented Interfaces:
FrameOp
Direct Known Subclasses:
AbstractSuperimposition, AbstractTransition

public abstract class AbstractFrameOp
extends java.lang.Object
implements FrameOp


Field Summary
protected  int duration
           
protected  int first
           
 
Constructor Summary
AbstractFrameOp(int first, int duration)
          Explicit Value Constructor
 
Method Summary
 int getFirstFrame()
          Get the index of the first frame of this FrameOp
 int getLastFrame()
          Get the index of the last frame of this FrameOp
protected  boolean hasFinishedAt(int frame)
          Has this FrameOp finished at the given frame?
abstract  void postRendering(java.awt.Graphics g, int frame)
          Apply the post-rendering portion of this FrameOp
abstract  void preRendering(java.awt.Graphics g, int frame)
          Apply the pre-rendering portion of this FrameOp
protected  boolean shouldApplyAt(int frame)
          Should this FrameOp be applied at the given frame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

duration

protected int duration

first

protected int first
Constructor Detail

AbstractFrameOp

public AbstractFrameOp(int first,
                       int duration)
Explicit Value Constructor

Parameters:
first - The first frame
duration - The duration (in frames)
Method Detail

getFirstFrame

public int getFirstFrame()
Get the index of the first frame of this FrameOp

Specified by:
getFirstFrame in interface FrameOp
Returns:
The index of the first frame

getLastFrame

public int getLastFrame()
Get the index of the last frame of this FrameOp

Specified by:
getLastFrame in interface FrameOp
Returns:
The index of the last frame

hasFinishedAt

protected boolean hasFinishedAt(int frame)
Has this FrameOp finished at the given frame?

Returns:
true if finished; false otherwise

postRendering

public abstract void postRendering(java.awt.Graphics g,
                                   int frame)
Apply the post-rendering portion of this FrameOp

Specified by:
postRendering in interface FrameOp
Parameters:
g - The rendering engine
frame - The current frame number

preRendering

public abstract void preRendering(java.awt.Graphics g,
                                  int frame)
Apply the pre-rendering portion of this FrameOp

Specified by:
preRendering in interface FrameOp
Parameters:
g - The rendering engine
frame - The current frame number

shouldApplyAt

protected boolean shouldApplyAt(int frame)
Should this FrameOp be applied at the given frame

Returns:
true if yes; false otherwise


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers