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.google.gdt.eclipse.designer.wizards.model.project.ConfigureWizardPage.java

License:Open Source License

public void createControl(Composite parent) {
    initializeDialogUnits(parent);/*from   w ww  . j  a  va 2  s .c o m*/
    //
    Composite composite = new Composite(parent, SWT.NULL);
    composite.setFont(parent.getFont());
    composite.setLayout(new GridLayout());
    //
    Link openPreferencesLink = new Link(composite, SWT.NONE);
    openPreferencesLink.setText("<a>Click here to configure GWT...</a>");
    openPreferencesLink.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            PreferencesUtil.createPreferenceDialogOn(getShell(), MainPreferencePage.ID,
                    ArrayUtils.EMPTY_STRING_ARRAY, null).open();
            if (MainPreferencePage.validateLocation()) {
                setPageComplete(true);
                getWizard().getContainer().showPage(getNextPage());
            }
        }
    });
    //
    setControl(composite);
    Dialog.applyDialogFont(composite);
}

From source file:com.google.gdt.eclipse.gph.egit.wizard.ImportProjectsWizardPage.java

License:Open Source License

@Override
protected Control createPageContents(Composite parent) {
    initializeDialogUnits(parent);//from  w  w  w.  j a  v a2 s.  co m

    Composite workArea = new Composite(parent, SWT.NONE);

    workArea.setLayout(new GridLayout());
    workArea.setLayoutData(
            new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));

    createProjectsList(workArea);
    createWorkingSetGroup(workArea);

    Dialog.applyDialogFont(workArea);

    return workArea;
}

From source file:com.google.gdt.eclipse.gph.egit.wizard.ImportProjectsWizardPage.java

License:Open Source License

/**
 * Create the selection buttons in the listComposite.
 * /*  ww  w.  j a  va  2  s  . c  om*/
 * @param listComposite
 */
private void createSelectionButtons(Composite listComposite) {
    Composite buttonsComposite = new Composite(listComposite, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    buttonsComposite.setLayout(layout);

    buttonsComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));

    Button selectAll = new Button(buttonsComposite, SWT.PUSH);
    selectAll.setText("&Select All");
    selectAll.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            for (int i = 0; i < selectedProjects.length; i++) {
                if (selectedProjects[i].hasConflicts)
                    projectsList.setChecked(selectedProjects[i], false);
                else
                    projectsList.setChecked(selectedProjects[i], true);
            }
            setPageComplete(projectsList.getCheckedElements().length > 0);
        }
    });
    Dialog.applyDialogFont(selectAll);
    setButtonLayoutData(selectAll);

    Button deselectAll = new Button(buttonsComposite, SWT.PUSH);
    deselectAll.setText("&Deselect All");
    deselectAll.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {

            projectsList.setCheckedElements(new Object[0]);
            setPageComplete(false);
        }
    });
    Dialog.applyDialogFont(deselectAll);
    setButtonLayoutData(deselectAll);
}

From source file:com.google.gwt.eclipse.core.wizards.NewClientBundleWizardPage.java

License:Open Source License

/**
 * This method duplicates the method in/*w  w  w .jav a  2s.  c  om*/
 * {@link org.eclipse.jdt.ui.wizards.NewInterfaceWizardPage}, but inserts our
 * Bundled Resources list just after the Extended Interfaces list.
 */
public void createControl(Composite parent) {
    initializeDialogUnits(parent);

    Composite composite = new Composite(parent, SWT.NONE);
    composite.setFont(parent.getFont());

    int nColumns = 4;

    GridLayout layout = new GridLayout();
    layout.numColumns = nColumns;
    composite.setLayout(layout);

    createContainerControls(composite, nColumns);
    createPackageControls(composite, nColumns);
    createEnclosingTypeControls(composite, nColumns);

    createSeparator(composite, nColumns);

    createTypeNameControls(composite, nColumns);
    createModifierControls(composite, nColumns);

    createSuperInterfacesControls(composite, nColumns);

    // This differs from the stock interface wizard
    createBundledResourcesControls(composite, nColumns);

    createCommentControls(composite, nColumns);
    enableCommentControl(true);

    setControl(composite);

    Dialog.applyDialogFont(composite);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_INTERFACE_WIZARD_PAGE);
}

From source file:com.google.gwt.eclipse.core.wizards.NewUiBinderWizardPage.java

License:Open Source License

public void createControl(Composite parent) {
    initializeDialogUnits(parent);//from  www. ja v  a  2  s  .  c  om
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setFont(parent.getFont());

    int nColumns = 4;
    GridLayout layout = new GridLayout();
    layout.numColumns = nColumns;
    composite.setLayout(layout);

    createContainerControls(composite, nColumns);
    createPackageControls(composite, nColumns);

    createSeparator(composite, nColumns);

    createTypeNameControls(composite, nColumns);
    createUiTypeControls(composite, nColumns);

    createSampleContentControls(composite, nColumns);

    createCommentControls(composite, nColumns);
    enableCommentControl(true);

    setControl(composite);

    Dialog.applyDialogFont(composite);
}

From source file:com.google.gwt.eclipse.core.wizards.rpc.NewAsyncRemoteServiceInterfaceCreationWizardPage.java

License:Open Source License

