Example usage for org.eclipse.jface.wizard Wizard addPage

List of usage examples for org.eclipse.jface.wizard Wizard addPage

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard Wizard addPage.

Prototype

public void addPage(IWizardPage page) 

Source Link

Document

Adds a new page to this wizard.

Usage

From source file:at.bestsolution.efxclipse.tooling.pde.ui.E3PluginTemplate.java

License:Open Source License

@Override
public void addPages(Wizard wizard) {
    WizardPage page = createPage(0);//from  w w w  .  j a  v a 2  s. com
    page.setTitle("Eclipse 3.x ViewPart plugin");
    page.setDescription("Template to create an Eclipse 3.x ViewPart plugin");
    wizard.addPage(page);
    markPagesAdded();
}

From source file:at.bestsolution.efxclipse.tooling.pde.ui.FXOSGiAppTemplate.java

License:Open Source License

public void addPages(Wizard wizard) {
    WizardPage page = createPage(0);//  w  w  w  .j  av a  2 s. c o m
    page.setTitle("JavaFX Application");
    page.setDescription("Template to create JavaFX application");
    wizard.addPage(page);
    markPagesAdded();
}

From source file:at.bestsolution.efxclipse.tooling.pde.ui.FXOSGiBundleTemplate.java

License:Open Source License

public void addPages(Wizard wizard) {
    WizardPage page = createPage(0);/*from ww w  .j  a v  a2  s . c om*/
    page.setTitle("JavaFX Bundle");
    page.setDescription("Template to create JavaFX application");
    wizard.addPage(page);
    markPagesAdded();
}

From source file:at.bestsolution.efxclipse.tooling.pde.ui.HelloRCPTemplate.java

License:Open Source License

public void addPages(Wizard wizard) {
    WizardPage page = createPage(0, null);
    page.setTitle("Basic JavaFX/RCP application");
    page.setDescription(/*from  w  w  w. j  ava  2s . c o m*/
            "This template creates a minimal standalone JavaFX/RCP application that consists of an application window with a title.");
    wizard.addPage(page);
    markPagesAdded();
}

From source file:be.ibridge.kettle.chef.Chef.java

License:LGPL

/**
 * Create a job that extracts tables & data from a database.<p><p>
 * /*www.  j  a v a 2  s . c o m*/
 * 0) Select the database to rip<p>
 * 1) Select the tables in the database to rip<p>
 * 2) Select the database to dump to<p>
 * 3) Select the repository directory in which it will end up<p>
 * 4) Select a name for the new job<p>
 * 5) Create an empty job with the selected name.<p>
 * 6) Create 1 transformation for every selected table<p>
 * 7) add every created transformation to the job & evaluate<p>
 * 
 */
private void ripDBWizard() {
    final RipDatabaseWizardPage1 page1 = new RipDatabaseWizardPage1("1", jobMeta.databases); //$NON-NLS-1$
    page1.createControl(shell);
    final RipDatabaseWizardPage2 page2 = new RipDatabaseWizardPage2("2"); //$NON-NLS-1$
    page2.createControl(shell);
    final RipDatabaseWizardPage3 page3 = new RipDatabaseWizardPage3("3", rep); //$NON-NLS-1$
    page3.createControl(shell);

    Wizard wizard = new Wizard() {
        public boolean performFinish() {
            return ripDB(page3.getJobname(), page3.getRepositoryDirectory(), page1.getSourceDatabase(),
                    page1.getTargetDatabase(), page2.getSelection());
        }

        /**
         * @see org.eclipse.jface.wizard.Wizard#canFinish()
         */
        public boolean canFinish() {
            return page3.canFinish();
        }
    };

    wizard.addPage(page1);
    wizard.addPage(page2);
    wizard.addPage(page3);

    WizardDialog wd = new WizardDialog(shell, wizard);
    wd.setMinimumPageSize(700, 400);
    wd.open();
}

From source file:be.ibridge.kettle.core.wizards.createdatabase.CreateDatabaseWizard.java

License:LGPL

/**
 * Shows a wizard that creates a new database connection...
 * @param shell// w  w w .  j a  v a  2  s  .com
 * @param props
 * @param databases
 * @return DatabaseMeta when finished or null when canceled
 */
