Class MainFrameModel


  • public class MainFrameModel
    extends Object
    Model for checkstyle frame.
    • Constructor Detail

      • MainFrameModel

        public MainFrameModel()
        Instantiate the model.
    • Method Detail

      • setParseMode

        public void setParseMode​(MainFrameModel.ParseMode mode)
        Set current parse mode.
        Parameters:
        mode - ParseMode enum.
      • getParseTreeTableModel

        public ParseTreeTableModel getParseTreeTableModel()
        Get parse tree table model.
        Returns:
        parse tree table model.
      • getText

        public String getText()
        Get text to display in a text area.
        Returns:
        text to display in a text area.
      • getTitle

        public String getTitle()
        Returns title for the main frame.
        Returns:
        title for the main frame.
      • isReloadActionEnabled

        public boolean isReloadActionEnabled()
        Returns true if the reload action is enabled, false otherwise.
        Returns:
        true if the reload action is enabled.
      • shouldAcceptFile

        public static boolean shouldAcceptFile​(File file)
        Whether a file chooser should accept the file as a source file.
        Parameters:
        file - the file to check.
        Returns:
        true if the file should be accepted.
      • getLastDirectory

        public File getLastDirectory()
        Get the directory of the last loaded file.
        Returns:
        directory of the last loaded file.
      • getCurrentFile

        public File getCurrentFile()
        Get current file.
        Returns:
        current file.
      • getLinesToPosition

        public List<Integer> getLinesToPosition()
        Get lines to position map. It returns unmodifiable collection to prevent additional overhead of copying and possible state modifications.
        Returns:
        lines to position map.