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.nokia.carbide.search.system.internal.ui.text.TextSearchPage.java

License:Open Source License

public void createControl(Composite parent) {

    // compute horizontal and vertical units
    initializeDialogUnits(parent);/*from   w ww . ja  va2s.  c om*/

    // read configuration
    readConfiguration();

    // main composite
    Composite result = new Composite(parent, SWT.NONE);
    result.setFont(parent.getFont());
    GridLayout layout = new GridLayout(2, false);
    result.setLayout(layout);

    // create controls for search string
    addTextPatternControls(result);

    Label separator = new Label(result, SWT.NONE);
    separator.setVisible(false);
    GridData data = new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1);
    data.heightHint = convertHeightInCharsToPixels(1) / 3;
    separator.setLayoutData(data);

    // create controls for file names
    addFileNameControls(result);

    separator = new Label(result, SWT.NONE);
    separator.setVisible(false);
    data = new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1);
    data.heightHint = convertHeightInCharsToPixels(1) / 3;
    separator.setLayoutData(data);

    // create controls for folder name
    addFolderControls(result);

    setControl(result);
    Dialog.applyDialogFont(result);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(result, ISearchHelpContextIds.TEXT_SEARCH_PAGE);
}

From source file:com.nokia.cdt.internal.debug.launch.ui.DebuggerTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);//from  ww w . j av  a  2s. com

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.EMULATION_DEBUGGER);

    GridLayout topLayout = new GridLayout();
    topLayout.numColumns = 2;
    comp.setLayout(topLayout);

    createVerticalSpacer(comp, 2);
    createBooleanGroup(comp, 2);

    Dialog.applyDialogFont(parent);
    checkControlState();
}

From source file:com.nokia.cdt.internal.debug.launch.ui.ExceptionsTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);//from   www.j  a v a  2  s .  com

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.EMULATION_EXCEPTIONS);

    GridLayout topLayout = new GridLayout();
    topLayout.numColumns = 1;
    comp.setLayout(topLayout);

    createVerticalSpacer(comp, 1);

    Group group = new Group(comp, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    group.setLayout(layout);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    group.setLayoutData(gd);
    group.setText(Messages.getString("ExceptionsTab.25")); //$NON-NLS-1$
    group.setFont(comp.getFont());
    group.setToolTipText(Messages.getString("ExceptionsTab.1")); //$NON-NLS-1$

    for (int i = 0; i < m_exceptionNames.length; i++) {
        addCheckBox(group, i);
    }

    Composite buttonsComp = new Composite(comp, SWT.NONE);
    GridLayout buttonsLayout = new GridLayout();
    buttonsLayout.numColumns = 3;
    buttonsLayout.marginHeight = 0;
    buttonsLayout.marginWidth = 0;
    buttonsComp.setLayout(buttonsLayout);
    GridData buttonsGd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    buttonsComp.setLayoutData(buttonsGd);

    checkAll = createPushButton(buttonsComp, Messages.getString("ExceptionsTab.26"), null); //$NON-NLS-1$
    checkAll.setToolTipText(Messages.getString("ExceptionsTab.2")); //$NON-NLS-1$
    checkAll.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent evt) {
            for (int i = 0; i < m_buttons.length; i++) {
                m_buttons[i].setSelection(true);
            }
            updateLaunchConfigurationDialog();
        }
    });

    clearAll = createPushButton(buttonsComp, Messages.getString("ExceptionsTab.27"), null); //$NON-NLS-1$
    clearAll.setToolTipText(Messages.getString("ExceptionsTab.3")); //$NON-NLS-1$
    clearAll.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent evt) {
            for (int i = 0; i < m_buttons.length; i++) {
                m_buttons[i].setSelection(false);
            }
            updateLaunchConfigurationDialog();
        }
    });

    Dialog.applyDialogFont(parent);
}

