public class MainWindow extends java.lang.Object implements PrefsListener
Modifier | Constructor and Description |
---|---|
private |
MainWindow()
Hide the default constructor from other classes.
|
Modifier and Type | Method and Description |
---|---|
private void |
addPopup(java.awt.Component component,
javax.swing.JPopupMenu popup)
Adds a popup menu to the input component.
|
private void |
clearAllFiles()
Remove all files from the list.
|
private void |
clearSelectedFiles(boolean warn)
Remove the selected file(s) from the list, and warn the user if requested.
|
private void |
doStartup()
Initializes the MainWindow.
|
private void |
doStartUpWithQuickLaunchDialog()
Initializes the MainWindow and shows the quick launch dialog.
|
private void |
drawMap()
TODO
|
private void |
editSelectedFile()
Opens FHRecorder to allow editing of the currently selected file, if one has been selected.
|
FeedbackMessagePanel |
getFeedbackMessagePanel()
Gets the feedbackMessagePanel instance.
|
static MainWindow |
getInstance()
Singleton instance access method - call this when you want to use the MainWindow.
|
private java.io.File[] |
getSelectedValidFiles()
Get an array of files that are valid and have fire events.
|
private java.io.File[] |
getSelectedValidFilesWithEvents()
Get an array of files that are valid and have fire events.
|
private void |
handleFileListChanged()
Run when file list is changed.
|
private void |
handleFileSelectionChanged()
Handles when an FHX file is selected on the MainWindow.
|
private void |
initActions()
Initialize the menu and toolbar actions.
|
private void |
initGUI()
Initialize the main frame.
|
private void |
initMenu()
Initialize the menus.
|
private void |
initToolbar()
Initialize the toolbar.
|
protected boolean |
isFileListPopulated()
Returns false if the file list is empty or has not been initialized.
|
private void |
loadFile(java.io.File file)
Try to load an FHX file.
|
private void |
loadFileByName(java.lang.String file)
Try to load an FHX file specified by a string file name.
|
void |
loadFiles(java.io.File[] files)
Loads the selected files into FHAES.
|
static void |
main(java.lang.String[] args)
Launch the application.
|
private void |
openCategoryFile(java.io.File categoryFile)
Opens a category file to attach attributes to the selected FHX file.
|
protected void |
openFileRecorder(java.io.File f)
Open the FHRecorder frame with the specified file.
|
protected void |
openFiles()
Open dialog for user to choose FHX files to work on.
|
private void |
plotChart()
Open FHChart for currently selected file.
|
void |
prefChanged(PrefsEvent e)
Handles when a preference change occurs on MainWindow.
|
protected void |
repaintFileList()
Repaints the file list.
|
private void |
saveAllFileSummaries(java.io.File outputFolder,
java.lang.Boolean confirmedOverwriteOK)
Saves the summaries for all files to disk.
|
private void |
saveAllOutputFiles()
Save reports for all files to disk.
|
private void |
saveCurrentFileSummary()
Save the summary of the current file to disk.
|
private void |
saveFileSummary()
Save report for currently selected file to disk.
|
private void |
saveFileSummary(java.io.File fileToSave,
java.io.File outputFolder)
Save report for specified file to disk.
|
void |
setBusyCursor(boolean b)
Sets the cursor to busy or default state as determined by the input parameter.
|
private void |
updateRecentDocsMenu()
TODO
|
private int |
writeTextAreaToDisk(java.lang.String filename,
javax.swing.JTextArea ta,
java.lang.Boolean confirmedOverwriteOK)
Write the specified text area to a file on disk.
|
private static MainWindow instanceOfMainWindow
private static final java.util.ResourceBundle BUNDLE
private static final org.slf4j.Logger log
public static final java.awt.Color MAC_BACKGROUND_COLOR
private static final int INDEX_REPRESENTING_NO_FILES
private static final int LARGE_DATASET_THRESHOLD
private static final int MANUALLY_SORT_FILES
protected javax.swing.JFrame frame
private javax.swing.JMenu mnOpenRecent
private javax.swing.JMenu mnSave
private javax.swing.JComboBox fileSortComboBox
private javax.swing.JSplitPane splitPane
private javax.swing.JPanel leftSplitPanel
protected ReportPanel rightSplitPanel
private FileListModel fileListModel
private FileDropTargetListener fhxFileList
private FeedbackMessagePanel feedbackMessagePanel
public static FHAESAction actionFileExit
private FHAESAction actionFileOpen
public static FHAESAction actionHelp
public static FHAESAction actionAbout
private FHAESAction actionClearList
private FHAESAction actionClearCurrent
private FHAESAction actionSave
private FHAESAction actionSaveCurrentSummary
private FHAESAction actionSaveAllSummaries
private FHAESAction actionSaveAll
private FHAESAction actionSpatialJoin
private FHAESAction actionDrawMap
protected FHAESAction actionJSEAConfig
private FHAESAction actionFileNew
protected FHAESAction actionEditFile
private FHAESAction actionShowLogViewer
private FHAESAction actionMergeFiles
private FHAESAction actionCreateEventFile
private FHAESAction actionCreateNewEventFile
private FHAESAction actionCreateCompositeFile
private FHAESAction actionCreateNewCompositeFile
private FHAESAction actionCheckForUpdates
protected FHAESAction actionSaveResults
private FHAESAction actionGenerateSHP
private FHAESAction actionFHSampleSize
private FHAESAction actionOpenCategoryFile
private FHAESAction actionEditCategories
private FHAESAction actionShowQuickLaunch
protected FHAESAction actionPrefChangeShowQuickLaunch
private FHAESAction actionPrefChangeAutoLoadCategories
private FHAESAction actionResetAllFeedbackMessagePrefs
public static ChartActions chartActions
private java.lang.Boolean fileListListenerPaused
private java.lang.Integer selectedFileIndex
private static Log4JViewer logviewer
public static void main(java.lang.String[] args)
public static MainWindow getInstance()
private void doStartup()
private void doStartUpWithQuickLaunchDialog()
private void clearAllFiles()
private void clearSelectedFiles(boolean warn)
warn
- private void saveAllOutputFiles()
private void saveFileSummary()
private void saveFileSummary(java.io.File fileToSave, java.io.File outputFolder)
fileToSave
- outputFolder
- private void saveAllFileSummaries(java.io.File outputFolder, java.lang.Boolean confirmedOverwriteOK)
outputFolder
- confirmedOverwriteOK
- private void saveCurrentFileSummary()
private int writeTextAreaToDisk(java.lang.String filename, javax.swing.JTextArea ta, java.lang.Boolean confirmedOverwriteOK)
filename
- ta
- confirmedOverwriteOK
- private void loadFile(java.io.File file)
file
- public void loadFiles(java.io.File[] files)
files
- private void loadFileByName(java.lang.String file)
file
- protected void openFiles()
private void openCategoryFile(java.io.File categoryFile)
protected void openFileRecorder(java.io.File f)
f
- private void editSelectedFile()
private java.io.File[] getSelectedValidFiles()
private java.io.File[] getSelectedValidFilesWithEvents()
private void drawMap()
private void plotChart()
public void prefChanged(PrefsEvent e)
prefChanged
in interface PrefsListener
e
- the event objectpublic void setBusyCursor(boolean b)
b
- protected boolean isFileListPopulated()
protected void repaintFileList()
private void handleFileListChanged()
private void handleFileSelectionChanged()
private void addPopup(java.awt.Component component, javax.swing.JPopupMenu popup)
component
- popup
- private void updateRecentDocsMenu()
public FeedbackMessagePanel getFeedbackMessagePanel()
private void initGUI()
private void initActions()
private void initMenu()
private void initToolbar()