List of usage examples for org.eclipse.jface.dialogs Dialog applyDialogFont
public static void applyDialogFont(Control control)
From source file:com.googlecode.osde.internal.ui.wizards.newrestprj.WizardNewRestfulAccessProjectPage.java
License:Apache License
public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;//from w w w . j ava 2s. co m composite.setLayout(layout); // Label label = new Label(composite, SWT.NONE); label.setText("Source folder name:"); sourceDirectoryNameText = new Text(composite, SWT.BORDER); sourceDirectoryNameText.setText("src"); sourceDirectoryNameText.addModifyListener(listener); GridData layoutData = new GridData(GridData.FILL_HORIZONTAL); sourceDirectoryNameText.setLayoutData(layoutData); // label = new Label(composite, SWT.NONE); label.setText("Output folder name:"); binaryDirectoryNameText = new Text(composite, SWT.BORDER); binaryDirectoryNameText.setText("bin"); binaryDirectoryNameText.addModifyListener(listener); layoutData = new GridData(GridData.FILL_HORIZONTAL); binaryDirectoryNameText.setLayoutData(layoutData); // label = new Label(composite, SWT.NONE); label.setText("Library folder name:"); libraryDirectoryNameText = new Text(composite, SWT.BORDER); libraryDirectoryNameText.setText("lib"); libraryDirectoryNameText.addModifyListener(listener); layoutData = new GridData(GridData.FILL_HORIZONTAL); libraryDirectoryNameText.setLayoutData(layoutData); // setPageComplete(validatePage()); setErrorMessage(null); setMessage(null); setControl(composite); Dialog.applyDialogFont(composite); }
From source file:com.gorillalogic.monkeyconsole.tableview.editors.ArgumentEditorDialog.java
License:Open Source License
@Override protected Control createContents(Composite parent) { Composite contents = new Composite(parent, SWT.NONE); contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); this.createButtonBar(parent); Composite argsHolder = new Composite(contents, SWT.NONE); FillLayout fillLayout = new FillLayout(); fillLayout.type = SWT.VERTICAL;// www . ja v a 2 s . co m argsHolder.setLayout(fillLayout); editors = new HashMap<String, Text>(); for (String name : args.keySet()) { Composite c = new Composite(argsHolder, SWT.NONE); RowLayout rl = new RowLayout(); c.setLayout(rl); Label l = new Label(c, SWT.LEFT); l.setText(name + ":"); l.setLayoutData(new RowData(125, 20)); Text input = new Text(c, SWT.BORDER); input.setText(args.get(name)); input.setLayoutData(new RowData(200, 20)); editors.put(name, input); } Dialog.applyDialogFont(parent); Point defaultMargins = LayoutConstants.getMargins(); GridLayoutFactory.fillDefaults().numColumns(2).margins(defaultMargins.x, defaultMargins.y) .generateLayout(contents); return contents; }
From source file:com.gwtplatform.plugin.wizard.NewActionWizardPage.java
License:Apache License
@Override public void createControl(Composite parent) { initializeDialogUnits(parent);//w w w .j av 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); // createEnclosingTypeControls(composite, nColumns); createSeparator(composite, nColumns); createTypeNameControls(composite, nColumns); createActionSuperclassControls(composite, nColumns); createActionFieldsControls(composite, nColumns); createResultFieldsControls(composite, nColumns); createActionHandlerControls(composite, nColumns); createActionValidatorControls(composite, nColumns); createHanderModuleControls(composite, nColumns); setControl(composite); setFocus(); setDefaultValues(); Dialog.applyDialogFont(composite); }
From source file:com.gwtplatform.plugin.wizard.NewEventWizardPage.java
License:Apache License
@Override public void createControl(Composite parent) { initializeDialogUnits(parent);/*from w ww . ja v a 2s.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); // createEnclosingTypeControls(composite, nColumns); createSeparator(composite, nColumns); createTypeNameControls(composite, nColumns); createFieldsControls(composite, nColumns); createGenerateControls(composite, nColumns); setControl(composite); setFocus(); Dialog.applyDialogFont(composite); }
From source file:com.gwtplatform.plugin.wizard.NewModelWizardPage.java
License:Apache License
@Override public void createControl(Composite parent) { initializeDialogUnits(parent);//from ww w .jav a 2s .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); // createEnclosingTypeControls(composite, nColumns); createSeparator(composite, nColumns); createTypeNameControls(composite, nColumns); createFieldsControls(composite, nColumns); // createGenerateControls(composite, nColumns); setControl(composite); setFocus(); Dialog.applyDialogFont(composite); }
From source file:com.gwtplatform.plugin.wizard.NewPresenterWizardPage.java
License:Apache License
@Override public void createControl(Composite parent) { initializeDialogUnits(parent);//from w w w. j a v a 2s . co 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); // createEnclosingTypeControls(composite, nColumns); createSeparator(composite, nColumns); createTypeNameControls(composite, nColumns); createUITypeControls(composite, nColumns); createWidgetControls(composite, nColumns); createRevealInParentControls(composite, nColumns); createPlaceControls(composite, nColumns); createMethodStubsControls(composite, nColumns); createGinControls(composite, nColumns); setControl(composite); setFocus(); setDefaultValues(); Dialog.applyDialogFont(composite); }
From source file:com.ibm.team.rtc.extensions.workitem.copy.internal.ConfigurationPage.java
License:Open Source License
public void createControl(Composite parent) { initializeDialogUnits(parent);//from w w w .j av a 2 s . co m Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; layout.numColumns = 2; container.setLayout(layout); Label label = new Label(container, SWT.NONE); label.setText("Replacement Text:"); final Text text = new Text(container, SWT.BORDER); //$NON-NLS-1$ GridData data = new GridData(SWT.FILL, SWT.TOP, true, false); text.setLayoutData(data); text.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { fContext.configuration.replacementText = text.getText(); } }); label = new Label(container, SWT.NONE); label.setText("Default Category:"); final Text categoryText = new Text(container, SWT.BORDER); //$NON-NLS-1$ data = new GridData(SWT.FILL, SWT.TOP, true, false); categoryText.setLayoutData(data); categoryText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { fContext.configuration.categoryPath = categoryText.getText(); } }); label = new Label(container, SWT.NONE); label.setText("Tags:"); final Text tagsText = new Text(container, SWT.BORDER); //$NON-NLS-1$ data = new GridData(SWT.FILL, SWT.TOP, true, false); tagsText.setLayoutData(data); tagsText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { fContext.configuration.tags = tagsText.getText(); } }); label = new Label(container, SWT.NONE); label.setText("Copy Attachments:"); final Button copyAttachmentsButton = new Button(container, SWT.CHECK); //$NON-NLS-1$ copyAttachmentsButton.setSelection(fContext.configuration.copyAttachments); data = new GridData(SWT.FILL, SWT.TOP, true, false); copyAttachmentsButton.setLayoutData(data); copyAttachmentsButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { fContext.configuration.copyAttachments = copyAttachmentsButton.getSelection(); } @Override public void widgetDefaultSelected(SelectionEvent e) { } }); label = new Label(container, SWT.NONE); label.setText("Copy Links:"); final Button copyLinksButton = new Button(container, SWT.CHECK); //$NON-NLS-1$ copyLinksButton.setSelection(fContext.configuration.copyLinks); data = new GridData(SWT.FILL, SWT.TOP, true, false); copyLinksButton.setLayoutData(data); copyLinksButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { fContext.configuration.copyLinks = copyLinksButton.getSelection(); } @Override public void widgetDefaultSelected(SelectionEvent e) { } }); label = new Label(container, SWT.NONE); label.setText("Copy Rank:"); final Button copyRankButton = new Button(container, SWT.CHECK); //$NON-NLS-1$ copyRankButton.setSelection(fContext.configuration.copyRankingValue); data = new GridData(SWT.FILL, SWT.TOP, true, false); copyRankButton.setLayoutData(data); copyRankButton.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { fContext.configuration.copyRankingValue = copyRankButton.getSelection(); } @Override public void widgetDefaultSelected(SelectionEvent e) { } }); setControl(container); Dialog.applyDialogFont(container); }
From source file:com.ibm.team.rtc.extensions.workitem.copy.internal.ProjectAreaSelectionPage.java
License:Open Source License
public void createControl(Composite parent) { initializeDialogUnits(parent);/* w w w .j a v a 2 s . c o m*/ Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; container.setLayout(layout); List<ITeamRepository> repos = getRepositories(); if (repos.isEmpty()) { Label label = new Label(container, SWT.NONE); label.setText("No repositories available"); } fComboViewer = createRepositoryPart(container, repos); Label label = new Label(container, SWT.NONE); label.setText("Project Areas"); fViewer = new TableViewer(container, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); fViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fViewer.setContentProvider(new SimpleContentProvider()); fViewer.setSorter(new ViewerSorter()); fViewer.setComparer(new ItemComparer()); fComboViewer.setSelection(new StructuredSelection(repos.get(0))); setControl(container); Dialog.applyDialogFont(container); }
From source file:com.iw.plugins.spindle.ui.preferences.WizardTemplatesPreferencePage.java
License:Mozilla Public License
protected void contributeButtons(Composite parent) { Font font = parent.getFont(); GridLayout layout = (GridLayout) parent.getLayout(); layout.numColumns += 2;//from w w w . ja v a2 s. co m int heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT); int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); fImport = new Button(parent, SWT.PUSH); fImport.setText("Import"); Dialog.applyDialogFont(fImport); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.heightHint = heightHint; data.widthHint = Math.max(widthHint, fImport.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); fImport.setLayoutData(data); fImport.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { performImport(); } }); fExport = new Button(parent, SWT.PUSH); fExport.setText("Export"); Dialog.applyDialogFont(fImport); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.heightHint = heightHint; data.widthHint = Math.max(widthHint, fExport.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); fExport.setLayoutData(data); fExport.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { performExport(); } }); }
From source file:com.iw.plugins.spindle.ui.properties.ProjectTemplatesPropertyPage.java
License:Mozilla Public License
protected void contributeButtons(Composite parent) { Font font = parent.getFont(); GridLayout layout = (GridLayout) parent.getLayout(); layout.numColumns += 3;//from w w w . j a v a 2 s . c o m int heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT); int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); fImport = new Button(parent, SWT.PUSH); fImport.setText("Import"); Dialog.applyDialogFont(fImport); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.heightHint = heightHint; data.widthHint = Math.max(widthHint, fImport.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); fImport.setLayoutData(data); fImport.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { performImport(); } }); fExport = new Button(parent, SWT.PUSH); fExport.setText("Export"); Dialog.applyDialogFont(fImport); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.heightHint = heightHint; data.widthHint = Math.max(widthHint, fExport.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); fExport.setLayoutData(data); fExport.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { performExport(); } }); fExportProject = new Button(parent, SWT.PUSH); fExportProject.setText("Export to Project"); Dialog.applyDialogFont(fImport); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.heightHint = heightHint; data.widthHint = Math.max(widthHint, fExportProject.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); fExportProject.setLayoutData(data); fExportProject.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { performProjectExport(); } }); }