use of net.parostroj.timetable.gui.actions.impl.FileChooserFactory in project grafikon by jub77.
the class MainFrame method ouputTemplatesMenuItemActionPerformed.
private void ouputTemplatesMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
// output templates list dialog
OutputTemplateListDialog dialog = new OutputTemplateListDialog(this, true);
dialog.setLocationRelativeTo(this);
dialog.registerContext(model.getGuiContext());
OutputSettings settings = model.getOutputSettings();
FileChooserFactory chooserFactory = FileChooserFactory.getInstance();
File outputDirectory = chooserFactory.getLocation(FileChooserFactory.Type.OUTPUT_DIRECTORY);
try (CloseableFileChooser allChooser = chooserFactory.getFileChooser(FileChooserFactory.Type.ALL_FILES)) {
dialog.showDialog(model.getDiagram(), outputDirectory, allChooser, new Settings(settings.getLocale()));
dialog.dispose();
}
}
use of net.parostroj.timetable.gui.actions.impl.FileChooserFactory in project grafikon by jub77.
the class MainFrame method initAndPreload.
private void initAndPreload(SplashScreenInfo info) {
// preload FileLoadSave
info.setText(getInfoText("Registering LS..."));
LSFileFactory.getInstance();
LSLibraryFactory.getInstance();
// initialize groovy
info.setText(getInfoText("Initializing Groovy..."));
new GroovyShell().parse("");
// initialize javascript
info.setText(getInfoText("Initializing JavaScript..."));
new ScriptEngineManager().getEngineByName("javascript");
// preload file dialogs
info.setText(getInfoText("Preloading dialogs..."));
FileChooserFactory fcf = FileChooserFactory.getInstance();
fcf.initialize();
}
Aggregations