use of net.parostroj.timetable.gui.actions.impl.CopyTemplatesToOutputsModelAction in project grafikon by jub77.
the class ImportReplaceOutputTemplatesUrlAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
ActionHandler handler = ActionHandler.getInstance();
ActionContext context = new ActionContext(GuiComponentUtils.getTopLevelComponent(e.getSource()));
context.setAttribute("diagramImport", model.getDiagram());
String url = model.getLibraryBaseUrl() + "/" + TEMPLATE;
context.setAttribute("libraryUrl", url);
log.debug("Loading library: {}", url);
handler.execute(new LoadLibraryUrlModelAction(context));
handler.execute(new OutputTemplateSelectionModelAction(context));
handler.execute(new ImportModelAction(context));
handler.execute(new CopyTemplatesToOutputsModelAction(context, model));
}
use of net.parostroj.timetable.gui.actions.impl.CopyTemplatesToOutputsModelAction in project grafikon by jub77.
the class ImportReplaceOutputTemplatesAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
ActionHandler handler = ActionHandler.getInstance();
ActionContext context = new ActionContext(GuiComponentUtils.getTopLevelComponent(e.getSource()));
context.setAttribute("fileType", FileChooserFactory.Type.GTM_GTML);
context.setAttribute("diagramImport", model.getDiagram());
handler.execute(new OpenFileModelAction(context));
handler.execute(new SelectLoadAction(context));
handler.execute(new LoadDiagramModelAction(context));
handler.execute(new LoadLibraryModelAction(context));
handler.execute(new OutputTemplateSelectionModelAction(context));
handler.execute(new ImportModelAction(context));
handler.execute(new CopyTemplatesToOutputsModelAction(context, model));
}
Aggregations