Search in sources :

Example 1 with GenerateOutputPM

use of net.parostroj.timetable.gui.pm.GenerateOutputPM in project grafikon by jub77.

the class MainFrame method ouputMenuItemActionPerformed.

private void ouputMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
    // dialog with outputs
    EditOutputsDialog dialog = EditOutputsDialog.newInstance(this, true);
    dialog.setSettings(new Settings(model.getOutputSettings().getLocale()));
    GenerateOutputPM pm = new GenerateOutputPM(model.getLanguageLoader().getAvailableLocales(), model.getDiagram().getLocales());
    try (CloseableFileChooser chooser = FileChooserFactory.getInstance().getFileChooser(FileChooserFactory.Type.OUTPUT_DIRECTORY)) {
        pm.init(model.get(), chooser);
        dialog.setPresentationModel(pm);
        dialog.setLocationRelativeTo(this);
        dialog.registerContext(model.getGuiContext());
        dialog.showDialog(model.getDiagram());
        dialog.dispose();
        pm.writeBack();
    }
}
Also used : GenerateOutputPM(net.parostroj.timetable.gui.pm.GenerateOutputPM) CloseableFileChooser(net.parostroj.timetable.gui.actions.impl.CloseableFileChooser) Settings(net.parostroj.timetable.output2.OutputWriter.Settings) OutputSettings(net.parostroj.timetable.gui.data.OutputSettings)

Aggregations

CloseableFileChooser (net.parostroj.timetable.gui.actions.impl.CloseableFileChooser)1 OutputSettings (net.parostroj.timetable.gui.data.OutputSettings)1 GenerateOutputPM (net.parostroj.timetable.gui.pm.GenerateOutputPM)1 Settings (net.parostroj.timetable.output2.OutputWriter.Settings)1