net.sf.dc.export
Class TableToFileExporter

java.lang.Object
  extended byjava.lang.Thread
      extended bynet.sf.dc.export.TableToFileExporter
All Implemented Interfaces:
java.lang.Runnable

public class TableToFileExporter
extends java.lang.Thread

Creates a PDF or HTML document / report based on a set of data crow objects. Hidden and empty fields are not reported on. The format and layout of the document is simple and straight forward. iText is used to created the actual report

Since:
1.3
Version:
1.5 TODO: Add support for child records
Author:
Robert Jan van der Waals

Field Summary
static int _HTML
           
static int _PDF
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TableToFileExporter(ExportToPdfDialog ui, DCObject[] objects, int reportType, java.io.File target)
          Starts the report creation for a set of data crow objects.
 
Method Summary
 void cancel()
           
 void run()
          Actual reporting thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_PDF

public static final int _PDF
See Also:
Constant Field Values

_HTML

public static final int _HTML
See Also:
Constant Field Values
Constructor Detail

TableToFileExporter

public TableToFileExporter(ExportToPdfDialog ui,
                           DCObject[] objects,
                           int reportType,
                           java.io.File target)
Starts the report creation for a set of data crow objects. The creation of the report is run in a seperate thread / process.

Parameters:
ui - the dialog listening in on this process
objects - data crow objects to report on
reportType - HTML or PDF document type
target - the target PDF or HTM file
Method Detail

cancel

public void cancel()

run

public void run()
Actual reporting thread. Writes the data from the data crow object into the report. If a value is hidden or empty, it is not written to the report