Class MainFrame

All Implemented Interfaces:
LogSync, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class MainFrame extends FBFrame implements LogSync
See Also:
  • Field Details

    • GUI2_DEBUG

      public static final boolean GUI2_DEBUG
    • MAC_OS_X

      public static final boolean MAC_OS_X
    • TITLE_START_TXT

      public static final String TITLE_START_TXT
      See Also:
    • USE_WINDOWS_LAF

      public static final boolean USE_WINDOWS_LAF
      See Also:
  • Method Details

    • makeInstance

      public static void makeInstance(FindBugsLayoutManagerFactory factory)
    • getInstance

      public static MainFrame getInstance()
    • showMessageDialog

      public void showMessageDialog(String message)
    • showConfirmDialog

      public int showConfirmDialog(String message, String title, String ok, String cancel)
    • getGuiCallback

      public IGuiCallback getGuiCallback()
    • acquireDisplayWait

      public void acquireDisplayWait()
    • releaseDisplayWait

      public void releaseDisplayWait()
    • waitUntilReady

      public void waitUntilReady() throws InterruptedException
      Throws:
      InterruptedException
    • getTree

      public JTree getTree()
    • getBugTreeModel

      public BugTreeModel getBugTreeModel()
    • getProject

      @Nonnull public Project getProject()
    • setProject

      public void setProject(Project p)
    • setProjectChanged

      public void setProjectChanged(boolean b)
      Called when something in the project is changed and the change needs to be saved. This method should be called instead of using projectChanged = b.
    • error

      public void error(String message)
      Show an error dialog.
      Specified by:
      error in interface LogSync
    • writeToLog

      public void writeToLog(String message)
      Write a message to stdout.
      Specified by:
      writeToLog in interface LogSync
    • showConfirmDialog

      public int showConfirmDialog(String message, String title, int optionType)
    • getAvailableSortables

      public Sortables[] getAvailableSortables()
    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class FBFrame
    • openAnalysis

      public boolean openAnalysis(File f, edu.umd.cs.findbugs.gui2.SaveType saveType)
      Opens the analysis. Also clears the source and summary panes. Makes comments enabled false. Sets the saveType and adds the file to the recent menu.
      Parameters:
      f -
      Returns:
      whether the operation was successful
    • openBugCollection

      public void openBugCollection(SortedBugCollection bugs)
    • createNewProjectFromMenuItem

      public void createNewProjectFromMenuItem()
    • displayCloudReport

      public void displayCloudReport()
    • updateBugTree

      public void updateBugTree()
    • resetViewCache

      public void resetViewCache()
    • updateTitle

      public void updateTitle()
      Changes the title based on curProject and saveFile.
    • selectPackagePrefixByProject

      public void selectPackagePrefixByProject()
    • clearSummaryTab

      public void clearSummaryTab()
    • searchSource

      public void searchSource(int type)
    • canNavigateAway

      public boolean canNavigateAway()
    • createProjectSettings

      public void createProjectSettings()
    • addFileToRecent

      public void addFileToRecent(File xmlFile)
    • setSaveType

      public void setSaveType(edu.umd.cs.findbugs.gui2.SaveType saveType)
    • getSaveType

      public edu.umd.cs.findbugs.gui2.SaveType getSaveType()
    • getCurrentSelectedBugLeaf

      public BugLeafNode getCurrentSelectedBugLeaf()
    • getCurrentSelectedBugAspects

      public BugAspects getCurrentSelectedBugAspects()
    • getSourceCodeTextPane

      public NavigableTextPane getSourceCodeTextPane()
    • getBugCollection

      public BugCollection getBugCollection()
    • isProjectChanged

      public boolean isProjectChanged()
    • getSaveFile

      public File getSaveFile()
    • getCurrentProject

      public Project getCurrentProject()
    • getSaveMenuItem

      public JMenuItem getSaveMenuItem()
    • setSaveFile

      public void setSaveFile(File saveFile)
    • getBackgroundExecutor

      public ExecutorService getBackgroundExecutor()
    • getComments

      public CommentsArea getComments()
    • getReconfigMenuItem

      public JMenuItem getReconfigMenuItem()
    • getSourceCodeDisplayer

      public SourceCodeDisplay getSourceCodeDisplayer()
    • getProjectPackagePrefixes

      public ProjectPackagePrefixes getProjectPackagePrefixes()
    • enableRecentMenu

      public void enableRecentMenu(boolean enable)
    • setCurrentSelectedBugAspects

      public void setCurrentSelectedBugAspects(BugAspects currentSelectedBugAspects)
    • getViewFilter

      public ViewFilter getViewFilter()
    • getCurProject

      public Project getCurProject()
    • getMainFrameLoadSaveHelper

      public MainFrameLoadSaveHelper getMainFrameLoadSaveHelper()
    • getGuiLayout

      public FindBugsLayoutManager getGuiLayout()
    • getMainFrameTree

      public MainFrameTree getMainFrameTree()
    • projectChanged

      public boolean projectChanged()
    • getMainFrameMenu

      public MainFrameMenu getMainFrameMenu()
    • getSummaryHtmlArea

      public JEditorPane getSummaryHtmlArea()
    • getStatusBarLabel

      public JLabel getStatusBarLabel()
    • getFindNextButton

      public JButton getFindNextButton()
    • getSummaryHtmlScrollPane

      public JScrollPane getSummaryHtmlScrollPane()
    • getFindPreviousButton

      public JButton getFindPreviousButton()
    • getSourceSearchTextField

      public JTextField getSourceSearchTextField()
    • getFindButton

      public JButton getFindButton()
    • getSummaryTopPanel

      public JPanel getSummaryTopPanel()
    • setSummaryTopPanel

      public void setSummaryTopPanel(JPanel summaryTopPanel)
    • addDesignationItem

      public void addDesignationItem(JMenu menu, String key, String text, int keyEvent)