public DatabaseMeta createAndRunDatabaseWizard(Shell shell, Props props, ArrayList databases) {

    DatabaseMeta newDBInfo = new DatabaseMeta();

    final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases);
    page1.createControl(shell);

    final CreateDatabaseWizardPageInformix pageifx = new CreateDatabaseWizardPageInformix("ifx", props,
            newDBInfo);
    pageifx.createControl(shell);

    final CreateDatabaseWizardPageJDBC pagejdbc = new CreateDatabaseWizardPageJDBC("jdbc", props, newDBInfo);
    pagejdbc.createControl(shell);

    final CreateDatabaseWizardPageOCI pageoci = new CreateDatabaseWizardPageOCI("oci", props, newDBInfo);
    pageoci.createControl(shell);

    final CreateDatabaseWizardPageODBC pageodbc = new CreateDatabaseWizardPageODBC("odbc", props, newDBInfo);
    pageodbc.createControl(shell);

    final CreateDatabaseWizardPageOracle pageoracle = new CreateDatabaseWizardPageOracle("oracle", props,
            newDBInfo);

    final CreateDatabaseWizardPageSAPR3 pageSAPR3 = new CreateDatabaseWizardPageSAPR3("SAPR3", props,
            newDBInfo);
    pageSAPR3.createControl(shell);

    final CreateDatabaseWizardPageGeneric pageGeneric = new CreateDatabaseWizardPageGeneric("generic", props,
            newDBInfo);
    pageGeneric.createControl(shell);

    final CreateDatabaseWizardPage2 page2 = new CreateDatabaseWizardPage2("2", props, newDBInfo);
    page2.createControl(shell);

    wizardFinished = false; // set to false for safety only

    Wizard wizard = new Wizard() {
        /**
         * @see org.eclipse.jface.wizard.Wizard#performFinish()
         */
        public boolean performFinish() {
            wizardFinished = true;
            return true;
        }

        /**
         * @see org.eclipse.jface.wizard.Wizard#canFinish()
         */
        public boolean canFinish() {
            return page2.canFinish();
        }
    };

    wizard.addPage(page1);
    wizard.addPage(pageoci);
    wizard.addPage(pageodbc);
    wizard.addPage(pagejdbc);
    wizard.addPage(pageoracle);
    wizard.addPage(pageifx);
    wizard.addPage(pageSAPR3);
    wizard.addPage(pageGeneric);
    wizard.addPage(page2);

    WizardDialog wd = new WizardDialog(shell, wizard);
    wd.setMinimumPageSize(700, 400);
    wd.open();

    if (!wizardFinished) {
        newDBInfo = null;
    }
    return newDBInfo;
}

From source file:be.ibridge.kettle.spoon.Spoon.java

License:LGPL

/**
 * Create a transformation that extracts tables & data from a database.<p><p>
 * /*from  ww w.j  a va  2 s  . c  o  m*/
 * 0) Select the database to rip<p>
 * 1) Select the table in the database to copy<p>
 * 2) Select the database to dump to<p>
 * 3) Select the repository directory in which it will end up<p>
 * 4) Select a name for the new transformation<p>
 * 6) Create 1 transformation for the selected table<p> 
 */
private void copyTableWizard() {
    ArrayList databases = getActiveDatabases();
    if (databases.size() == 0)
        return; // Nothing to do here

    final CopyTableWizardPage1 page1 = new CopyTableWizardPage1("1", databases);
    page1.createControl(shell);
    final CopyTableWizardPage2 page2 = new CopyTableWizardPage2("2");
    page2.createControl(shell);

    Wizard wizard = new Wizard() {
        public boolean performFinish() {
            return copyTable(page1.getSourceDatabase(), page1.getTargetDatabase(), page2.getSelection());
        }

        /**
         * @see org.eclipse.jface.wizard.Wizard#canFinish()
         */
        public boolean canFinish() {
            return page2.canFinish();
        }
    };

    wizard.addPage(page1);
    wizard.addPage(page2);

    WizardDialog wd = new WizardDialog(shell, wizard);
    wd.setMinimumPageSize(700, 400);
    wd.open();
}

From source file:be.ibridge.kettle.spoon.Spoon.java

License:LGPL

