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.properties.CompilersPropertyPage.java
License:Open Source License
protected Control createContents(Composite parent) { Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH, 0, 0); Composite tcomp = SWTFactory.createComposite(comp, 2, 1, GridData.FILL_HORIZONTAL, 0, 0); fProjectSpecific = new Button(tcomp, SWT.CHECK); fProjectSpecific.setLayoutData(new GridData(SWT.BEGINNING, SWT.TOP, true, false)); fProjectSpecific.setText(MDEUIMessages.CompilersPropertyPage_useprojectsettings_label); fProjectSpecific.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { boolean psp = fProjectSpecific.getSelection(); fBlock.useProjectSpecificSettings(psp); if (fWorkspaceLink != null) { fWorkspaceLink.setEnabled(!psp); }//from www . j a v a 2 s . c om } }); if (offerLink()) { fWorkspaceLink = new Link(tcomp, SWT.NONE); fWorkspaceLink.setText(MDEUIMessages.CompilersPropertyPage_useworkspacesettings_change); fWorkspaceLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { HashMap data = new HashMap(); data.put(CompilersPreferencePage.NO_LINK, Boolean.TRUE); SWTFactory.showPreferencePage(getShell(), "com.siteview.mde.ui.CompilersPreferencePage", data); //$NON-NLS-1$ } }); } fBlock = new PDECompilersConfigurationBlock(getProject(), (IWorkbenchPreferenceContainer) getContainer()); fBlock.createControl(comp); boolean ps = fBlock.hasProjectSpecificSettings(getProject()); fProjectSpecific.setSelection(ps); fBlock.useProjectSpecificSettings(ps); if (fWorkspaceLink != null) { fWorkspaceLink.setEnabled(!ps); } PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.COMPILERS_PROPERTY_PAGE); Dialog.applyDialogFont(comp); return comp; }
From source file:com.siteview.mde.internal.ui.properties.PluginDevelopmentPage.java
License:Open Source License
protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); Group group = new Group(composite, SWT.NONE); group.setText(MDEUIMessages.PluginDevelopmentPage_presentation); group.setLayout(new GridLayout()); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fExtensionButton = new Button(group, SWT.CHECK); fExtensionButton.setText(MDEUIMessages.PluginDevelopmentPage_extensions); fEquinoxButton = new Button(group, SWT.CHECK); fEquinoxButton.setText(MDEUIMessages.PluginDevelopmentPage_equinox); initialize();//from w w w . j a v a 2s.co m Dialog.applyDialogFont(composite); return composite; }
From source file:com.siteview.mde.internal.ui.properties.SelfHostingPropertyPage.java
License:Open Source License
/** * @see PreferencePage#createContents(Composite) *///from w w w. j a v a 2 s . c om protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); Label label = new Label(composite, SWT.WRAP); label.setText(MDEUIMessages.SelfHostingPropertyPage_label); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.widthHint = 300; label.setLayoutData(gd); new Label(composite, SWT.NONE); label = new Label(composite, SWT.WRAP); label.setText(MDEUIMessages.SelfHostingPropertyPage_viewerLabel); fViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER); fViewer.setContentProvider(new ContentProvider()); fViewer.setLabelProvider(new FolderLabelProvider()); fViewer.setInput(getElement()); fViewer.setComparator(new ViewerComparator()); fViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH)); initialize(); Dialog.applyDialogFont(composite); return composite; }
From source file:com.siteview.mde.internal.ui.refactoring.GeneralRenameIDWizardPage.java
License:Open Source License
public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(2, false)); Dialog.applyDialogFont(composite); createMainControl(composite);// w w w. j a v a 2 s . c o m setPageComplete(false); setControl(composite); }
From source file:com.siteview.mde.internal.ui.search.PluginSearchPage.java
License:Open Source License
public void createControl(Composite parent) { Composite result = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(1, true); layout.marginHeight = 0;//from ww w .ja v a 2 s . c o m layout.marginWidth = 0; result.setLayout(layout); result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); createPatternSection(result); createSettingsSection(result); hookListeners(); setControl(result); Dialog.applyDialogFont(result); PlatformUI.getWorkbench().getHelpSystem().setHelp(result, IHelpContextIds.SEARCH_PAGE); }
From source file:com.siteview.mde.internal.ui.util.PluginWorkingSet.java
License:Open Source License
public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); setControl(composite);/*from www . jav a 2 s .c om*/ Label label = new Label(composite, SWT.WRAP); label.setText(MDEUIMessages.PluginWorkingSet_setName); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fWorkingSetName = new Text(composite, SWT.SINGLE | SWT.BORDER); fWorkingSetName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fWorkingSetName.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validatePage(); } }); fWorkingSetName.setFocus(); label = new Label(composite, SWT.WRAP); label.setText(MDEUIMessages.PluginWorkingSet_setContent); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fTree = new CheckboxFilteredTree(composite, SWT.BORDER, new PatternFilter()); GridData gd = new GridData(GridData.FILL_BOTH); gd.heightHint = 250; fTree.getViewer().getControl().setLayoutData(gd); final IStructuredContentProvider fTableContentProvider = new ContentProvider(); fTree.getCheckboxTreeViewer().setContentProvider(fTableContentProvider); fTree.getCheckboxTreeViewer().setLabelProvider(new WorkingSetLabelProvider()); fTree.getCheckboxTreeViewer().setUseHashlookup(true); fTree.getCheckboxTreeViewer().setInput(MDECore.getDefault()); fTree.getCheckboxTreeViewer().addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent event) { validatePage(); } }); // Add select / deselect all buttons for bug 46669 Composite buttonComposite = new Composite(composite, SWT.NONE); buttonComposite.setLayout(new GridLayout(2, true)); buttonComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); Button selectAllButton = new Button(buttonComposite, SWT.PUSH); selectAllButton.setText(MDEUIMessages.PluginWorkingSet_selectAll_label); selectAllButton.setToolTipText(MDEUIMessages.PluginWorkingSet_selectAll_toolTip); selectAllButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent selectionEvent) { fTree.getCheckboxTreeViewer().setCheckedElements( fTableContentProvider.getElements(fTree.getCheckboxTreeViewer().getInput())); validatePage(); } }); selectAllButton.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(selectAllButton); Button deselectAllButton = new Button(buttonComposite, SWT.PUSH); deselectAllButton.setText(MDEUIMessages.PluginWorkingSet_deselectAll_label); deselectAllButton.setToolTipText(MDEUIMessages.PluginWorkingSet_deselectAll_toolTip); deselectAllButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent selectionEvent) { fTree.getCheckboxTreeViewer().setCheckedElements(new Object[0]); validatePage(); } }); deselectAllButton.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(deselectAllButton); setPageComplete(false); setMessage(MDEUIMessages.PluginWorkingSet_message); initialize(); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.PLUGIN_WORKING_SET); }
From source file:com.siteview.mde.internal.ui.util.SWTUtil.java
License:Open Source License
/** * Sets width and height hint for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * /*from w w w . ja v a 2 s . c o m*/ * @param the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Dialog.applyDialogFont(button); Assert.isNotNull(button); Object gd = button.getLayoutData(); if (gd instanceof GridData) { ((GridData) gd).widthHint = getButtonWidthHint(button); } }
From source file:com.siteview.mde.internal.ui.wizards.exports.BaseExportWizardPage.java
License:Open Source License
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.verticalSpacing = 10;//from w ww .ja v a 2 s . com container.setLayout(layout); createViewer(container); fTabFolder = new TabFolder(container, SWT.NONE); fTabFolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); createTabs(fTabFolder, getDialogSettings()); initializeViewer(); if (getErrorMessage() != null) { setMessage(getErrorMessage()); setErrorMessage(null); } setControl(container); hookHelpContext(container); Dialog.applyDialogFont(container); }
From source file:com.siteview.mde.internal.ui.wizards.exports.JARSigningTab.java
License:Open Source License
public Control createControl(Composite parent) { Composite comp = new Composite(parent, SWT.NONE); comp.setLayout(new GridLayout(3, false)); comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fButton = new Button(comp, SWT.CHECK); fButton.setText(MDEUIMessages.AdvancedPluginExportPage_signButton); GridData gd = new GridData(); gd.horizontalSpan = 3;/*from w w w. j av a2 s.co m*/ fButton.setLayoutData(gd); fButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateGroup(fButton.getSelection()); fPage.pageChanged(); } }); fKeystoreLabel = createLabel(comp, MDEUIMessages.AdvancedPluginExportPage_keystore); fKeystoreText = createText(comp, 1); fBrowseButton = new Button(comp, SWT.PUSH); fBrowseButton.setText(MDEUIMessages.ExportWizard_browse); fBrowseButton.setLayoutData(new GridData()); SWTUtil.setButtonDimensionHint(fBrowseButton); fBrowseButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { FileDialog dialog = new FileDialog(fPage.getShell(), SWT.OPEN); String path = fKeystoreText.getText(); if (path.trim().length() == 0) path = MDEPlugin.getWorkspace().getRoot().getLocation().toString(); dialog.setFileName(path); String res = dialog.open(); if (res != null) { fKeystoreText.setText(res); } } }); fKeypassLabel = createLabel(comp, MDEUIMessages.JARSigningTab_keypass); fKeypassText = createText(comp, 2); fKeypassText.setEchoChar('*'); fAliasLabel = createLabel(comp, MDEUIMessages.AdvancedPluginExportPage_alias); fAliasText = createText(comp, 2); fPasswordLabel = createLabel(comp, MDEUIMessages.AdvancedPluginExportPage_password); fPasswordText = createText(comp, 2); fPasswordText.setEchoChar('*'); Dialog.applyDialogFont(comp); PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IHelpContextIds.ADVANCED_PLUGIN_EXPORT); return comp; }
From source file:com.siteview.mde.internal.ui.wizards.exports.JNLPTab.java
License:Open Source License
public Control createControl(Composite parent) { Composite jnlpGroup = new Composite(parent, SWT.NONE); jnlpGroup.setLayout(new GridLayout(2, false)); jnlpGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fButton = new Button(jnlpGroup, SWT.CHECK); fButton.setText(MDEUIMessages.AdvancedFeatureExportPage_createJNLP); GridData gd = new GridData(); gd.horizontalSpan = 2;/*from w ww .j a v a2s. c om*/ fButton.setLayoutData(gd); fButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updateGroup(fButton.getSelection()); fPage.pageChanged(); } }); fURLLabel = createLabel(jnlpGroup, MDEUIMessages.AdvancedFeatureExportPage_siteURL); fURLText = createText(jnlpGroup); fVersionLabel = createLabel(jnlpGroup, MDEUIMessages.AdvancedFeatureExportPage_jreVersion); fVersionText = createText(jnlpGroup); Dialog.applyDialogFont(jnlpGroup); return jnlpGroup; }