Package edu.wpi.grip.ui
Class MainWindowController
- java.lang.Object
-
- edu.wpi.grip.ui.MainWindowController
-
public class MainWindowController extends java.lang.Object
The Controller for the application window.
-
-
Constructor Summary
Constructors Constructor Description MainWindowController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deploy()
protected void
generate()
Controls the export button in the main menu.protected void
initialize()
void
newProject()
Delete everything in the current project.void
onWarningEvent(WarningEvent e)
void
openProject()
Show a dialog for the user to pick a file to open a project from.protected boolean
quit()
boolean
saveProject()
Immediately save the project to whatever file it was loaded from or previously saved to.boolean
saveProjectAs()
Show a dialog that allows the user to save the current project to a file.protected void
showProjectAboutDialog()
protected void
showProjectSettingsEditor()
-
-
-
Method Detail
-
initialize
protected void initialize()
-
newProject
public void newProject()
Delete everything in the current project. If there are any steps in the pipeline, an "are you sure?" dialog is shown.
-
openProject
public void openProject()
Show a dialog for the user to pick a file to open a project from. If there are any steps in the pipeline, an "are you sure?" dialog is shown. (TODO)
-
saveProject
public boolean saveProject()
Immediately save the project to whatever file it was loaded from or previously saved to. If there isn't such a file, this is the same assaveProjectAs()
.- Returns:
- true if the user does not cancel the save
-
saveProjectAs
public boolean saveProjectAs()
Show a dialog that allows the user to save the current project to a file. If the project was loaded from a file or was previously saved to a file, the dialog should start out in the same directory.- Returns:
- true if the user does not cancel the save
-
showProjectSettingsEditor
protected void showProjectSettingsEditor()
-
showProjectAboutDialog
protected void showProjectAboutDialog() throws java.io.IOException
- Throws:
java.io.IOException
-
quit
protected boolean quit()
-
generate
protected void generate()
Controls the export button in the main menu. Opens a filechooser with language selection. The user can select the language to export to, save location and file name.
-
deploy
protected void deploy()
-
onWarningEvent
public void onWarningEvent(WarningEvent e)
-
-