/**
 * Create a job that extracts tables & data from a database.<p><p>
 * /*w  w w .ja  v a2 s .  c om*/
 * 0) Select the database to rip<p>
 * 1) Select the tables in the database to rip<p>
 * 2) Select the database to dump to<p>
 * 3) Select the repository directory in which it will end up<p>
 * 4) Select a name for the new job<p>
 * 5) Create an empty job with the selected name.<p>
 * 6) Create 1 transformation for every selected table<p>
 * 7) add every created transformation to the job & evaluate<p>
 * 
 */
private void ripDBWizard() {
    final ArrayList databases = getActiveDatabases();
    if (databases.size() == 0)
        return; // Nothing to do here

    final RipDatabaseWizardPage1 page1 = new RipDatabaseWizardPage1("1", databases); //$NON-NLS-1$
    page1.createControl(shell);
    final RipDatabaseWizardPage2 page2 = new RipDatabaseWizardPage2("2"); //$NON-NLS-1$
    page2.createControl(shell);
    final RipDatabaseWizardPage3 page3 = new RipDatabaseWizardPage3("3", rep); //$NON-NLS-1$
    page3.createControl(shell);

    Wizard wizard = new Wizard() {
        public boolean performFinish() {
            JobMeta jobMeta = ripDB(databases, page3.getJobname(), page3.getRepositoryDirectory(),
                    page3.getDirectory(), page1.getSourceDatabase(), page1.getTargetDatabase(),
                    page2.getSelection());
            if (jobMeta == null)
                return false;

            if (page3.getRepositoryDirectory() != null) {
                saveJobRepository(jobMeta);
            } else {
                saveJobFile(jobMeta);
            }

            addChefGraph(jobMeta);
            return true;
        }

        /**
         * @see org.eclipse.jface.wizard.Wizard#canFinish()
         */
        public boolean canFinish() {
            return page3.canFinish();
        }
    };

    wizard.addPage(page1);
    wizard.addPage(page2);
    wizard.addPage(page3);

    WizardDialog wd = new WizardDialog(shell, wizard);
    wd.setMinimumPageSize(700, 400);
    wd.open();
}

From source file:ca.uvic.cs.tagsea.monitoring.internal.Monitoring.java

License:Open Source License

public static Monitoring getDefault() {
    final ArrayList<ITagSEAMonitor> newMonitors = new ArrayList<ITagSEAMonitor>();
    synchronized (LOCK) {
        if (instance != null)
            return instance;

        instance = new Monitoring();
        IConfigurationElement[] elements = Platform.getExtensionRegistry()
                .getConfigurationElementsFor("ca.uvic.cs.tagsea.monitor");
        for (IConfigurationElement element : elements) {
            try {
                ITagSEAMonitor monitor = (ITagSEAMonitor) element.createExecutableExtension("class");
                if (monitor != null) {
                    instance.allMonitors.add(monitor);
                    if (isNewMonitor(monitor)) {
                        newMonitors.add(monitor);
                    }//from w ww. j av  a2 s.  co m
                }
            } catch (CoreException e) {
                TagSEAPlugin.log("Error Loading Plugin", e);
            }
        }

    }

    final Wizard wizard = new MonitorAcceptanceWizard();
    TagSEAPlugin.getDefault().getWorkbench().getDisplay().syncExec(new Runnable() {
        public void run() {
            synchronized (LOCK) {
                Shell shell = TagSEAPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
                instance.hookWorkbenchListeners();
                if (newMonitors.size() > 0) {
                    for (ITagSEAMonitor monitor : newMonitors) {
                        wizard.addPage(new MonitorAcceptanceWizardPage(monitor.getName(), monitor));
                    }
                    final WizardDialog d = new WizardDialog(shell, wizard);
                    d.setTitle("Monitor Acceptance");
                    //d.setMessage("In order to help with the research of TagSEA, some monitors....");
                    d.open();
                }
            }
        }
    });
    synchronized (LOCK) {
        instance.hookPreferences();
        instance.updatePreferences();
        instance.publisher.start();
        return instance;
    }

}

From source file:carisma.preference.template.PrefPageSection.java

License:Open Source License

@Override
public final void addPages(final Wizard wizard) {
    WizardPage page = createPage(0, "");
    page.setTitle("Preference Page Wizard");
    page.setDescription("Configure your preference page.");
    wizard.addPage(page);
    markPagesAdded();//  ww w.ja  v  a  2 s .co  m
    validateOptions(this.createPage);
}