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>
AllgemeinerImmoToolTask
zum 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 protected
XlsExportTask(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.WritableWorkbook
createWorkbook(File f, jxl.WorkbookSettings settings)
protected Long
doInBackground()
protected Long
executeExport()
AbstractDbDriver
getDbDriver()
protected abstract String
getFieldTitle(int index)
protected jxl.write.WritableCellFormat
getFootlineFormat(boolean bold)
protected jxl.write.WritableCellFormat
getHeadlineFormat(boolean bold)
protected int
getHeadlineRowspan()
protected String[]
getHeadlineValues(int index)
protected jxl.write.WritableCellFormat
getRow1Format()
protected jxl.write.WritableCellFormat
getRow2Format()
File
getXlsFile()
protected abstract String[]
loadEmptyContainer()
protected abstract XlsType[]
loadXlsObjects()
protected void
writeValue(int field, String value, String[] values)
protected abstract void
writeValues(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:
doInBackground
in classImmoToolTask<Long,Void>
- Throws:
Exception
-
executeExport
protected Long executeExport() throws IOException, jxl.write.WriteException, SQLException
- Throws:
IOException
jxl.write.WriteException
SQLException
-
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
-
-