net.grelf.grip
Class BatchProcessor

java.lang.Object
  extended by net.grelf.grip.BatchProcessor

public class BatchProcessor
extends java.lang.Object

Batch processor.


Constructor Summary
BatchProcessor()
           
 
Method Summary
protected  void astroPass2()
          Pass 2: for each adjusted image, "astro" action only
 void batch(java.io.File[] files, java.lang.String action, java.lang.String fileNameModifier, java.util.Map<java.lang.String,java.lang.Object> params)
          Perform batch processing on the given array of files.
 void batch(java.lang.String action, java.lang.String fileNameModifier, java.util.Map<java.lang.String,java.lang.Object> params)
          Ask the user to select the files for processing, then call the other batch() method with them, on a worker thread.
 void batch(java.lang.String action, java.lang.String fileNameModifier, java.util.Map<java.lang.String,java.lang.Object> params, int nPasses)
          Ask the user to select the files for processing, then call the other batch() method with them, on a worker thread.
protected  void cropOthers(java.awt.Point pt1, java.awt.Point pt2)
          Nov 07: No longer static.
 void doOpInBackground(java.io.File[] files, java.lang.String action, java.lang.String fileNameModifier, java.util.Map<java.lang.String,java.lang.Object> params, int nSteps)
          For particularly long operations, run them on a worker thread rather than clog up swing's event dispatch thread.
static boolean isBatchCropping()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchProcessor

public BatchProcessor()
Method Detail

batch

public void batch(java.lang.String action,
                  java.lang.String fileNameModifier,
                  java.util.Map<java.lang.String,java.lang.Object> params)
Ask the user to select the files for processing, then call the other batch() method with them, on a worker thread. Convenience version for when nPasses = 1.


batch

public void batch(java.lang.String action,
                  java.lang.String fileNameModifier,
                  java.util.Map<java.lang.String,java.lang.Object> params,
                  int nPasses)
Ask the user to select the files for processing, then call the other batch() method with them, on a worker thread.


batch

public void batch(java.io.File[] files,
                  java.lang.String action,
                  java.lang.String fileNameModifier,
                  java.util.Map<java.lang.String,java.lang.Object> params)
Perform batch processing on the given array of files. This is meant to be called from a worker thread, eg as set up by doOpInBackground ().

Parameters:
fileNameModifier - Append this string to the name of the file when it is saved after processing, so the original is not overwritten.
params - Some batch processes expect parameters. These will have been obtained before calling this method, either from a configuration file or by asking the user. For example, rotation needs to know an angle.

astroPass2

protected void astroPass2()
Pass 2: for each adjusted image, "astro" action only


isBatchCropping

public static boolean isBatchCropping()

cropOthers

protected void cropOthers(java.awt.Point pt1,
                          java.awt.Point pt2)
Nov 07: No longer static.


doOpInBackground

public void doOpInBackground(java.io.File[] files,
                             java.lang.String action,
                             java.lang.String fileNameModifier,
                             java.util.Map<java.lang.String,java.lang.Object> params,
                             int nSteps)
For particularly long operations, run them on a worker thread rather than clog up swing's event dispatch thread. Displays a javax.swing.ProgressMonitor which uses file number as a measure of progress.