|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bill.util.config.Configuration | +--bill.util.csv.gui.CSVConfiguration
This class extends the standard Configuration class to provide some GUI specific functionality.
Fields inherited from class bill.util.config.Configuration |
_currentSection, _fileName, _sectionNames, _sections, ENTRY_CONFLICT_APPEND, ENTRY_CONFLICT_DISCARD, ENTRY_CONFLICT_OVERWRITE, SECTION_CONFLICT_APPEND, SECTION_CONFLICT_DISCARD, SECTION_CONFLICT_INCLUDE, SECTION_CONFLICT_OVERWRITE |
Constructor Summary | |
CSVConfiguration(String fileName,
CSVGUI gui)
Class creator. |
Method Summary | |
void |
addAFile(String logicalName,
String physicalName)
Add the specified configuration file to the list of defined configuration files. |
String |
getFileLocation(String logicalName)
Determines the location (directory and file name) for the specified logical file. |
Vector |
getFileNames()
Creates a list of all logical names of the configuration files contained in the current project configuration file. |
String |
getLogicalFileName(String location)
Determines the logical file name given a physical file location (directory and file name). |
boolean |
isModified()
Checks to see if the configuration data defined has been modified since it's last saved. |
void |
loadColumnWidths(String logicalName,
JTable csvTable)
Loads and sets the JTable's column widths from to our project configuration file so the user sees this item as it was when they last viewed it. |
void |
removeAFile(String logicalName,
String physicalName)
Remove the specified configuration file from the list of defined configuration files. |
boolean |
save(String fileName)
Method to save the configuration back to a file. |
void |
saveColumnWidths(String logicalName,
JTable csvTable)
Stores the JTable's column widths off to our project configuration file so if the user returns to this item we can display it the same as it was when they left. |
void |
setModified(boolean modified)
Sets the modification indicator as indicated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CSVConfiguration(String fileName, CSVGUI gui) throws FileNotFoundException, IOException, ConfigurationException
fileName
- Name of the configuration file to process.gui
- The CSVGUI instance that is creating us. Used during
the save process to determine the individual project configuration files
that we need to save. For the project configuration file this has a value,
but for the project's individual configuration files it is null
.FileNotFoundException
- Indicates the file name passed in does
not exist or cannot be accessed.IOException
- File was found but an error occurred while reading it.ConfigurationException
- A processing error was encountered while
reading the configuration file, typically a syntax error.Method Detail |
public Vector getFileNames()
public void addAFile(String logicalName, String physicalName) throws ConfigurationException
logicalName
- The logical name of the configuration file to be addedphysicalName
- The physical name of the configuration file to be
added.public void removeAFile(String logicalName, String physicalName)
logicalName
- The logical name of the configuration file to be
removedphysicalName
- The physical name of the configuration file to be
removed.public String getFileLocation(String logicalName)
logicalName
- The logical file name to find the location forpublic String getLogicalFileName(String location)
location
- The location of the physical file to find the logic nam
for.
null
if none is found.public void saveColumnWidths(String logicalName, JTable csvTable)
logicalName
- The logical name of the file the user was viewing.csvTable
- The JTable that we are saving the widths for.public void loadColumnWidths(String logicalName, JTable csvTable)
logicalName
- The logical name of the file the user is viewing.csvTable
- The JTable that we are setting the widths for.public boolean isModified()
true
if the data has been modified, false
otherwise.public void setModified(boolean modified)
modified
- The value to set the modification indicator to.public boolean save(String fileName)
fileName
- File name to save the configuration file under.true
if the save is successful, false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |