Class XlsExportTask<XlsType>
- java.lang.Object
-
- javax.swing.SwingWorker<T,V>
-
- com.openindex.openestate.tool.ImmoToolTask<Long,Void>
-
- com.openindex.openestate.tool.utils.XlsExportTask<XlsType>
-
- Type Parameters:
XlsType- Klasse des XLS-Quellobjektes
- All Implemented Interfaces:
PropertyChangeListener,Runnable,Future<Long>,RunnableFuture<Long>,EventListener
- Direct Known Subclasses:
AgencyEstateExportXlsTask,ContactsEntryExportXlsTask
public abstract class XlsExportTask<XlsType> extends ImmoToolTask<Long,Void>
AllgemeinerImmoToolTaskzum Export von Excel-Tabellen.- Author:
- Andreas Rudolph
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openindex.openestate.tool.ImmoToolTask
ImmoToolTask.Adapter, ImmoToolTask.Callback, ImmoToolTask.Listener
-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXlsExportTask(AbstractDbDriver dbDriver, File xlsFile, Charset xlsCharset, String xlsTitle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected jxl.write.WritableWorkbookcreateWorkbook(File f, jxl.WorkbookSettings settings)protected LongdoInBackground()protected LongexecuteExport()AbstractDbDrivergetDbDriver()protected abstract StringgetFieldTitle(int index)protected jxl.write.WritableCellFormatgetFootlineFormat(boolean bold)protected jxl.write.WritableCellFormatgetHeadlineFormat(boolean bold)protected intgetHeadlineRowspan()protected String[]getHeadlineValues(int index)protected jxl.write.WritableCellFormatgetRow1Format()protected jxl.write.WritableCellFormatgetRow2Format()FilegetXlsFile()protected abstract String[]loadEmptyContainer()protected abstract XlsType[]loadXlsObjects()protected voidwriteValue(int field, String value, String[] values)protected abstract voidwriteValues(XlsType src, String[] dest)-
Methods inherited from class com.openindex.openestate.tool.ImmoToolTask
addListener, cancelled, checkCancelled, createCallback, done, executeAndWait, executeAndWait, failed, finished, getDescription, getId, getMessage, getParentWindow, getTaskDialog, getTitle, isCancelException, isPending, isStarted, process, propertyChange, removeListener, setDescription, setMessage, setParentWindow, setProgress, setProgress, setProgress, setProgress, setTaskDialog, setTitle, succeeded
-
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
-
-
-
-
Constructor Detail
-
XlsExportTask
protected XlsExportTask(AbstractDbDriver dbDriver, File xlsFile, Charset xlsCharset, String xlsTitle)
-
-
Method Detail
-
createWorkbook
protected jxl.write.WritableWorkbook createWorkbook(File f, jxl.WorkbookSettings settings) throws IOException
- Throws:
IOException
-
doInBackground
protected Long doInBackground() throws Exception
- Specified by:
doInBackgroundin classImmoToolTask<Long,Void>- Throws:
Exception
-
executeExport
protected Long executeExport() throws IOException, jxl.write.WriteException, SQLException
- Throws:
IOExceptionjxl.write.WriteExceptionSQLException
-
getDbDriver
public AbstractDbDriver getDbDriver()
-
getFieldTitle
protected abstract String getFieldTitle(int index)
-
getFootlineFormat
protected jxl.write.WritableCellFormat getFootlineFormat(boolean bold) throws jxl.write.WriteException- Throws:
jxl.write.WriteException
-
getHeadlineFormat
protected jxl.write.WritableCellFormat getHeadlineFormat(boolean bold) throws jxl.write.WriteException- Throws:
jxl.write.WriteException
-
getHeadlineRowspan
protected int getHeadlineRowspan()
-
getHeadlineValues
protected String[] getHeadlineValues(int index)
-
getRow1Format
protected jxl.write.WritableCellFormat getRow1Format() throws jxl.write.WriteException- Throws:
jxl.write.WriteException
-
getRow2Format
protected jxl.write.WritableCellFormat getRow2Format() throws jxl.write.WriteException- Throws:
jxl.write.WriteException
-
getXlsFile
public File getXlsFile()
-
loadEmptyContainer
protected abstract String[] loadEmptyContainer()
-
loadXlsObjects
protected abstract XlsType[] loadXlsObjects() throws SQLException
- Throws:
SQLException
-
-