List of usage examples for org.eclipse.jface.dialogs Dialog applyDialogFont
public static void applyDialogFont(Control control)
From source file:com.siteview.mde.internal.ui.launcher.ApplicationSelectionDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); GridLayout layout = new GridLayout(); layout.numColumns = 2;/* w w w . ja v a 2 s. c om*/ layout.marginWidth = layout.marginHeight = 9; container.setLayout(layout); GridData gd = new GridData(GridData.FILL_BOTH); gd.heightHint = 100; container.setLayoutData(gd); Label label = new Label(container, SWT.NONE); if (fMode.equals(ILaunchManager.DEBUG_MODE)) label.setText(MDEUIMessages.ApplicationSelectionDialog_debug); else label.setText(MDEUIMessages.ApplicationSelectionDialog_run); applicationCombo = new Combo(container, SWT.READ_ONLY | SWT.DROP_DOWN); applicationCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); applicationCombo.setItems(fApplicationNames); String defaultApp = TargetPlatform.getDefaultApplication(); if (applicationCombo.indexOf(defaultApp) == -1) applicationCombo.add(defaultApp); applicationCombo.setText(applicationCombo.getItem(0)); getShell().setText(fMode.equals(ILaunchManager.DEBUG_MODE) ? MDEUIMessages.ApplicationSelectionDialog_dtitle : MDEUIMessages.ApplicationSelectionDialog_rtitle); // Dialog.applyDialogFont(container); return container; }
From source file:com.siteview.mde.internal.ui.launcher.PluginStatusDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); GridData gd = new GridData(GridData.FILL_BOTH); gd.widthHint = 400;/*from ww w . j a v a 2s. c om*/ gd.heightHint = 300; container.setLayoutData(gd); Label label = new Label(container, SWT.NONE); label.setText(MDEUIMessages.PluginStatusDialog_label); treeViewer = new TreeViewer(container); treeViewer.setContentProvider(new ContentProvider()); treeViewer.setLabelProvider(MDEPlugin.getDefault().getLabelProvider()); treeViewer.setComparator(new ViewerComparator()); treeViewer.setInput(fInput); treeViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH)); getShell().setText(MDEUIMessages.PluginStatusDialog_pluginValidation); Dialog.applyDialogFont(container); return container; }
From source file:com.siteview.mde.internal.ui.nls.ExternalizeStringsWizardPage.java
License:Open Source License
public void createControl(Composite parent) { SashForm superSash = new SashForm(parent, SWT.HORIZONTAL); superSash.setFont(parent.getFont()); superSash.setLayoutData(new GridData(GridData.FILL_BOTH)); createInputContents(superSash);/*from ww w .j a v a2 s. c om*/ SashForm sash = new SashForm(superSash, SWT.VERTICAL); sash.setFont(superSash.getFont()); sash.setLayoutData(new GridData(GridData.FILL_BOTH)); createTableViewer(sash); createSourceViewer(sash); initialize(); setPageComplete(hasCheckedElements()); superSash.setWeights(new int[] { 4, 7 }); setControl(superSash); Dialog.applyDialogFont(superSash); PlatformUI.getWorkbench().getHelpSystem().setHelp(superSash, IHelpContextIds.EXTERNALIZE_STRINGS_PAGE); }
From source file:com.siteview.mde.internal.ui.nls.InternationalizeWizardLocalePage.java
License:Open Source License
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3;// w ww . j av a 2s . c om layout.makeColumnsEqualWidth = false; layout.horizontalSpacing = 5; layout.verticalSpacing = 20; container.setLayout(layout); createScrollArea(container); createAvailableList(container).setLayoutData(new GridData(GridData.FILL_BOTH)); createButtonArea(container); createLocaleList(container).setLayoutData(new GridData(GridData.FILL_BOTH)); updateCount(); addViewerListeners(); addFilter(); initialize(); setControl(container); Dialog.applyDialogFont(container); }
From source file:com.siteview.mde.internal.ui.nls.InternationalizeWizardPluginPage.java
License:Open Source License
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3;/*from w w w . j a v a2 s . com*/ layout.makeColumnsEqualWidth = false; layout.horizontalSpacing = 5; layout.verticalSpacing = 20; container.setLayout(layout); createScrollArea(container); createAvailableList(container).setLayoutData(new GridData(GridData.FILL_BOTH)); createButtonArea(container); createInternationalizeList(container).setLayoutData(new GridData(GridData.FILL_BOTH)); updateCount(); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; Composite comp = new Composite(container, SWT.NONE); comp.setLayoutData(data); GridLayout fl = new GridLayout(2, false); comp.setLayout(fl); IDialogSettings settings = getDialogSettings(); String template = settings.get(TEMPLATE); Label label = new Label(comp, SWT.NONE); label.setText(MDEUIMessages.InternationalizeWizard_PluginPage_templateLabel); fTemplateText = new Text(comp, SWT.BORDER); fTemplateText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fTemplateText.setText(template != null ? template : NLSFragmentGenerator.PLUGIN_NAME_MACRO + ".nl1"); //$NON-NLS-1$ fTemplateText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { pageChanged(); } }); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; overwriteOption = new Button(comp, SWT.CHECK); overwriteOption.setText(MDEUIMessages.InternationalizeWizard_PluginPage_overwriteWithoutAsking); overwriteOption.setSelection(settings.getBoolean(OVERWRITE)); overwriteOption.setLayoutData(gd); individualFragments = new Button(comp, SWT.CHECK); individualFragments.setText(MDEUIMessages.InternationalizeWizard_PluginPage_individualFragments); individualFragments.setSelection(settings.getBoolean(CREATE_INDIVIDUAL_FRAGMENTS)); individualFragments.setLayoutData(gd); addViewerListeners(); addFilter(); initialize(); setControl(container); Dialog.applyDialogFont(container); }
From source file:com.siteview.mde.internal.ui.preferences.EditorPreferencePage.java
License:Open Source License
protected Control createContents(Composite parent) { final Link link = new Link(parent, SWT.NONE); link.setText(MDEUIMessages.EditorPreferencePage_link); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if ("org.eclipse.ui.preferencePages.GeneralTextEditor".equals(e.text)) //$NON-NLS-1$ PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, null); else if ("org.eclipse.ui.preferencePages.ColorsAndFonts".equals(e.text)) //$NON-NLS-1$ PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, "selectFont:org.eclipse.jface.textfont"); //$NON-NLS-1$ }/* ww w . java 2 s . c o m*/ }); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); Button foldingButton = new Button(parent, SWT.CHECK | SWT.LEFT | SWT.WRAP); foldingButton.setText(MDEUIMessages.EditorPreferencePage_folding); foldingButton.setLayoutData(gd); foldingButton.setSelection(MDEPlugin.getDefault().getPreferenceStore() .getBoolean(IPreferenceConstants.EDITOR_FOLDING_ENABLED)); foldingButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { IPreferenceStore store = MDEPlugin.getDefault().getPreferenceStore(); store.setValue(IPreferenceConstants.EDITOR_FOLDING_ENABLED, ((Button) e.getSource()).getSelection()); } }); TabFolder folder = new TabFolder(parent, SWT.NONE); folder.setLayout(new TabFolderLayout()); folder.setLayoutData(new GridData(GridData.FILL_BOTH)); createXMLTab(folder); createManifestTab(folder); Dialog.applyDialogFont(getControl()); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.EDITOR_PREFERENCE_PAGE); return parent; }
From source file:com.siteview.mde.internal.ui.preferences.MainPreferencePage.java
License:Open Source License
public void createControl(Composite composite) { super.createControl(composite); Dialog.applyDialogFont(getControl()); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.MAIN_PREFERENCE_PAGE); }
From source file:com.siteview.mde.internal.ui.preferences.OSGiFrameworkPreferencePage.java
License:Open Source License
protected Control createContents(Composite parent) { Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH); Link text = new Link(comp, SWT.WRAP); final IMonitorExtensionPoint point = MDECore.getDefault().getExtensionsRegistry() .findExtensionPoint(OSGiFrameworkManager.POINT_ID); text.setText((point != null && SchemaRegistry.getSchemaURL(point) != null) ? MDEUIMessages.OSGiFrameworkPreferencePage_installed : MDEUIMessages.OSGiFrameworkPreferencePage_installed_nolink); GridData gd = new GridData(); gd.horizontalSpan = 2;//from w ww . j a v a2 s. c om text.setLayoutData(gd); text.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { new ShowDescriptionAction(point, true).run(); } }); fTableViewer = new CheckboxTableViewer( new Table(comp, SWT.CHECK | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION)); fTableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH)); fTableViewer.setContentProvider(ArrayContentProvider.getInstance()); fTableViewer.setLabelProvider(new FrameworkLabelProvider()); fTableViewer.setInput(PDELaunchingPlugin.getDefault().getOSGiFrameworkManager().getSortedFrameworks()); fTableViewer.addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent event) { IConfigurationElement element = (IConfigurationElement) event.getElement(); fTableViewer.setCheckedElements(new Object[] { element }); fDefaultFramework = element.getAttribute(OSGiFrameworkManager.ATT_ID); fTableViewer.refresh(); } }); if (fDefaultFramework != null) { IConfigurationElement element = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager() .getFramework(fDefaultFramework); if (element != null) { fTableViewer.setCheckedElements(new Object[] { element }); } } Dialog.applyDialogFont(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.OSGI_PREFERENCE_PAGE); return comp; }
From source file:com.siteview.mde.internal.ui.preferences.ProjectSelectionDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { // page group Composite composite = (Composite) super.createDialogArea(parent); Font font = parent.getFont(); composite.setFont(font);// ww w . j a v a 2 s . c o m createMessageArea(composite); fTableViewer = new TableViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { doSelectionChanged(((IStructuredSelection) event.getSelection()).toArray()); } }); fTableViewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { okPressed(); } }); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT; data.widthHint = SIZING_SELECTION_WIDGET_WIDTH; fTableViewer.getTable().setLayoutData(data); fTableViewer.setLabelProvider(new JavaElementLabelProvider()); fTableViewer.setContentProvider(new ApiJavaElementContentProvider()); fTableViewer.setComparator(new JavaElementComparator()); fTableViewer.getControl().setFont(font); Button checkbox = SWTFactory.createCheckButton(composite, MDEUIMessages.ProjectSelectionDialog_settingsTitle, null, false, 1); checkbox.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { updateFilter(((Button) e.widget).getSelection()); } public void widgetDefaultSelected(SelectionEvent e) { updateFilter(((Button) e.widget).getSelection()); } }); IDialogSettings dialogSettings = MDEPlugin.getDefault().getDialogSettings(); boolean doFilter = !dialogSettings.getBoolean(DIALOG_SETTINGS_SHOW_ALL) && !fProjectsWithSpecifics.isEmpty(); checkbox.setSelection(doFilter); updateFilter(doFilter); IJavaModel input = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()); fTableViewer.setInput(input); doSelectionChanged(new Object[0]); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PROJECT_SELECTION_DIALOG); return composite; }
From source file:com.siteview.mde.internal.ui.preferences.TargetPlatformPreferencePage.java
License:Open Source License
public Control createContents(Composite parent) { Composite container = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH, 0, 0); createTargetProfilesGroup(container); Dialog.applyDialogFont(container); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.TARGET_PLATFORM_PREFERENCE_PAGE); return container; }