Example usage for org.eclipse.jface.dialogs Dialog applyDialogFont

List of usage examples for org.eclipse.jface.dialogs Dialog applyDialogFont

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs Dialog applyDialogFont.

Prototype

public static void applyDialogFont(Control control) 

Source Link

Document

Applies the dialog font to all controls that currently have the default font.

Usage

From source file:com.siteview.mde.internal.ui.wizards.site.NewSiteProjectCreationPage.java

License:Open Source License

/** (non-Javadoc)
 * Method declared on IDialogPage./* ww w.ja  v  a  2 s. com*/
 */
public void createControl(Composite parent) {
    super.createControl(parent);
    Composite control = (Composite) getControl();
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 15;
    control.setLayout(layout);

    Group webGroup = new Group(control, SWT.NULL);
    webGroup.setText(MDEUIMessages.NewSiteProjectCreationPage_webTitle);

    initializeDialogUnits(parent);
    layout = new GridLayout();
    layout.numColumns = 2;
    webGroup.setLayout(layout);
    webGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    fWebButton = new Button(webGroup, SWT.CHECK);
    fWebButton.setText(MDEUIMessages.SiteHTML_checkLabel);
    GridData gd = new GridData();
    gd.horizontalSpan = 2;
    fWebButton.setLayoutData(gd);
    fWebButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            fWebLabel.setEnabled(fWebButton.getSelection());
            fWebText.setEnabled(fWebButton.getSelection());
            setPageComplete(validatePage());
        }
    });

    fWebLabel = new Label(webGroup, SWT.NULL);
    fWebLabel.setText(MDEUIMessages.SiteHTML_webLabel);
    fWebLabel.setEnabled(false);

    fWebText = new Text(webGroup, SWT.BORDER);
    fWebText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    fWebText.setText("web"); //$NON-NLS-1$
    fWebText.setEnabled(false);
    fWebText.addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent e) {
            setPageComplete(validatePage());
        }
    });

    setPageComplete(validatePage());
    setControl(control);
    Dialog.applyDialogFont(control);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(control, IHelpContextIds.NEW_SITE_MAIN);
}

From source file:com.siteview.mde.internal.ui.wizards.target.TargetCreationPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
    SWTFactory.createLabel(comp, MDEUIMessages.TargetCreationPage_0, 3);

    fEmptyButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_1, 2);
    fDefaultButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_2, 2);
    fCurrentTPButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_3, 2);
    fExistingTargetButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_4, 1);
    fExistingTargetButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            boolean enabled = fExistingTargetButton.getSelection();
            fTargets.setEnabled(enabled);
        }/*from w ww.j  av  a2s  .co m*/
    });

    fEmptyButton.setSelection(true);

    fTargets = SWTFactory.createCombo(comp, SWT.SINGLE | SWT.READ_ONLY, 1, GridData.BEGINNING, null);
    fTargets.setEnabled(false);
    initializeTargetCombo();
    fTargets.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            templateTargetId = fTargetIds[fTargets.getSelectionIndex()];

        }
    });

    Dialog.applyDialogFont(comp);
    setSelectedNode(new EditTargetNode());
    setControl(comp);
    setPageComplete(true);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.NEW_TARGET_WIZARD);
}

From source file:com.siteview.mde.internal.ui.wizards.target.TargetDefinitionWizardPage.java

License:Open Source License

protected void createAdvancedControls(Composite parent) {
    Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
    SWTFactory.createLabel(comp, MDEUIMessages.TargetCreationPage_0, 2);

    fEmptyButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_1, 2);
    fDefaultButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_2, 2);
    fCurrentTPButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_3, 2);
    fExistingTargetButton = SWTFactory.createRadioButton(comp, MDEUIMessages.TargetCreationPage_4, 1);
    fExistingTargetButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            boolean enabled = fExistingTargetButton.getSelection();
            fTargets.setEnabled(enabled);
        }/*  w ww .j av  a2 s  . c  om*/
    });

    fEmptyButton.setSelection(true);

    fTargets = SWTFactory.createCombo(comp, SWT.SINGLE | SWT.READ_ONLY, 1, GridData.BEGINNING, null);
    fTargets.setEnabled(false);
    initializeTargetCombo();

    Dialog.applyDialogFont(comp);
    setControl(comp);

}

From source file:com.siteview.mde.internal.ui.wizards.templates.TemplateSelectionPage.java

License:Open Source License

/**
 * @see IDialogPage#createControl(Composite)
 */// w ww  .  j  a v a2  s.  c om
