List of usage examples for org.eclipse.jface.dialogs Dialog applyDialogFont
public static void applyDialogFont(Control control)
From source file:com.iw.plugins.spindle.ui.widgets.ContainerSelectionGroup.java
License:Open Source License
/** * Creates the contents of the composite. * //from ww w. j a v a 2 s . c o m * @param heightHint height hint for the drill down composite */ public void createContents(String message, int heightHint) { GridLayout layout = new GridLayout(); layout.marginWidth = 0; setLayout(layout); setLayoutData(new GridData(GridData.FILL_BOTH)); Label label = new Label(this, SWT.WRAP); label.setText(message); label.setFont(this.getFont()); if (allowNewContainerName) { containerNameField = new Text(this, SWT.SINGLE | SWT.BORDER); containerNameField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); containerNameField.addListener(SWT.Modify, listener); containerNameField.setFont(this.getFont()); } else { // filler... new Label(this, SWT.NONE); } createTreeViewer(heightHint); Dialog.applyDialogFont(this); }
From source file:com.iw.plugins.spindle.ui.wizards.TypeChooseWizardPage.java
License:Mozilla Public License
public void createControl(Composite parent) { initializeDialogUnits(parent);// w ww . j av a 2 s . c om Composite composite = new Composite(parent, SWT.NONE); int nColumns = 4; GridLayout layout = new GridLayout(); layout.numColumns = nColumns; composite.setLayout(layout); createClassChoserControls(composite, nColumns); createJavaControls(composite, nColumns); setControl(composite); Dialog.applyDialogFont(composite); fChooseClass.setCheckBoxValue(true); fNewClass.setCheckBoxValue(false); setJavaControlsEnabled(false); fChooseClass.addListener(fListener); fChooseSpecClassDialogField.addListener(fListener); fNewClass.addListener(fListener); restorePageSettings(); }
From source file:com.jayway.eclipse.adt.extensions.ui.wizards.NewActivityWizardPage.java
License:Apache License
public void createControl(Composite parent) { initializeDialogUnits(parent);//from ww w . jav a 2 s. c o m Composite composite = new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); int nColumns = 4; GridLayout layout = new GridLayout(); layout.numColumns = nColumns; composite.setLayout(layout); // pick & choose the wanted UI components createContainerControls(composite, nColumns); createPackageControls(composite, nColumns); createSeparator(composite, nColumns); createTypeNameControls(composite, nColumns); createSuperClassControls(composite, nColumns); setSuperClass("android.app.Activity", true); createSuperInterfacesControls(composite, nColumns); createMethodStubSelectionControls(composite, nColumns); // createCommentControls(composite, nColumns); setAddComments(true, false); enableCommentControl(true); setControl(composite); Dialog.applyDialogFont(composite); IntentReflectionHelper helper = new IntentReflectionHelper(javaProject); createIntentActionsControl(composite, nColumns, helper.getActions()); createIntentCategoriesControl(composite, nColumns, helper.getCategories()); }
From source file:com.jcraft.eclipse.jcterm.internal.OpenConnectionDialog.java
License:Open Source License
/** * @see Dialog#createDialogArea/* w w w . j a v a2 s. co m*/ */ protected Control createDialogArea(Composite parent) { Composite top = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; top.setLayout(layout); top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite imageComposite = new Composite(top, SWT.NONE); layout = new GridLayout(); imageComposite.setLayout(layout); imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL)); Composite main = new Composite(top, SWT.NONE); layout = new GridLayout(); layout.numColumns = 3; main.setLayout(layout); main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label imageLabel = new Label(imageComposite, SWT.NONE); keyLockImage = JCTermPlugin.getImageDescriptor(IUIConstants.IMG_TERMINAL32).createImage(); imageLabel.setImage(keyLockImage); GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); imageLabel.setLayoutData(data); /* * if(message!=null){ Label messageLabel=new Label(main, SWT.WRAP); * messageLabel.setText(message); data=new * GridData(GridData.FILL_HORIZONTAL|GridData.GRAB_HORIZONTAL); * data.horizontalSpan=3; data.widthHint=300; * messageLabel.setLayoutData(data); } */ if (instruction != null && instruction.length() > 0) { Label label = new Label(main, SWT.WRAP); label.setText(instruction); data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); data.horizontalSpan = 3; data.widthHint = 300; label.setLayoutData(data); } createFields(main); Dialog.applyDialogFont(parent); return main; }
From source file:com.jetbrains.mylyn.yt.ui.YouTrackRepositoryQueryPage.java
License:Open Source License
public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(composite); GridLayout layout = new GridLayout(2, false); if (inSearchContainer()) { layout.marginWidth = 0;//from w ww .ja va 2s . c o m layout.marginHeight = 0; } composite.setLayout(layout); innerComposite = new SectionComposite(composite, SWT.NONE); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(2, 1) .applyTo(innerComposite); createPageContent(innerComposite); createButtonGroup(composite); if (!needsRefresh) { setDescription(Messages.AbstractRepositoryQueryPage2_Create_a_Query_Page_Description); } Dialog.applyDialogFont(composite); setControl(composite); }
From source file:com.liferay.ide.project.ui.dialog.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);//from w ww . jav a2s .co m createMessageArea(composite); fTableViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER); fTableViewer.addPostSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { updateOKButtonState(event); } }); addSelectionButtons(composite); 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(getContentProvider()); fTableViewer.setComparator(new JavaElementComparator()); fTableViewer.getControl().setFont(font); updateFilter(true); IJavaModel input = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()); fTableViewer.setInput(input); fTableViewer.setAllChecked(true); doSelectionChanged(new Object[0]); Dialog.applyDialogFont(composite); return composite; }
From source file:com.liferay.ide.project.ui.wizard.SDKProjectsImportWizardPage.java
License:Open Source License
/** * Create the selection buttons in the listComposite. * /*from w ww . j a v a2s .c o m*/ * @param listComposite */ protected void createSelectionButtons(Composite listComposite) { Composite buttonsComposite = new Composite(listComposite, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; buttonsComposite.setLayout(layout); buttonsComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); Button selectAll = new Button(buttonsComposite, SWT.PUSH); selectAll.setText(Msgs.selectAll); selectAll.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleSelectAll(e); } }); Dialog.applyDialogFont(selectAll); setButtonLayoutData(selectAll); Button deselectAll = new Button(buttonsComposite, SWT.PUSH); deselectAll.setText(Msgs.deselectAll); deselectAll.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleDeselectAll(e); } }); Dialog.applyDialogFont(deselectAll); setButtonLayoutData(deselectAll); Button refresh = new Button(buttonsComposite, SWT.PUSH); refresh.setText(Msgs.refresh); refresh.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleRefresh(e); } }); Dialog.applyDialogFont(refresh); setButtonLayoutData(refresh); }
From source file:com.liferay.ide.server.tomcat.ui.wizard.LiferayTomcatRuntimeComposite.java
License:Open Source License
@Override protected void createControl() { setLayout(createLayout());//from w ww.j a v a 2s . c o m setLayoutData(new GridData(GridData.FILL_BOTH)); createFields(); // initially disabled until user selects an installation directory enableJREControls(false); init(); validate(); Dialog.applyDialogFont(this); }
From source file:com.liferay.ide.server.tomcat.ui.wizard.LiferayTomcatRuntimeOptionalComposite.java
License:Open Source License
@Override protected void createControl() { setLayout(createLayout());/*from w w w. j ava 2s .c om*/ setLayoutData(new GridData(GridData.FILL_BOTH)); this.javadocField = createJavadocField(this); this.javadocField.addModifyListener(this); this.sourceField = createSourceField(this); this.sourceField.addModifyListener(this); init(); validate(); Dialog.applyDialogFont(this); }
From source file:com.liferay.ide.server.ui.portal.PortalRuntimeComposite.java
License:Open Source License
protected void createControl(final Composite parent) { setLayout(createLayout());/*from w w w.java2 s .c o m*/ setLayoutData(createLayoutData()); setBackground(parent.getBackground()); createFields(); enableJREControls(false); Dialog.applyDialogFont(this); }