net.sf.jomic.comic
Class CreatePdfComicTask

java.lang.Object
  extended by net.sf.jomic.tools.AbstractTask
      extended by net.sf.jomic.comic.AbstractCreateComicTask
          extended by net.sf.jomic.comic.CreatePdfComicTask
All Implemented Interfaces:
Task

public class CreatePdfComicTask
extends AbstractCreateComicTask

Task to create a PDF comic from a set of image files.

Author:
Thomas Aglassinger

Constructor Summary
CreatePdfComicTask(java.io.File newSourceBaseDir, java.lang.String[] newSourceFileNames, java.util.Map newImageInfoMap, java.io.File newTargetPdfFile, Conversion newConversion)
           
 
Method Summary
protected  void addImageFile(java.lang.String outName, java.io.File imageFile)
          Add an image file to the target comic stream/document/file/whatever.
protected  void cleanUpComic()
          Release all resources need allocated by setUpComic() to create the target comic stream/document/file/whatever.
protected  void setUpComic()
          Allocate all resources needed to create the target comic file.
 
Methods inherited from class net.sf.jomic.comic.AbstractCreateComicTask
enableAddedAtLeastOneImage, getConversion, getImageInfo, getSourceBaseDir, getTargetComicFile, hasAddedAtLeastOneImage, start
 
Methods inherited from class net.sf.jomic.tools.AbstractTask
addProgressChangeListener, getMaxProgress, getProgress, getProgressMessage, isInterrupted, removeProgressChangeListener, setMaxProgress, setProgress, setProgressMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreatePdfComicTask

public CreatePdfComicTask(java.io.File newSourceBaseDir,
                          java.lang.String[] newSourceFileNames,
                          java.util.Map newImageInfoMap,
                          java.io.File newTargetPdfFile,
                          Conversion newConversion)
Method Detail

setUpComic

protected void setUpComic()
                   throws java.lang.Exception
Description copied from class: AbstractCreateComicTask
Allocate all resources needed to create the target comic file. They will be released when done by calling cleanUpComic() either when done or an error occurs.

Specified by:
setUpComic in class AbstractCreateComicTask
Throws:
java.lang.Exception
See Also:
AbstractCreateComicTask.cleanUpComic()

addImageFile

protected void addImageFile(java.lang.String outName,
                            java.io.File imageFile)
                     throws java.lang.Exception
Description copied from class: AbstractCreateComicTask
Add an image file to the target comic stream/document/file/whatever.

Specified by:
addImageFile in class AbstractCreateComicTask
Parameters:
outName - the name under which the image should be stored (if applicable for the output format)
imageFile - the source image file to be added
Throws:
java.lang.Exception

cleanUpComic

protected void cleanUpComic()
                     throws java.lang.Exception
Description copied from class: AbstractCreateComicTask
Release all resources need allocated by setUpComic() to create the target comic stream/document/file/whatever. This will be called in any case even if something went wrong during setUpComic() so this routine must be able to handle null values without resulting in NullPointerExceptions.

Specified by:
cleanUpComic in class AbstractCreateComicTask
Throws:
java.lang.Exception
See Also:
AbstractCreateComicTask.setUpComic()