Search in sources :

Example 1 with SaveImageAction

use of net.parostroj.timetable.gui.actions.execution.SaveImageAction in project grafikon by jub77.

the class CirculationViewPanel method saveButtonActionPerformed.

private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {
    if (dialog == null)
        dialog = new SaveImageDialog((Dialog) this.getTopLevelAncestor(), true);
    dialog.setLocationRelativeTo(this.getParent());
    dialog.setSaveSize(circulationView.getPreferredSize());
    dialog.setSizeChangeEnabled(false);
    dialog.setVisible(true);
    if (!dialog.isSave()) {
        return;
    }
    ActionContext actionContext = new ActionContext(GuiComponentUtils.getTopLevelComponent(this));
    SaveImageAction action = new SaveImageAction(actionContext, dialog, circulationView);
    ActionHandler.getInstance().execute(action);
}
Also used : SaveImageAction(net.parostroj.timetable.gui.actions.execution.SaveImageAction) SaveImageDialog(net.parostroj.timetable.gui.dialogs.SaveImageDialog) ActionContext(net.parostroj.timetable.gui.actions.execution.ActionContext)

Aggregations

ActionContext (net.parostroj.timetable.gui.actions.execution.ActionContext)1 SaveImageAction (net.parostroj.timetable.gui.actions.execution.SaveImageAction)1 SaveImageDialog (net.parostroj.timetable.gui.dialogs.SaveImageDialog)1