public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    container.setLayout(layout);
    layout.numColumns = 2;
    fTablePart.createControl(container);
    CheckboxTableViewer viewer = fTablePart.getTableViewer();
    viewer.setContentProvider(new ListContentProvider());
    viewer.setLabelProvider(new ListLabelProvider());
    initializeTable(viewer.getTable());

    viewer.addSelectionChangedListener(new ISelectionChangedListener() {
        public void selectionChanged(SelectionChangedEvent event) {
            IStructuredSelection sel = (IStructuredSelection) event.getSelection();
            handleSelectionChanged((ITemplateSection) sel.getFirstElement());
        }
    });
    fDescriptionBrowser.createControl(container);
    Control c = fDescriptionBrowser.getControl();
    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
    gd.heightHint = 100;
    //gd.horizontalSpan = 2;
    c.setLayoutData(gd);
    viewer.setInput(MDEPlugin.getDefault());
    // add all wizard pages to wizard.  Just don't iniatilize them right away (bug 174457)
    initializeWizardPages();
    setControl(container);
    Dialog.applyDialogFont(container);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.TEMPLATE_SELECTION);
}

From source file:com.siteview.mde.internal.ui.wizards.tools.ConvertedProjectsPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;/*ww w  .  j a  v a 2s . com*/
    layout.marginHeight = 0;
    layout.marginWidth = 5;
    container.setLayout(layout);

    tablePart.createControl(container);

    projectViewer = tablePart.getTableViewer();
    projectViewer.setContentProvider(new ProjectContentProvider());
    projectViewer.setLabelProvider(new ProjectLabelProvider());
    projectViewer.setInput(MDEPlugin.getWorkspace());

    tablePart.setSelection(fSelected);
    tablePart.updateCounter(fSelected.length);

    setControl(container);
    Dialog.applyDialogFont(container);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.CONVERTED_PROJECTS);
}

From source file:com.siteview.mde.internal.ui.wizards.tools.OrganizeManifestsWizardPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout());
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    fProcessor = (OrganizeManifestsProcessor) ((PDERefactor) getRefactoring()).getProcessor();

    createExportedPackagesGroup(container);
    createRequireImportGroup(container);
    createGeneralGroup(container);//from   ww  w  . jav a 2s.c  o m
    createNLSGroup(container);

    // init
    setButtonArrays();
    presetOptions();
    hookListeners();

    setControl(container);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.ORGANIZE_MANIFESTS);
    Dialog.applyDialogFont(container);
}

From source file:com.siteview.mde.internal.ui.wizards.tools.UpdateBuildpathWizardPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;//w  ww  .  j  a  va2 s.  c  o m
    layout.marginHeight = 0;
    layout.marginWidth = 5;
    container.setLayout(layout);

    tablePart.createControl(container);

    pluginListViewer = tablePart.getTableViewer();
    pluginListViewer.setContentProvider(new BuildpathContentProvider());
    pluginListViewer.setLabelProvider(MDEPlugin.getDefault().getLabelProvider());

    GridData gd = (GridData) tablePart.getControl().getLayoutData();
    gd.heightHint = 300;
    gd.widthHint = 300;

    pluginListViewer.setInput(MDEPlugin.getDefault());
    tablePart.setSelection(fSelected);

    setControl(container);
    Dialog.applyDialogFont(container);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.UPDATE_CLASSPATH);
}

From source file:com.siteview.mde.internal.ui.wizards.WizardListSelectionPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 10;/*from   w w  w  . j av  a2  s . c o m*/
    container.setLayout(layout);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    createAbove(container, 1);
    Label label = new Label(container, SWT.NONE);
    label.setText(getLabel());
    GridData gd = new GridData();
    label.setLayoutData(gd);

    SashForm sashForm = new SashForm(container, SWT.HORIZONTAL);
    gd = new GridData(GridData.FILL_BOTH);
    // limit the width of the sash form to avoid the wizard
    // opening very wide. This is just preferred size - 
    // it can be made bigger by the wizard
    // See bug #83356
    gd.widthHint = 300;
    sashForm.setLayoutData(gd);

    wizardSelectionViewer = new TableViewer(sashForm, SWT.BORDER);
    wizardSelectionViewer.setContentProvider(new ListContentProvider());
    wizardSelectionViewer.setLabelProvider(ListUtil.TABLE_LABEL_PROVIDER);
    wizardSelectionViewer.setComparator(ListUtil.NAME_COMPARATOR);
    wizardSelectionViewer.addDoubleClickListener(new IDoubleClickListener() {
        public void doubleClick(DoubleClickEvent event) {
            doubleClickAction.run();
        }
    });
    createDescriptionIn(sashForm);
    createBelow(container, 1);
    initializeViewer();
    wizardSelectionViewer.setInput(wizardElements);
    wizardSelectionViewer.addSelectionChangedListener(this);
    Dialog.applyDialogFont(container);
    setControl(container);
}

From source file:com.siteview.mde.ui.launcher.BundlesTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));

    fFrameworkBlock.createControl(composite);
    fBlock.createControl(composite, 2, 5);

    setControl(composite);/*from   w  w  w  .  j  av a  2s . c  o m*/
    Dialog.applyDialogFont(composite);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.LAUNCHER_ADVANCED);
}

From source file:com.siteview.mde.ui.launcher.ConfigurationTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout());
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    fConfigurationArea.createControl(container);
    fTemplateArea.createControl(container);
    fSoftwareInstallArea.createControl(container);

    Dialog.applyDialogFont(container);
    setControl(container);// w  w  w  .j  a  va2s  . co m
    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.LAUNCHER_CONFIGURATION);
}