List of usage examples for org.eclipse.jface.dialogs Dialog applyDialogFont
public static void applyDialogFont(Control control)
From source file:eu.geclipse.jsdl.ui.internal.dialogs.MultipleInputDialog.java
License:Open Source License
@Override protected Control createDialogArea(final Composite parent) { Composite container = (Composite) super.createDialogArea(parent); container.setLayout(new GridLayout(2, false)); container.setLayoutData(new GridData(GridData.FILL_BOTH)); this.panel = new Composite(container, SWT.NONE); GridLayout layout = new GridLayout(2, false); this.panel.setLayout(layout); this.panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); for (Iterator<FieldSummary> i = this.fieldList.iterator(); i.hasNext();) { FieldSummary field = i.next();//from w w w . j ava2s. c om boolean connected = checkReadyToConnect(field.name, this.fieldList.indexOf(field)); switch (field.type) { case TEXT: createTextField(field.name, field.initialValue, field.allowsEmpty, connected); break; case STORED_COMBO: createStoredComboField(field.name, field.initialValue, field.allowsEmpty, connected, field.prefID); break; case BROWSE: createBrowseField(field.name, field.initialValue, field.allowsEmpty, connected, field.allowLocal); break; // case VARIABLE: // createVariablesField( field.name, // field.initialValue, // field.allowsEmpty ); // break; case COMBO: createComboField(field.name, field.initialValue, field.allowsEmpty); break; } } this.fieldList = null; // allow it to be gc'd Dialog.applyDialogFont(container); return container; }
From source file:eu.geclipse.ui.widgets.TabComponent.java
License:Open Source License
public void createControl(final Composite parent) { Composite mainComposite1 = new Composite(parent, SWT.NONE); setControl(mainComposite1);//ww w .j a v a2 s . c om GridLayout layout = new GridLayout(); if (this.buttonsPosition == SWT.BOTTOM || this.buttonsPosition == SWT.TOP) { layout.numColumns = 1; } else { layout.numColumns = 2; } GridData gridData = new GridData(GridData.FILL_HORIZONTAL); mainComposite1.setLayout(layout); mainComposite1.setLayoutData(gridData); mainComposite1.setFont(parent.getFont()); createTable(mainComposite1); createTableButtons(mainComposite1); setLabels(); Dialog.applyDialogFont(mainComposite1); addEditors(); if (!this.cellEditors.isEmpty()) { CellEditor[] editorsTable = new CellEditor[this.cellEditors.size()]; int i = 0; for (CellEditor editor : this.cellEditors) { editorsTable[i] = editor; i++; } this.table.setCellEditors(editorsTable); this.table.setCellModifier(this.cellModifier); } }
From source file:eu.numberfour.n4js.n4mf.ui.wizard.N4MFWizardNewProjectCreationPage.java
License:Open Source License
@Override public void createControl(final Composite parent) { super.createControl(parent); // We need to create the UI controls from the parent class. final Composite control = (Composite) getControl(); control.setLayout(GridLayoutFactory.fillDefaults().create()); control.setLayoutData(fillDefaults().align(FILL, FILL).grab(true, true).create()); final DataBindingContext dbc = new DataBindingContext(); control.addDisposeListener(e -> dbc.dispose()); final ComboViewer projectType = new ComboViewer(control, READ_ONLY); projectType.setLabelProvider(new ProjectTypeLabelProvider()); projectType.setContentProvider(ArrayContentProvider.getInstance()); projectType.getControl().setLayoutData(fillDefaults().grab(true, false).create()); projectType.setInput(ProjectType.values()); // A composite to hold the changing UI component (additional library project options / additional test project // options)/*www.j a va 2s. c o m*/ final Composite changingComposite = new Composite(control, NONE); StackLayout changingStackLayout = new StackLayout(); changingComposite.setLayout(changingStackLayout); changingComposite.setLayoutData(fillDefaults().align(FILL, FILL).grab(true, true).create()); Composite defaultOptions = initDefaultOptionsUI(dbc, changingComposite); Composite libraryProjectOptionsGroup = initLibraryOptionsUI(dbc, changingComposite); Composite testProjectOptionsGroup = initTestProjectUI(dbc, changingComposite); initProjectTypeBinding(dbc, projectType); // Configure stack layout to show advanced options projectType.addPostSelectionChangedListener(e -> { switch (projectInfo.getProjectType()) { case LIBRARY: changingStackLayout.topControl = libraryProjectOptionsGroup; break; case TEST: changingStackLayout.topControl = testProjectOptionsGroup; break; default: changingStackLayout.topControl = defaultOptions; } changingComposite.layout(true); setPageComplete(validatePage()); }); // IDs from: org.eclipse.jdt.internal.ui.workingsets.IWorkingSetIDs.class createWorkingSetGroup((Composite) getControl(), null, new String[] { "org.eclipse.ui.resourceWorkingSetPage", "org.eclipse.jdt.ui.JavaWorkingSetPage", "org.eclipse.jdt.internal.ui.OthersWorkingSet" }); // $NON-NLS-1$ Dialog.applyDialogFont(getControl()); dbc.updateTargets(); setControl(control); }
From source file:eu.numberfour.n4js.ui.preferences.AbstractN4JSPreferencePage.java
License:Open Source License
@Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 0;//w w w . ja v a 2s.c o m layout.marginWidth = 0; composite.setLayout(layout); composite.setFont(parent.getFont()); GridData data = new GridData(GridData.FILL, GridData.FILL, true, true); configurationBlockControl = super.createContents(composite); configurationBlockControl.setLayoutData(data); if (isProjectPreferencePage()) { boolean useProjectSpecificSettings = hasProjectSpecificOptions(); enableProjectSpecificSettings(useProjectSpecificSettings); } Dialog.applyDialogFont(composite); return composite; }
From source file:ext.org.eclipse.jdt.internal.ui.callhierarchy.ExpandWithConstructorsConfigurationBlock.java
License:Open Source License
@Override protected Control createContents(Composite parent) { Composite control = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;//from w w w . j a v a 2 s. co m layout.marginWidth = 10; layout.marginHeight = 10; control.setLayout(layout); createPreferenceList(control); fAnonymousButton = new Button(control, SWT.CHECK); fAnonymousButton.setText(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_anonymousTypes_label); fIsAnonymous = getBooleanValue(ANONYMOUS_EXPAND_WITH_CONSTRUCTORS); fAnonymousButton.setSelection(fIsAnonymous); fAnonymousButton.setLayoutData(new GridData(SWT.LEAD, SWT.TOP, false, false)); fAnonymousButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { fIsAnonymous = fAnonymousButton.getSelection(); } }); initialize(); Dialog.applyDialogFont(control); return control; }
From source file:ext.org.eclipse.jdt.internal.ui.callhierarchy.ExpandWithConstructorsDialog.java
License:Open Source License
@Override protected Control createDialogArea(Composite composite) { fConfigurationBlock = new ExpandWithConstructorsConfigurationBlock(new IStatusChangeListener() { public void statusChanged(IStatus status) { //Do nothing }//from w ww . j a v a 2 s . c o m }, null); GridData data = new GridData(GridData.FILL, GridData.FILL, true, true); fConfigurationBlockControl = fConfigurationBlock.createContents(composite); fConfigurationBlockControl.setLayoutData(data); Dialog.applyDialogFont(composite); return composite; }
From source file:ext.org.eclipse.jdt.internal.ui.jarimport.JarImportWizardPage.java
License:Open Source License
/** * {@inheritDoc}//from ww w. j a va 2 s . c o m */ public void createControl(final Composite parent) { initializeDialogUnits(parent); final Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); createLocationGroup(composite); if (fImportWizard) createInputGroup(composite); createRenameGroup(composite); setPageComplete(false); if (fImportWizard && !fTreeViewer.getControl().isEnabled()) setMessage(JarImportMessages.JarImportWizardPage_no_jar_files, INFORMATION); setControl(composite); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.JARIMPORT_WIZARD_PAGE); }
From source file:ext.org.eclipse.jdt.internal.ui.jarpackager.JarManifestWizardPage.java
License:Open Source License
public void createControl(Composite parent) { initializeDialogUnits(parent);// ww w.j av a2 s . c o m Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); createLabel(composite, JarPackagerMessages.JarManifestWizardPage_manifestSource_label, false); createManifestGroup(composite); createSpacer(composite); fSealingHeaderLabel = createLabel(composite, JarPackagerMessages.JarManifestWizardPage_sealingHeader_label, false); createSealingGroup(composite); createSpacer(composite); fMainClassHeaderLabel = createLabel(composite, JarPackagerMessages.JarManifestWizardPage_mainClassHeader_label, false); createMainClassGroup(composite); setEqualButtonSizes(); restoreWidgetValues(); setControl(composite); update(); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.JARMANIFEST_WIZARD_PAGE); }
From source file:ext.org.eclipse.jdt.internal.ui.jarpackager.JarOptionsPage.java
License:Open Source License
public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); createOptionsGroup(composite);/*from w w w.j a v a2 s . c om*/ restoreWidgetValues(); setControl(composite); update(); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.JAROPTIONS_WIZARD_PAGE); }
From source file:ext.org.eclipse.jdt.internal.ui.jarpackager.JarPackageWizardPage.java
License:Open Source License
@Override public void createControl(final Composite parent) { initializeDialogUnits(parent);// w w w .j ava 2s .c o m Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); createPlainLabel(composite, JarPackagerMessages.JarPackageWizardPage_whatToExport_label); createInputGroup(composite); createExportTypeGroup(composite); new Label(composite, SWT.NONE); // vertical spacer createPlainLabel(composite, JarPackagerMessages.JarPackageWizardPage_whereToExport_label); createDestinationGroup(composite); createPlainLabel(composite, JarPackagerMessages.JarPackageWizardPage_options_label); createOptionsGroup(composite); restoreResourceSpecificationWidgetValues(); // superclass API defines this hook restoreWidgetValues(); if (fInitialSelection != null) BusyIndicator.showWhile(parent.getDisplay(), new Runnable() { public void run() { setupBasedOnInitialSelections(); } }); setControl(composite); update(); fRefactoringLink.setEnabled(fExportRefactoringsCheckbox.getSelection()); giveFocusToDestination(); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.JARPACKAGER_WIZARD_PAGE); }