@Override
public void createControl(Composite parent) {
    initializeDialogUnits(parent);//from   www.j  ava2  s .  com

    Composite composite = new Composite(parent, SWT.NONE);
    composite.setFont(parent.getFont());

    int nColumns = 4;

    GridLayout layout = new GridLayout();
    layout.numColumns = nColumns;
    composite.setLayout(layout);

    createContainerControls(composite, nColumns);
    createPackageControls(composite, nColumns);
    createEnclosingTypeControls(composite, nColumns);
    createSyncTypeControls(composite, nColumns);

    createSeparator(composite, nColumns);

    createTypeNameControls(composite, nColumns);
    createModifierControls(composite, nColumns);

    createSuperInterfacesControls(composite, nColumns);

    createCommentControls(composite, nColumns);
    enableCommentControl(true);

    setControl(composite);

    Dialog.applyDialogFont(composite);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_INTERFACE_WIZARD_PAGE);
}

From source file:com.google.gwt.eclipse.wtp.wizards.GwtFacetWizardPage.java

License:Open Source License

/**
 * Predefined path | [x] | Sdks Combo | |
 *
 * Custom path | [ ] | [ path to sdk ] | [browse] |
 *//*from   w ww.  jav  a 2s .  co  m*/
@Override
protected Composite createTopLevelComposite(Composite parent) {
    initializeDialogUnits(parent);

    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout());

    Group sdkSelectionGroup = new Group(container, SWT.NONE);
    sdkSelectionGroup.setText("Select GWT SDK");
    sdkSelectionGroup.setLayout(new GridLayout(3, false));
    sdkSelectionGroup.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

    Label lblSdks = new Label(sdkSelectionGroup, SWT.NONE);
    lblSdks.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
    lblSdks.setText("Select from the defined SDKs");
    new Label(sdkSelectionGroup, SWT.NONE);

    Button radioDefined = new Button(sdkSelectionGroup, SWT.RADIO);
    radioDefined.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            enablePaths(false);
        }
    });
    radioDefined.setSelection(true);

    comboViewer = new ComboViewer(sdkSelectionGroup, SWT.NONE);
    comboViewer.setLabelProvider(new LabelProvider() {
        @Override
        @SuppressWarnings("unchecked")
        public String getText(Object element) {
            GWTRuntime sdk = (GWTRuntime) element;
            return sdk.getName();
        }
    });
    comboViewer.setContentProvider(new ArrayContentProvider());
    comboViewerCombo = comboViewer.getCombo();
    comboViewerCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
    comboViewerCombo.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(final SelectionEvent e) {
            setSdkSelection();
        }
    });

    btnAddSdk = new Button(sdkSelectionGroup, SWT.NONE);
    btnAddSdk.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            openGwtPreferencesDialog();
        }
    });
    btnAddSdk.setText("Add SDK");

    Label lblBlank = new Label(sdkSelectionGroup, SWT.NONE);
    new Label(sdkSelectionGroup, SWT.NONE);
    new Label(sdkSelectionGroup, SWT.NONE);

    Label lblCustomPath = new Label(sdkSelectionGroup, SWT.NONE);
    lblCustomPath.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
    lblCustomPath.setText("Select a custom SDK location");
    new Label(sdkSelectionGroup, SWT.NONE);

    Button radioPath = new Button(sdkSelectionGroup, SWT.RADIO);
    radioPath.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            enablePaths(true);
        }
    });

    textPath = new Text(sdkSelectionGroup, SWT.BORDER);
    textPath.setEditable(false);
    textPath.setEnabled(false);
    textPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

    btnDirBrowser = new Button(sdkSelectionGroup, SWT.NONE);
    btnDirBrowser.setEnabled(false);
    btnDirBrowser.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            showDirectoryDialog();
        }
    });
    btnDirBrowser.setText("Select SDK Directory");

    addSdkOptionsToCombo();

    Dialog.applyDialogFont(container);

    synchHelper.synchAllUIWithModel();

    return container;
}

From source file:com.googlecode.osde.internal.ui.wizards.export.WizardOpenSocialApplicationExportPage.java

License:Apache License

public void createControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
    initializeDialogUnits(parent);//from w  w  w.jav  a2  s.c  o m
    composite.setLayout(new GridLayout());
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    //
    createControls(composite);
    //
    setErrorMessage(null);
    setMessage(null);
    setControl(composite);
    Dialog.applyDialogFont(composite);
}

From source file:com.googlecode.osde.internal.ui.wizards.newjsprj.WizardNewGadgetXmlPage.java

License:Apache License

public void createControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
    initializeDialogUnits(parent);/*from www.  j  ava  2  s  .  co m*/
    composite.setLayout(new GridLayout());
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    //
    createFileNameControls(composite);
    createModulePrefsControls(composite);
    createFeaturesControls(composite);
    //
    setPageComplete(validatePage());
    setErrorMessage(null);
    setMessage(null);
    setControl(composite);
    Dialog.applyDialogFont(composite);
}

From source file:com.googlecode.osde.internal.ui.wizards.newjsprj.WizardNewViewPage.java

License:Apache License

public void createControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
    initializeDialogUnits(parent);//from ww  w  .  ja  v a 2 s.c  o m
    composite.setLayout(new GridLayout());
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    //
    TabFolder tabFolder = new TabFolder(composite, SWT.NULL);
    tabFolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    createViewControls(composite, ViewName.canvas, tabFolder);
    createViewControls(composite, ViewName.profile, tabFolder);
    createViewControls(composite, ViewName.preview, tabFolder);
    createViewControls(composite, ViewName.home, tabFolder);
    //
    setPageComplete(validatePage());
    setErrorMessage(null);
    setMessage(null);
    setControl(composite);
    Dialog.applyDialogFont(composite);
}