Example usage for org.eclipse.jface.wizard IWizardContainer updateWindowTitle

List of usage examples for org.eclipse.jface.wizard IWizardContainer updateWindowTitle

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard IWizardContainer updateWindowTitle.

Prototype

public void updateWindowTitle();

Source Link

Document

Updates the window title to reflect the state of the current wizard.

Usage

From source file:org.eclipse.sapphire.ui.forms.swt.SapphireWizard.java

License:Open Source License

private final void refreshTitle() {
    final IWizardContainer container = getContainer();

    if (container != null) {
        container.updateWindowTitle();
    }/*from   w  w  w.j ava 2s  . c  om*/
}

From source file:org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards.NewNodeWizardPage.java

License:Open Source License

/**
 * Event process handling method when the user select a new folder in the file tree.
 *///from  ww  w. jav  a 2 s .  c o  m
protected void onSelectionChanged() {
    if (treeViewer.getSelection() instanceof IStructuredSelection) {
        IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();
        if (selection.getFirstElement() instanceof IFSTreeNode) {
            IFSTreeNode folder = (IFSTreeNode) selection.getFirstElement();
            folderControl.setEditFieldControlText(folder.getLocation());
        } else {
            folderControl.setEditFieldControlText(""); //$NON-NLS-1$
        }
    }

    // Update the wizard container UI elements
    IWizardContainer container = getContainer();
    if (container != null && container.getCurrentPage() != null) {
        container.updateWindowTitle();
        container.updateTitleBar();
        container.updateButtons();
    }
    validate();
}

From source file:org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards.TargetSelectionPage.java

License:Open Source License

/**
 * Called from the selection listener to propagate the current system type selection to the
 * underlying wizard.// ww  w  .  j a  va2 s.c o  m
 */
protected void onSelectionChanged() {
    if (filteredTree.getViewer().getSelection() instanceof IStructuredSelection) {
        IStructuredSelection filteredTreeSelection = (IStructuredSelection) filteredTree.getViewer()
                .getSelection();
        NewNodeWizard wizard = getWizard();
        if (filteredTreeSelection.getFirstElement() instanceof IPeerNode) {
            wizard.setPeer((IPeerNode) filteredTreeSelection.getFirstElement());
        } else {
            wizard.setPeer(null);
        }
    }

    // Update the wizard container UI elements
    IWizardContainer container = getContainer();
    if (container != null && container.getCurrentPage() != null) {
        container.updateWindowTitle();
        container.updateTitleBar();
        container.updateButtons();
    }
    validate();
}

From source file:org.eclipse.tcf.te.ui.wizards.newWizard.NewWizardSelectionPage.java

License:Open Source License

/**
 * Called from the selection listener to propagate the current
 * system type selection to the underlying wizard.
 *///from   w  w  w .  jav a 2  s.  c om
protected void onSelectionChanged() {
    if (filteredTree.getViewer().getSelection() instanceof IStructuredSelection) {
        IStructuredSelection filteredTreeSelection = (IStructuredSelection) filteredTree.getViewer()
                .getSelection();
        if (filteredTreeSelection.getFirstElement() instanceof IWizardDescriptor) {
            selectedWizardDescriptor = (IWizardDescriptor) filteredTreeSelection.getFirstElement();

            // Update the description if the current wizard descriptor has one
            if (selectedWizardDescriptor.getDescription() != null
                    && !"".equals(selectedWizardDescriptor.getDescription())) { //$NON-NLS-1$
                setDescription(selectedWizardDescriptor.getDescription());
            } else {
                if (!getDefaultDescription().equals(getDescription())) {
                    setDescription(getDefaultDescription());
                }
            }
        } else {
            selectedWizardDescriptor = null;
        }

        // Create the wizard node for the selected descriptor if not yet done
        //         if (selectedWizardDescriptor != null && !wizardNodes.containsKey(selectedWizardDescriptor)) {
        //            wizardNodes.put(selectedWizardDescriptor, new NewWizardNode(this, selectedWizardDescriptor));
        //         }
    }

    // Update the wizard container UI elements
    IWizardContainer container = getContainer();
    if (container != null && container.getCurrentPage() != null) {
        container.updateWindowTitle();
        container.updateTitleBar();
        container.updateButtons();
    }
}

From source file:org.eclipse.tm.te.ui.wizards.newWizard.NewWizardSelectionPage.java

License:Open Source License

/**
 * Called from the selection listener to propagate the current
 * system type selection to the underlying wizard.
 *///from   w w  w  . j  a v a  2 s  .c om
protected void onSelectionChanged() {
    if (filteredTree.getViewer().getSelection() instanceof IStructuredSelection) {
        IStructuredSelection filteredTreeSelection = (IStructuredSelection) filteredTree.getViewer()
                .getSelection();
        if (filteredTreeSelection.getFirstElement() instanceof IWizardDescriptor) {
            selectedWizardDescriptor = (IWizardDescriptor) filteredTreeSelection.getFirstElement();

            // Update the description if the current wizard descriptor has one
            if (selectedWizardDescriptor.getDescription() != null
                    && !"".equals(selectedWizardDescriptor.getDescription())) { //$NON-NLS-1$
                setDescription(selectedWizardDescriptor.getDescription());
            } else {
                if (!getDefaultDescription().equals(getDescription()))
                    setDescription(getDefaultDescription());
            }
        } else {
            selectedWizardDescriptor = null;
        }

        // Create the wizard node for the selected descriptor if not yet done
        if (selectedWizardDescriptor != null && !wizardNodes.containsKey(selectedWizardDescriptor)) {
            wizardNodes.put(selectedWizardDescriptor, new NewWizardNode(this, selectedWizardDescriptor));
        }
    }

    // Update the wizard container UI elements
    IWizardContainer container = getContainer();
    if (container != null && container.getCurrentPage() != null) {
        container.updateWindowTitle();
        container.updateTitleBar();
        container.updateButtons();
    }
}