public abstract class REpiceaExportTool extends java.lang.Object implements REpiceaShowableUIWithParent, javax.swing.event.CaretListener, javax.swing.event.ListSelectionListener
setFilename(myFile);
setSelectedOptions(mySelectedOptions);
exportRecordSets();
Modifier and Type | Class and Description |
---|---|
static class |
REpiceaExportTool.FieldName
The FieldName enum class defines the field names during the export.
|
static class |
REpiceaExportTool.InternalSwingWorkerForRecordSet
The abstract InternalSwingWorkerForRecordSet class is derived from the AbstractGenericTask class.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
appendFileEnabled |
protected REpiceaExportToolDialog |
guiInterface |
protected boolean |
multipleSelection |
protected boolean |
saveFileEnabled |
protected java.util.List<java.lang.Enum> |
selectedExportOptions |
Modifier | Constructor and Description |
---|---|
protected |
REpiceaExportTool()
General constructor with multiple selection mode set to false.
|
protected |
REpiceaExportTool(boolean multipleSelection)
General constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
caretUpdate(javax.swing.event.CaretEvent evt) |
protected java.util.Map<java.lang.Enum,REpiceaRecordSet> |
createRecordSets(java.util.List<java.lang.Enum> selectedOptions)
This method instantiates a InternalSwingWorkerForRecordSet-derived class, which handles the construction
of the GRecordSet instance.
|
protected abstract java.util.List<java.lang.Enum> |
defineAvailableExportOptions()
This method sets the available export options.
|
java.util.Map<java.lang.Enum,REpiceaRecordSet> |
exportRecordSets()
This method creates the different record sets depending on the selected export options.
|
protected java.util.List<java.lang.Enum> |
getAvailableExportOptions() |
protected java.lang.String |
getFilename() |
protected java.util.List<java.lang.Enum> |
getSelectedExportOptions() |
REpiceaExportToolDialog |
getUI(java.awt.Container parent)
This method returns the GUI interface of the class that implements this interface.
|
protected abstract REpiceaExportTool.InternalSwingWorkerForRecordSet |
instantiateInternalSwingWorkerForRecordSet(java.lang.Enum selectedOption,
REpiceaRecordSet recordSet)
This abstract method instantiates an InternalSwingWorkerForRecordSet-derived class, which is supposed to
handle the construction of the GRecordSet instance.
|
protected boolean |
isAppendFileEnabled() |
boolean |
isCanceled()
Returns true if the cancel button of the dialog has been pressed.
|
boolean |
isVisible()
This method returns true if the GUI is visible.
|
protected void |
removeExportOption(java.lang.Enum exportOption)
This method makes it possible to remove one export option if desired.
|
void |
setAppendFileEnabled(boolean appendFileEnabled)
If set to true, the export tool does not delete the file but rather it appends the records
to the existing file.
|
protected void |
setCanceled(boolean isCanceled) |
void |
setFilename(java.lang.String filename)
This method sets the filename of the output file.
|
void |
setMultipleSelection(boolean bool)
This method makes it possible to enable or disable the multiple export.
|
protected void |
setSaveFileEnabled(boolean bool)
This method makes it possible to disable the saving to file.
|
void |
setSelectedOptions(java.util.List<java.lang.Enum> selectedOptions)
This method sets the export options.
|
void |
showUI(java.awt.Window parent)
This method shows the GUI interface of the class that implements this interface.
|
void |
valueChanged(javax.swing.event.ListSelectionEvent arg0) |
protected java.util.List<java.lang.Enum> selectedExportOptions
protected transient REpiceaExportToolDialog guiInterface
protected boolean multipleSelection
protected boolean saveFileEnabled
protected boolean appendFileEnabled
protected REpiceaExportTool(boolean multipleSelection)
multipleSelection
- true to enable the multiple selection list in the user interface.protected REpiceaExportTool()
public void setMultipleSelection(boolean bool)
bool
- a booleanprotected abstract java.util.List<java.lang.Enum> defineAvailableExportOptions()
protected final java.util.Map<java.lang.Enum,REpiceaRecordSet> createRecordSets(java.util.List<java.lang.Enum> selectedOptions) throws java.lang.Exception
selectedOption
- the selected optionjava.lang.Exception
- if the worker does not terminate correctlyprotected abstract REpiceaExportTool.InternalSwingWorkerForRecordSet instantiateInternalSwingWorkerForRecordSet(java.lang.Enum selectedOption, REpiceaRecordSet recordSet)
recordSet
- a REpiceaRecordSet instanceselectedOption
- the selected output formatprotected java.util.List<java.lang.Enum> getSelectedExportOptions()
public void setSelectedOptions(java.util.List<java.lang.Enum> selectedOptions) throws java.lang.Exception
selectedOptions
- a set of Enum variables that should be among the available export optionsjava.lang.Exception
protected void removeExportOption(java.lang.Enum exportOption)
exportOption
- an enum variable that corresponds to the export option to be removedprotected java.util.List<java.lang.Enum> getAvailableExportOptions()
protected boolean isAppendFileEnabled()
public void setAppendFileEnabled(boolean appendFileEnabled)
appendFileEnabled
- protected void setCanceled(boolean isCanceled)
public boolean isCanceled()
public void setFilename(java.lang.String filename)
filename
- a Stringjava.io.IOException
- if the file type is unknownprotected java.lang.String getFilename()
public REpiceaExportToolDialog getUI(java.awt.Container parent)
REpiceaUIObjectWithParent
getUI
in interface REpiceaUIObjectWithParent
parent
- a parent Container instance (can be null)public void showUI(java.awt.Window parent)
REpiceaShowableUIWithParent
showUI
in interface REpiceaShowableUIWithParent
parent
- the parent Window instance (can be null)public void caretUpdate(javax.swing.event.CaretEvent evt)
caretUpdate
in interface javax.swing.event.CaretListener
public void valueChanged(javax.swing.event.ListSelectionEvent arg0)
valueChanged
in interface javax.swing.event.ListSelectionListener
public java.util.Map<java.lang.Enum,REpiceaRecordSet> exportRecordSets() throws java.lang.Exception
java.lang.Exception
public boolean isVisible()
REpiceaUIObjectWithParent
isVisible
in interface REpiceaUIObjectWithParent
protected void setSaveFileEnabled(boolean bool)
bool
- a boolean