public class MainFrameModel extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MainFrameModel.ParseMode
Parsing modes which available in GUI.
|
Constructor and Description |
---|
MainFrameModel()
Instantiate the model.
|
Modifier and Type | Method and Description |
---|---|
File |
getCurrentFile()
Get current file.
|
File |
getLastDirectory()
Get the directory of the last loaded file.
|
com.google.common.collect.ImmutableList<Integer> |
getLinesToPosition()
Get lines to position map.
|
ParseTreeTableModel |
getParseTreeTableModel()
Get parse tree table model.
|
String |
getText()
Get text to display in a text area.
|
String |
getTitle()
Returns title for the main frame.
|
boolean |
isReloadActionEnabled()
Returns true if the reload action is enabled, false otherwise.
|
void |
openFile(File file)
Open file and load the file.
|
void |
setParseMode(MainFrameModel.ParseMode mode)
Set current parse mode.
|
static boolean |
shouldAcceptFile(File file)
Whether a file chooser should accept the file as a source file.
|
public MainFrameModel()
public void setParseMode(MainFrameModel.ParseMode mode)
mode
- ParseMode enum.public ParseTreeTableModel getParseTreeTableModel()
public String getText()
public String getTitle()
public boolean isReloadActionEnabled()
public static boolean shouldAcceptFile(File file)
file
- the file to check.public File getLastDirectory()
public File getCurrentFile()
public com.google.common.collect.ImmutableList<Integer> getLinesToPosition()
public void openFile(File file) throws CheckstyleException
file
- the file to open.CheckstyleException
- if the file can not be parsed.Copyright © 2001–2018. All rights reserved.