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.plugin.FragmentContentPage.java

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 15;//from   w w  w . j av  a2s.c o  m
    container.setLayout(layout);

    createFragmentPropertiesGroup(container);
    createParentPluginGroup(container);

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

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

License:Open Source License

public void createControl(Composite parent) {
    Composite control = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;//www.j  a  v  a2  s . co  m
    // layout.verticalSpacing = 10;
    control.setLayout(layout);

    Label l = new Label(control, SWT.WRAP);
    l.setText(MDEUIMessages.LibraryPluginJarsPage_label);
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalSpan = 2;
    l.setLayoutData(data);
    fTableViewer = new TableViewer(control, SWT.MULTI | SWT.BORDER);
    fTableViewer.setContentProvider(new DefaultTableProvider() {
        public Object[] getElements(Object inputElement) {
            return fJarPaths.toArray();
        }
    });
    fTableViewer.setLabelProvider(new LabelProvider() {
        public String getText(Object obj) {
            String name;
            String location;
            if (obj instanceof IFile) {
                IFile jarFile = (IFile) obj;
                name = jarFile.getName();
                location = jarFile.getParent().getFullPath().toString().substring(1);
            } else {
                File jarFile = (File) obj;
                name = jarFile.getName();
                location = jarFile.getParent();
            }
            return name + " - " + location; //$NON-NLS-1$

        }

        public Image getImage(Object obj) {
            if (obj instanceof IFile) {
                return MDEPlugin.getDefault().getLabelProvider().get(MDEPluginImages.DESC_JAR_OBJ);
            }
            return MDEPlugin.getDefault().getLabelProvider().get(MDEPluginImages.DESC_JAR_LIB_OBJ);
        }
    });
    // should not sort, bug 98401
    //fTableViewer.setSorter(new ViewerSorter()); 
    data = new GridData(GridData.FILL_BOTH);
    fTableViewer.getControl().setLayoutData(data);
    fTableViewer.setInput(fJarPaths);
    fTableViewer.getTable().addKeyListener(new KeyAdapter() {
        public void keyPressed(KeyEvent event) {
            if (event.character == SWT.DEL && event.stateMask == 0) {
                handleRemove();
            }
        }
    });

    Composite buttons = new Composite(control, SWT.NONE);
    layout = new GridLayout();
    layout.verticalSpacing = 5;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    buttons.setLayout(layout);
    data = new GridData(GridData.FILL_VERTICAL);
    data.grabExcessVerticalSpace = true;
    buttons.setLayoutData(data);

    Button browseWorkspace = new Button(buttons, SWT.PUSH);
    browseWorkspace.setText(MDEUIMessages.LibraryPluginJarsPage_add);
    browseWorkspace.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));
    SWTUtil.setButtonDimensionHint(browseWorkspace);
    browseWorkspace.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            chooseWorkspaceFile();
        }
    });

    Button browseFile = new Button(buttons, SWT.PUSH);
    browseFile.setText(MDEUIMessages.LibraryPluginJarsPage_addExternal);
    browseFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    SWTUtil.setButtonDimensionHint(browseFile);
    browseFile.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            chooseFile();
        }
    });

    fRemove = new Button(buttons, SWT.PUSH);
    fRemove.setText(MDEUIMessages.LibraryPluginJarsPage_remove);
    fRemove.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    SWTUtil.setButtonDimensionHint(fRemove);
    fRemove.setEnabled(fJarPaths.size() > 0);
    setPageComplete(fJarPaths.size() > 0);
    fRemove.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            handleRemove();
        }
    });

    Dialog.applyDialogFont(control);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(control, IHelpContextIds.NEW_LIBRARY_PROJECT_JAR_PAGE);
    setControl(control);

    PlatformUI.getWorkbench().getHelpSystem().setHelp(control, IHelpContextIds.LIBRARY_PLUGIN_JARS);
}

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

License:Open Source License