From source file:com.nokia.cdt.internal.debug.launch.ui.ExecutablesTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);/*from  ww  w. j av a2  s  . co  m*/

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.ALL_EXECUTABLES);

    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    comp.setLayout(layout);

    ExecutablesTabHeader header = new ExecutablesTabHeader(comp, SWT.NONE);
    header.setLayoutData(new GridData(GridData.FILL_HORIZONTAL, GridData.FILL_VERTICAL, true, false, 3, 1));

    executablesBlock = new ExecutablesBlock(this);
    executablesBlock.createControl(comp);
    Control control = executablesBlock.getControl();
    GridData data = new GridData(GridData.FILL_BOTH);
    control.setLayoutData(data);

    Composite buttonComp = new Composite(comp, SWT.NONE);
    buttonComp.setLayout(new GridLayout(3, false));
    buttonComp.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false, 3, 1));

    addButton = new Button(buttonComp, SWT.PUSH);
    addButton.setText(Messages.getString("ExecutablesTab.6")); //$NON-NLS-1$
    addButton.setData(".uid", "ExecutablesTab.addButton"); //$NON-NLS-1$ //$NON-NLS-2$
    addButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
            dialog.setText(Messages.getString("ExecutablesTab.7")); //$NON-NLS-1$
            if (executablesToTarget != null && executablesToTarget.size() > 0) {
                BrowseDialogUtils.initializeFrom(dialog,
                        executablesToTarget.get(executablesToTarget.size() - 1).getExePath());
            }
            final String res = dialog.open();
            if (res != null) {
                Job importJob = new Job(Messages.getString("ExecutablesTab.8")) { //$NON-NLS-1$

                    @Override
                    public IStatus run(IProgressMonitor monitor) {
                        ExecutablesManager.getExecutablesManager().importExecutables(new String[] { res },
                                monitor);
                        return Status.OK_STATUS;
                    }
                };
                importJob.schedule();
            }
        }
    });

    selectAllButton = new Button(buttonComp, SWT.PUSH);
    selectAllButton.setText(Messages.getString("ExecutablesTab.9")); //$NON-NLS-1$
    selectAllButton.setData(".uid", "ExecutablesTab.selectAllButton"); //$NON-NLS-1$ //$NON-NLS-2$
    selectAllButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            executablesBlock.setAllChecked(true);
        }
    });

    unselectAllButton = new Button(buttonComp, SWT.PUSH);
    unselectAllButton.setText(Messages.getString("ExecutablesTab.10")); //$NON-NLS-1$
    unselectAllButton.setData(".uid", "ExecutablesTab.unselectAllButton"); //$NON-NLS-1$ //$NON-NLS-2$
    unselectAllButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            executablesBlock.setAllChecked(false);
        }
    });

    ExecutablesManager.getExecutablesManager().addExecutablesChangeListener(this);
    Dialog.applyDialogFont(parent);
}

From source file:com.nokia.cdt.internal.debug.launch.ui.FileTransferTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);//from w w  w  .ja v  a2s.  co  m

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.RUN_MODE_FILE_TRANSFER);

    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    comp.setLayout(layout);

    fFilesBlock = new FilesBlock(this);
    fFilesBlock.createControl(comp);
    Control control = fFilesBlock.getControl();
    GridData data = new GridData(GridData.FILL_BOTH);
    data.horizontalSpan = 1;
    data.horizontalIndent = 18;
    data.verticalIndent = 18;
    control.setLayoutData(data);

    //      fFilesBlock.restoreColumnSettings(JDIDebugUIPlugin.getDefault().getDialogSettings(), IJavaDebugHelpContextIds.JRE_PREFERENCE_PAGE);

    Dialog.applyDialogFont(parent);
}

From source file:com.nokia.cdt.internal.debug.launch.ui.InstallationTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);/*  w  ww.j  a  va  2s.  c  o  m*/

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.RUN_MODE_INSTALLATION);

    GridLayout topLayout = new GridLayout();
    topLayout.numColumns = 2;
    comp.setLayout(topLayout);

    createVerticalSpacer(comp, 1);
    createSisGroup(comp, 1);
    createVerticalSpacer(comp, 1);
    createInstallerUIGroup(comp, 1);
    createVerticalSpacer(comp, 1);
    createPUInstallerUIGroup(comp, 1);

    Dialog.applyDialogFont(parent);
    checkControlState();
}

