public class ImportFieldManager extends java.lang.Object implements java.io.Serializable, IOUserInterfaceableObject, REpiceaShowableUIWithParent
Constructor and Description |
---|
ImportFieldManager(java.util.List<ImportFieldElement> vector,
java.lang.String... fileSpec)
General constructor.
|
Modifier and Type | Method and Description |
---|---|
protected ImportFieldElement |
checkFields() |
static ImportFieldManager |
createImportFieldManager(java.lang.String ifeFilename,
java.lang.String... fileSpec)
This method returns an ImportFieldManager loaded from the filename parameter.
|
ImportFieldElement |
getField(java.lang.Enum fieldID)
This method returns the ImportFieldElement object corresponding to the FieldID parameter.
|
java.util.List<ImportFieldElement> |
getFields()
This method provides the vector of ImportFieldElement objects.
|
javax.swing.filechooser.FileFilter |
getFileFilter()
This method returns the appropriate FileFilter instance for this class.
|
java.lang.String |
getFilename()
This method returns the filename of the parameters.
|
java.lang.String[] |
getFileSpecifications()
The file specification is an array of strings that first contains the filename.
|
protected java.util.Vector<FormatField> |
getFormatFields() |
int |
getIndexOfThisField(java.lang.Enum fieldID)
This method returns the index of the field within the vector of ImportFieldElement objects
|
protected java.lang.Enum |
getStratumFieldEnum() |
ImportFieldManagerDialog |
getUI(java.awt.Container parent)
This method returns the GUI interface of the class that implements this interface.
|
protected boolean |
isPopupInGuiInterfaceEnabled() |
protected boolean |
isUserValidated() |
boolean |
isVisible()
This method returns true if the GUI is visible.
|
void |
load(java.lang.String filename)
This method makes it possible to load information from a file.
|
void |
save(java.lang.String filename)
This method saves the records in a file denominated by the filename parameter.
|
protected void |
saveDefaultValues()
This method saves the values of the properties.
|
void |
setFileSpecifications(java.lang.String... fileSpec)
This method sets the name of the DBF file and reads the fields of this file
|
void |
setImportElementIndex()
This method sets the index of the fields.
|
void |
setPopupInGuiInterfaceEnabled(boolean popupInGuiInterfaceEnabled) |
protected void |
setStratumFieldEnum(java.lang.Enum<?> stratumFieldEnum) |
protected void |
setUserValidated(boolean userValidated) |
void |
showUI(java.awt.Window parent)
This method shows the GUI interface of the class that implements this interface.
|
public ImportFieldManager(java.util.List<ImportFieldElement> vector, java.lang.String... fileSpec) throws java.lang.Exception
vector
- a vector defining the fields requested (i.e. ImportFieldElement instances)fileSpec
- the filename of the file to be read and the other specifications such as the table for instancejava.lang.Exception
public void setImportElementIndex()
protected boolean isPopupInGuiInterfaceEnabled()
public void setPopupInGuiInterfaceEnabled(boolean popupInGuiInterfaceEnabled)
public java.lang.String[] getFileSpecifications()
protected boolean isUserValidated()
protected void setUserValidated(boolean userValidated)
protected ImportFieldElement checkFields()
public void setFileSpecifications(java.lang.String... fileSpec) throws java.io.IOException
fileSpec
- the DBF filejava.lang.Exception
java.io.IOException
public java.util.List<ImportFieldElement> getFields()
protected java.util.Vector<FormatField> getFormatFields()
public int getIndexOfThisField(java.lang.Enum fieldID)
fieldID
- = is the id of the fieldprotected void saveDefaultValues()
public ImportFieldElement getField(java.lang.Enum fieldID)
fieldID
- a FieldID enum variablepublic static ImportFieldManager createImportFieldManager(java.lang.String ifeFilename, java.lang.String... fileSpec) throws java.io.IOException, XmlMarshallException
ifeFilename
- the file that contains the vector of ImportFieldElementfileSpec
- the file to be read and all the required specifications such as the table for instanceXmlMarshallException
java.io.FileNotFoundException
java.io.IOException
public ImportFieldManagerDialog 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)protected void setStratumFieldEnum(java.lang.Enum<?> stratumFieldEnum)
protected java.lang.Enum getStratumFieldEnum()
public void save(java.lang.String filename) throws java.io.IOException
Saveable
public void load(java.lang.String filename) throws java.io.IOException
Loadable
public javax.swing.filechooser.FileFilter getFileFilter()
IOUserInterfaceableObject
getFileFilter
in interface IOUserInterfaceableObject
public java.lang.String getFilename()
IOUserInterfaceableObject
getFilename
in interface IOUserInterfaceableObject
public boolean isVisible()
REpiceaUIObjectWithParent
isVisible
in interface REpiceaUIObjectWithParent