Package edu.umd.cs.findbugs.gui2
Class MainFrameLoadSaveHelper
- java.lang.Object
-
- edu.umd.cs.findbugs.gui2.MainFrameLoadSaveHelper
-
- All Implemented Interfaces:
java.io.Serializable
public class MainFrameLoadSaveHelper extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
MainFrameLoadSaveHelper.SaveReturn
-
Field Summary
Fields Modifier and Type Field Description private FBFileChooser
filterOpenFileChooser
private MainFrame
mainFrame
private FBFileChooser
saveOpenFileChooser
-
Constructor Summary
Constructors Constructor Description MainFrameLoadSaveHelper(MainFrame mainFrame)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
askToSave()
Returns true if cancelled(package private) void
closeProject()
private void
closeProjectInternal()
(package private) java.io.File
convertFile(java.io.File f, SaveType fileType)
(package private) SaveType
convertFilterToType(javax.swing.filechooser.FileFilter f)
(package private) boolean
exportFilter()
(package private) boolean
fileAlreadyExists(java.io.File f)
(package private) void
importFilter()
This method is for when the user wants to open a file.void
initialize()
(package private) void
loadAnalysis(java.io.File file)
(package private) void
loadAnalysis(java.net.URL url)
(package private) void
loadProjectFromFile(java.io.File f)
(package private) void
mergeAnalysis()
(package private) void
open()
This method is for when the user wants to open a file.(package private) boolean
openFBAFile(java.io.File f)
(package private) boolean
openFBPFile(java.io.File f)
(package private) void
prepareForFileLoad(java.io.File f, SaveType saveType)
(package private) MainFrameLoadSaveHelper.SaveReturn
printHtml(java.io.File f)
(package private) void
save()
(package private) MainFrameLoadSaveHelper.SaveReturn
saveAnalysis(java.io.File f)
Save current analysis as file passed in.(package private) boolean
saveAs()
(package private) MainFrameLoadSaveHelper.SaveReturn
saveFBAFile(java.io.File saveFile2)
(package private) MainFrameLoadSaveHelper.SaveReturn
saveFBPFile(java.io.File saveFile2)
-
-
-
Field Detail
-
mainFrame
private final MainFrame mainFrame
-
saveOpenFileChooser
private FBFileChooser saveOpenFileChooser
-
filterOpenFileChooser
private FBFileChooser filterOpenFileChooser
-
-
Constructor Detail
-
MainFrameLoadSaveHelper
public MainFrameLoadSaveHelper(MainFrame mainFrame)
-
-
Method Detail
-
initialize
public void initialize()
-
importFilter
void importFilter()
This method is for when the user wants to open a file.
-
open
void open()
This method is for when the user wants to open a file.
-
askToSave
private boolean askToSave()
Returns true if cancelled
-
openFBAFile
boolean openFBAFile(java.io.File f)
-
openFBPFile
boolean openFBPFile(java.io.File f)
-
exportFilter
boolean exportFilter()
-
saveAs
boolean saveAs()
-
convertFilterToType
SaveType convertFilterToType(javax.swing.filechooser.FileFilter f)
-
fileAlreadyExists
boolean fileAlreadyExists(java.io.File f)
-
convertFile
java.io.File convertFile(java.io.File f, SaveType fileType)
-
save
void save()
-
saveFBAFile
MainFrameLoadSaveHelper.SaveReturn saveFBAFile(java.io.File saveFile2)
-
saveFBPFile
MainFrameLoadSaveHelper.SaveReturn saveFBPFile(java.io.File saveFile2)
-
printHtml
MainFrameLoadSaveHelper.SaveReturn printHtml(java.io.File f)
-
saveAnalysis
MainFrameLoadSaveHelper.SaveReturn saveAnalysis(java.io.File f)
Save current analysis as file passed in. Return SAVE_SUCCESSFUL if save successful. Method doesn't do much. This method is more if need to do other things in the future for saving analysis. And to keep saving naming convention.
-
prepareForFileLoad
void prepareForFileLoad(java.io.File f, SaveType saveType)
-
closeProject
void closeProject()
-
closeProjectInternal
private void closeProjectInternal()
-
loadAnalysis
void loadAnalysis(java.io.File file)
-
loadAnalysis
void loadAnalysis(java.net.URL url)
-
loadProjectFromFile
void loadProjectFromFile(java.io.File f)
-
mergeAnalysis
void mergeAnalysis()
-
-