From source file:com.nokia.cdt.internal.debug.launch.ui.RomLogFileTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);/*from   w  w w . j  a v  a 2  s  . c  o m*/

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.RUN_MODE_ROM_LOG_FILE);

    GridLayout topLayout = new GridLayout();
    topLayout.numColumns = 2;
    comp.setLayout(topLayout);

    createVerticalSpacer(comp, 2);
    createRomLogFileGroup(comp, 2);
    createVerticalSpacer(comp, 2);

    Dialog.applyDialogFont(parent);
    checkControlState();
}

From source file:com.nokia.cdt.internal.debug.launch.ui.RunModeDebuggerTab.java

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);//  w ww .  j a  v a 2s  .  co  m

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchTabHelpIds.RUN_MODE_DEBUGGER);

    GridLayout topLayout = new GridLayout();
    topLayout.numColumns = 2;
    comp.setLayout(topLayout);

    createVerticalSpacer(comp, 2);
    createBooleanGroup(comp, 2);

    Dialog.applyDialogFont(parent);
    checkControlState();
}

From source file:com.nokia.cdt.internal.debug.launch.wizard.LaunchCategorySelectionPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 10;/* w  ww . ja  v  a2  s  . c om*/
    container.setLayout(layout);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    Label label = new Label(container, SWT.NONE);
    label.setText(Messages.getString("LaunchCategorySelectionPage.categoryLabel")); //$NON-NLS-1$
    GridData gd = new GridData();
    label.setLayoutData(gd);
    label.setData(".uid", "LaunchCategorySelectionPage.label");

    SashForm sashForm = new SashForm(container, SWT.VERTICAL);
    gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 300;
    gd.heightHint = 300;
    gd.minimumHeight = 230;
    sashForm.setLayoutData(gd);

    categorySelectionTableViewer = new TableViewer(sashForm, SWT.BORDER);
    categorySelectionTableViewer.setContentProvider(this);
    categorySelectionTableViewer.addDoubleClickListener(new IDoubleClickListener() {
        public void doubleClick(DoubleClickEvent event) {
            selectionChanged(new SelectionChangedEvent(categorySelectionTableViewer,
                    categorySelectionTableViewer.getSelection()));
            moveToNextPage();
        }
    });
    categorySelectionTableViewer.setInput(categories);
    categorySelectionTableViewer.addSelectionChangedListener(this);

    createDescriptionIn(sashForm);
    sashForm.setWeights(new int[] { 75, 25 });

    Dialog.applyDialogFont(container);
    setControl(container);

    // select the first element by default
    categorySelectionTableViewer
            .setSelection(new StructuredSelection(categorySelectionTableViewer.getElementAt(0)), true);

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
            LaunchWizardHelpIds.CATEGORY_SELECTION_PAGE);
}

From source file:com.nokia.cdt.internal.debug.launch.wizard.LaunchWizardSelectionPage.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  a v a 2  s  . co  m
    container.setLayout(layout);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    Label label = new Label(container, SWT.NONE);
    label.setText(getLabel());
    GridData gd = new GridData();
    label.setLayoutData(gd);
    label.setData(".uid", "LaunchWizardSelectionPage.label");

    SashForm sashForm = new SashForm(container, SWT.VERTICAL);
    gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 300;
    gd.heightHint = 300;
    gd.minimumHeight = 230;
    sashForm.setLayoutData(gd);

    wizardSelectionTableViewer = new TableViewer(sashForm, SWT.BORDER);
    wizardSelectionTableViewer.setContentProvider(this);
    wizardSelectionTableViewer.addDoubleClickListener(new IDoubleClickListener() {
        public void doubleClick(DoubleClickEvent event) {
            selectionChanged(new SelectionChangedEvent(wizardSelectionTableViewer,
                    wizardSelectionTableViewer.getSelection()));
            moveToNextPage();
        }
    });
    wizardSelectionTableViewer.addSelectionChangedListener(this);

    wizardSelectionTableViewer.setInput(mainWizard.getWizardsForCategory(mainWizard.getCategoryId()));

    createDescriptionIn(sashForm);
    sashForm.setWeights(new int[] { 75, 25 });

    Dialog.applyDialogFont(container);
    setControl(container);

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), LaunchWizardHelpIds.WIZARD_SELECTION_PAGE);
}