public void createControl(Composite parent) {
    super.createControl(parent);
    Composite control = (Composite) getControl();
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 10;/*ww  w  . j  a v  a2s. com*/
    control.setLayout(layout);

    createPluginPropertiesGroup(control);

    createFormatGroup(control);

    createWorkingSetGroup(control, fSelection, new String[] { "org.eclipse.jdt.ui.JavaWorkingSetPage", //$NON-NLS-1$
            "com.siteview.mde.ui.pluginWorkingSet", //$NON-NLS-1$
            "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$

    updateRuntimeDependency();

    Dialog.applyDialogFont(control);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(control,
            IHelpContextIds.NEW_LIBRARY_PROJECT_STRUCTURE_PAGE);
    setControl(control);
}

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

License:Open Source License

public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;//from  ww  w  .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());
    if (fSelected != null && fSelected.length > 0) {
        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.plugin.NewProjectCreationPage.java

License:Open Source License

public void createControl(Composite parent) {
    super.createControl(parent);
    Composite control = (Composite) getControl();
    GridLayout layout = new GridLayout();
    control.setLayout(layout);//from  ww w. jav  a2 s. com

    createProjectTypeGroup(control);
    createFormatGroup(control);
    createWorkingSetGroup(control, fSelection, new String[] { "org.eclipse.jdt.ui.JavaWorkingSetPage", //$NON-NLS-1$
            "com.siteview.mde.ui.pluginWorkingSet", "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$ //$NON-NLS-2$

    updateRuntimeDependency();

    Dialog.applyDialogFont(control);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(control,
            fFragment ? IHelpContextIds.NEW_FRAGMENT_STRUCTURE_PAGE
                    : IHelpContextIds.NEW_PROJECT_STRUCTURE_PAGE);
    setControl(control);
}

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

License:Open Source License

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

    createPluginPropertiesGroup(container);
    createPluginClassGroup(container);//  w w w  .ja  v a 2 s  .  com
    createRCPQuestion(container, 2);

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

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

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 20;/*from  ww w. j  av a2  s. c  o  m*/
    comp.setLayout(layout);

    FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    createProductGroup(toolkit, comp);
    createApplicationGroup(toolkit, comp);
    toolkit.dispose();
    setControl(comp);
    setPageComplete(getPluginId() != null && productNameDefined());
    Dialog.applyDialogFont(comp);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IHelpContextIds.PRODUCT_DEFINITIONS_WIZARD);
}

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

License:Open Source License

public void createControl(Composite parent) {
    super.createControl(parent);
    Dialog.applyDialogFont(fGroup);

    PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.PRODUCT_FILE_PAGE);
}

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

License:Open Source License

public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.verticalSpacing = 20;//from  w  w w  .ja v  a 2 s  .c om
    comp.setLayout(layout);

    FormToolkit toolkit = new FormToolkit(parent.getDisplay());
    createProductGroup(toolkit, comp);
    toolkit.dispose();

    setControl(comp);
    setPageComplete(getPluginId() != null);
    Dialog.applyDialogFont(comp);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IHelpContextIds.PRODUCT_DEFINITIONS_WIZARD);
}

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

License:Open Source License

/**
 * Insert the method's description here.
 * @see WizardPage#createControl//from   www  . j a  v a 2 s  .co  m
 */
public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    container.setLayout(new GridLayout());
    Label label = new Label(container, SWT.NULL);
    label.setText(MDEUIMessages.RequiredPluginsContainerPage_label);
    viewer = new TableViewer(container, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    viewer.setContentProvider(new EntryContentProvider());
    viewer.setLabelProvider(new EntryLabelProvider());
    viewer.setComparator(new ViewerComparator());

    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = 400;
    gd.heightHint = 300;
    viewer.getTable().setLayoutData(gd);

    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.PLUGINS_CONTAINER_PAGE);
    setControl(container);
    Dialog.applyDialogFont(container);
    if (realEntries != null)
        initializeView();

    PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.REQUIRED_PLUINGS_CONTAINER);
}