Search in sources :

Example 1 with ExtendedWizardDialog

use of com.archimatetool.editor.ui.components.ExtendedWizardDialog in project archi by archimatetool.

the class CSVExportProvider method export.

@Override
public void export(IArchimateModel model) throws IOException {
    CSVExporter exporter = new CSVExporter(model);
    WizardDialog dialog = new ExtendedWizardDialog(Display.getCurrent().getActiveShell(), new ExportAsCSVWizard(exporter), // $NON-NLS-1$
    "ExportAsCSVWizard") {

        @Override
        protected void createButtonsForButtonBar(Composite parent) {
            // Change "Finish" to "Save"
            super.createButtonsForButtonBar(parent);
            Button b = getButton(IDialogConstants.FINISH_ID);
            b.setText(Messages.CSVExportProvider_0);
        }
    };
    dialog.open();
}
Also used : ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog)

Example 2 with ExtendedWizardDialog

use of com.archimatetool.editor.ui.components.ExtendedWizardDialog in project archi by archimatetool.

the class ExportAsImageAction method run.

@Override
public void run() {
    LayerManager layerManager = (LayerManager) fGraphicalViewer.getEditPartRegistry().get(LayerManager.ID);
    IFigure rootFigure = layerManager.getLayer(LayerConstants.PRINTABLE_LAYERS);
    String name = null;
    Object model = fGraphicalViewer.getContents().getModel();
    if (model instanceof INameable) {
        name = ((INameable) model).getName();
    }
    WizardDialog dialog = new ExtendedWizardDialog(fGraphicalViewer.getControl().getShell(), new ExportAsImageWizard(rootFigure, name), // $NON-NLS-1$
    "ExportAsImageWizard") {

        @Override
        protected void createButtonsForButtonBar(Composite parent) {
            // Change "Finish" to "Save"
            super.createButtonsForButtonBar(parent);
            Button b = getButton(IDialogConstants.FINISH_ID);
            b.setText(Messages.ExportAsImageAction_1);
        }
    };
    dialog.open();
}
Also used : ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) ExportAsImageWizard(com.archimatetool.editor.diagram.wizard.ExportAsImageWizard) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) INameable(com.archimatetool.model.INameable) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) LayerManager(org.eclipse.gef.editparts.LayerManager) IFigure(org.eclipse.draw2d.IFigure)

Example 3 with ExtendedWizardDialog

use of com.archimatetool.editor.ui.components.ExtendedWizardDialog in project archi by archimatetool.

the class SaveAsTemplateHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IArchimateModel model = getActiveArchimateModel();
    if (model != null) {
        WizardDialog dialog = new ExtendedWizardDialog(workbenchWindow.getShell(), new SaveArchimateModelAsTemplateWizard(model), // $NON-NLS-1$
        "SaveModelAsTemplateWizard");
        dialog.open();
    }
    return null;
}
Also used : ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) IArchimateModel(com.archimatetool.model.IArchimateModel) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) SaveArchimateModelAsTemplateWizard(com.archimatetool.templates.impl.wizard.SaveArchimateModelAsTemplateWizard)

Example 4 with ExtendedWizardDialog

use of com.archimatetool.editor.ui.components.ExtendedWizardDialog in project archi by archimatetool.

the class ExportAsImageAction method run.

@Override
public void run() {
    String name = null;
    Object model = fGraphViewer.getInput();
    if (model instanceof INameable) {
        name = ((INameable) model).getName();
    }
    WizardDialog dialog = new ExtendedWizardDialog(fGraphViewer.getControl().getShell(), new ExportAsImageWizard(fGraphViewer.getGraphControl().getContents(), name), // $NON-NLS-1$
    "ExportZestViewAsImage") {

        @Override
        protected void createButtonsForButtonBar(Composite parent) {
            // Change "Finish" to "Save"
            super.createButtonsForButtonBar(parent);
            Button b = getButton(IDialogConstants.FINISH_ID);
            b.setText(Messages.ExportAsImageAction_3);
        }
    };
    dialog.open();
}
Also used : ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) ExportAsImageWizard(com.archimatetool.editor.diagram.wizard.ExportAsImageWizard) Composite(org.eclipse.swt.widgets.Composite) Button(org.eclipse.swt.widgets.Button) INameable(com.archimatetool.model.INameable) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog)

Example 5 with ExtendedWizardDialog

use of com.archimatetool.editor.ui.components.ExtendedWizardDialog in project archi by archimatetool.

the class NewArchimateModelFromTemplateHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    WizardDialog dialog = new ExtendedWizardDialog(HandlerUtil.getActiveShell(event), new NewArchimateModelFromTemplateWizard(), // $NON-NLS-1$
    "NewArchimateModelFromTemplateWizard");
    dialog.open();
    return null;
}
Also used : ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog) NewArchimateModelFromTemplateWizard(com.archimatetool.templates.impl.wizard.NewArchimateModelFromTemplateWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExtendedWizardDialog(com.archimatetool.editor.ui.components.ExtendedWizardDialog)

Aggregations

ExtendedWizardDialog (com.archimatetool.editor.ui.components.ExtendedWizardDialog)6 WizardDialog (org.eclipse.jface.wizard.WizardDialog)6 Button (org.eclipse.swt.widgets.Button)3 Composite (org.eclipse.swt.widgets.Composite)3 ExportAsImageWizard (com.archimatetool.editor.diagram.wizard.ExportAsImageWizard)2 IArchimateModel (com.archimatetool.model.IArchimateModel)2 INameable (com.archimatetool.model.INameable)2 NewArchimateModelFromTemplateWizard (com.archimatetool.templates.impl.wizard.NewArchimateModelFromTemplateWizard)1 SaveArchimateModelAsTemplateWizard (com.archimatetool.templates.impl.wizard.SaveArchimateModelAsTemplateWizard)1 IFigure (org.eclipse.draw2d.IFigure)1 LayerManager (org.eclipse.gef.editparts.LayerManager)1