Java Code Examples for org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField#createEmptySpace()
The following examples show how to use
org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField#createEmptySpace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NewEntryPointWizardPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private void createMethodStubSelectionControls(Composite composite, int nColumns) { Control labelControl = methodStubsButtons.getLabelControl(composite); LayoutUtil.setHorizontalSpan(labelControl, nColumns); DialogField.createEmptySpace(composite); Control buttonGroup = methodStubsButtons.getSelectionButtonsGroup(composite); LayoutUtil.setHorizontalSpan(buttonGroup, nColumns - 1); }
Example 2
Source File: AbstractNewSarlElementWizardPage.java From sarl with Apache License 2.0 | 5 votes |
/** Create the controls related to the behavior units to generate. * * @param composite the container of the controls. * @param columns the number of columns. * @param enableConstructors indicates if the constructor creation is enable. * @param enableInherited indicates if the inherited operation creation is enable. * @param defaultEvents indicates if the default events will be generated. * @param lifecycleFunctions indicates if the default lifecycle functions will be generated. */ protected void createMethodStubControls(Composite composite, int columns, boolean enableConstructors, boolean enableInherited, boolean defaultEvents, boolean lifecycleFunctions) { this.isConstructorCreationEnabled = enableConstructors; this.isInheritedCreationEnabled = enableInherited; this.isDefaultEventGenerated = defaultEvents; this.isDefaultLifecycleFunctionsGenerated = lifecycleFunctions; final List<String> nameList = new ArrayList<>(4); if (enableConstructors) { nameList.add(Messages.AbstractNewSarlElementWizardPage_0); } if (enableInherited) { nameList.add(Messages.AbstractNewSarlElementWizardPage_1); } if (defaultEvents) { nameList.add(Messages.AbstractNewSarlElementWizardPage_17); } if (lifecycleFunctions) { nameList.add(Messages.AbstractNewSarlElementWizardPage_18); } if (nameList.isEmpty()) { return; } final String[] buttonNames = new String[nameList.size()]; nameList.toArray(buttonNames); this.methodStubsButtons = new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames, 1); this.methodStubsButtons.setLabelText(Messages.AbstractNewSarlElementWizardPage_2); final Control labelControl = this.methodStubsButtons.getLabelControl(composite); LayoutUtil.setHorizontalSpan(labelControl, columns); DialogField.createEmptySpace(composite); final Control buttonGroup = this.methodStubsButtons.getSelectionButtonsGroup(composite); LayoutUtil.setHorizontalSpan(buttonGroup, columns - 1); }
Example 3
Source File: VariableCreationDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); inner.setFont(composite.getFont()); GridLayout layout= new GridLayout(); layout.marginWidth= 0; layout.marginHeight= 0; layout.numColumns= 4; inner.setLayout(layout); int fieldWidthHint= convertWidthInCharsToPixels(50); fNameField.doFillIntoGrid(inner, 2); LayoutUtil.setWidthHint(fNameField.getTextControl(null), fieldWidthHint); LayoutUtil.setHorizontalGrabbing(fNameField.getTextControl(null)); DialogField.createEmptySpace(inner, 2); fPathField.doFillIntoGrid(inner, 3); LayoutUtil.setWidthHint(fPathField.getTextControl(null), fieldWidthHint); BidiUtils.applyBidiProcessing(fPathField.getTextControl(null), StructuredTextTypeHandlerFactory.FILE); fDirButton.doFillIntoGrid(inner, 1); DialogField focusField= (fElement == null) ? fNameField : fPathField; focusField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example 4
Source File: EditVariableEntryDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { initializeDialogUnits(parent); Composite composite= (Composite) super.createDialogArea(parent); GridLayout layout= (GridLayout) composite.getLayout(); layout.numColumns= 3; int widthHint= convertWidthInCharsToPixels(50); GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan= 3; // archive name field fFileNameField.doFillIntoGrid(composite, 4); LayoutUtil.setHorizontalSpan(fFileNameField.getLabelControl(null), 3); LayoutUtil.setWidthHint(fFileNameField.getTextControl(null), widthHint); LayoutUtil.setHorizontalGrabbing(fFileNameField.getTextControl(null)); // label that shows the resolved path for variable jars //DialogField.createEmptySpace(composite, 1); fFullPathResolvedLabel= new CLabel(composite, SWT.LEFT); fFullPathResolvedLabel.setText(getResolvedLabelString()); fFullPathResolvedLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); DialogField.createEmptySpace(composite, 2); fFileNameField.postSetFocusOnDialogField(parent.getDisplay()); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.SOURCE_ATTACHMENT_BLOCK); applyDialogFont(composite); return composite; }
Example 5
Source File: NativeLibrariesConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
public Control createContents(Composite parent) { fShell= parent.getShell(); Composite inner= new Composite(parent, SWT.NONE); inner.setFont(parent.getFont()); inner.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); int nColumns= 3; GridLayout layout= new GridLayout(nColumns, false); layout.marginWidth= 0; layout.marginWidth= 0; inner.setLayout(layout); PixelConverter converter= new PixelConverter(parent); Label desc= new Label(inner, SWT.WRAP); desc.setFont(inner.getFont()); desc.setText(Messages.format(NewWizardMessages.NativeLibrariesDialog_description, new String[] { BasicElementLabels.getResourceName(fEntry.getPath().lastSegment()) })); GridData gridData= new GridData(GridData.FILL, GridData.CENTER, false, false, 3, 1); gridData.widthHint= converter.convertWidthInCharsToPixels(80); desc.setLayoutData(gridData); fPathField.doFillIntoGrid(inner, 2); LayoutUtil.setHorizontalGrabbing(fPathField.getTextControl(null)); LayoutUtil.setWidthHint(fPathField.getTextControl(null), converter.convertWidthInCharsToPixels(50)); fBrowseExternal.doFillIntoGrid(inner, 1); DialogField.createEmptySpace(inner, 2); fBrowseWorkspace.doFillIntoGrid(inner, 1); fPathField.setFocus(); return parent; }
Example 6
Source File: ImportOrganizeInputDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); initializeDialogUnits(parent); GridLayout layout= (GridLayout) composite.getLayout(); layout.numColumns= 2; fNameDialogField.doFillIntoGrid(composite, 3); LayoutUtil.setHorizontalSpan(fNameDialogField.getLabelControl(null), 2); int fieldWidthHint= convertWidthInCharsToPixels(60); Text text= fNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, fieldWidthHint); LayoutUtil.setHorizontalGrabbing(text); BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA); TextFieldNavigationHandler.install(text); DialogField.createEmptySpace(composite, 1); fBrowseTypeButton.doFillIntoGrid(composite, 1); fNameDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example 7
Source File: CodeAssistFavoritesConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); initializeDialogUnits(parent); GridLayout layout= (GridLayout) composite.getLayout(); layout.numColumns= 2; fNameDialogField.doFillIntoGrid(composite, 3); fNameDialogField.getChangeControl(null).setVisible(!fIsEditingMember); LayoutUtil.setHorizontalSpan(fNameDialogField.getLabelControl(null), 2); int fieldWidthHint= convertWidthInCharsToPixels(60); Text text= fNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, fieldWidthHint); LayoutUtil.setHorizontalGrabbing(text); LayoutUtil.setHorizontalSpan(text, fIsEditingMember ? 2 : 1); BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA); TextFieldNavigationHandler.install(text); DialogField.createEmptySpace(composite, 1); fNameDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example 8
Source File: ExpandWithConstructorsConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite)super.createDialogArea(parent); initializeDialogUnits(composite); GridLayout layout= (GridLayout)composite.getLayout(); layout.numColumns= 2; fNameDialogField.doFillIntoGrid(composite, 3); fNameDialogField.getChangeControl(null).setVisible(!fIsEditingMember); LayoutUtil.setHorizontalSpan(fNameDialogField.getLabelControl(null), 2); int fieldWidthHint= convertWidthInCharsToPixels(60); Text text= fNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, fieldWidthHint); LayoutUtil.setHorizontalGrabbing(text); LayoutUtil.setHorizontalSpan(text, fIsEditingMember ? 2 : 1); TextFieldNavigationHandler.install(text); DialogField.createEmptySpace(composite, 1); fNameDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example 9
Source File: NewTypeWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Creates the controls for the type name field. Expects a <code>GridLayout</code> with at * least 2 columns. * * @param composite the parent composite * @param nColumns number of columns to span */ protected void createTypeNameControls(Composite composite, int nColumns) { fTypeNameDialogField.doFillIntoGrid(composite, nColumns - 1); DialogField.createEmptySpace(composite); Text text= fTypeNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, getMaxFieldWidth()); TextFieldNavigationHandler.install(text); text.addVerifyListener(new VerifyListener() { public void verifyText(VerifyEvent e) { if (fCanModifyPackage && ! fEnclosingTypeSelection.isSelected() && e.start == 0 && e.end == ((Text) e.widget).getCharCount()) { String typeNameWithoutParameters= getTypeNameWithoutParameters(e.text); int lastDot= typeNameWithoutParameters.lastIndexOf('.'); if (lastDot == -1 || lastDot == typeNameWithoutParameters.length() - 1) return; String pack= typeNameWithoutParameters.substring(0, lastDot); if (validatePackageName(pack, null).getSeverity() == IStatus.ERROR) return; fPackageDialogField.setText(pack); e.text= e.text.substring(lastDot + 1); } } }); }
Example 10
Source File: NewPackageWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void createPackageControls(Composite composite, int nColumns) { fPackageDialogField.doFillIntoGrid(composite, nColumns - 1); Text text= fPackageDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, getMaxFieldWidth()); LayoutUtil.setHorizontalGrabbing(text); DialogField.createEmptySpace(composite); TextFieldNavigationHandler.install(text); fCreatePackageInfoJavaDialogField.doFillIntoGrid(composite, nColumns); BidiUtils.applyBidiProcessing(fPackageDialogField.getTextControl(null), StructuredTextTypeHandlerFactory.JAVA); }
Example 11
Source File: NewClassWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void createMethodStubSelectionControls(Composite composite, int nColumns) { Control labelControl= fMethodStubsButtons.getLabelControl(composite); LayoutUtil.setHorizontalSpan(labelControl, nColumns); DialogField.createEmptySpace(composite); Control buttonGroup= fMethodStubsButtons.getSelectionButtonsGroup(composite); LayoutUtil.setHorizontalSpan(buttonGroup, nColumns - 1); }
Example 12
Source File: NewHostPageWizardPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private void createPageElementsControls(Composite composite, int nColumns) { Control labelControl = hostPageElementsButtons.getLabelControl(composite); LayoutUtil.setHorizontalSpan(labelControl, nColumns); DialogField.createEmptySpace(composite); Control buttonGroup = hostPageElementsButtons.getSelectionButtonsGroup(composite); LayoutUtil.setHorizontalSpan(buttonGroup, nColumns - 1); }
Example 13
Source File: NewHostPageWizardPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private void createFileNameControls(Composite composite, int columns) { fileNameField.doFillIntoGrid(composite, columns - 1); DialogField.createEmptySpace(composite); setFieldWidthHint(fileNameField); Text text = fileNameField.getTextControl(null); LayoutUtil.setHorizontalGrabbing(text); }
Example 14
Source File: NewUiBinderWizardPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private void createSampleContentControls(Composite composite, int columns) { Label label = new Label(composite, SWT.NONE); label.setText("Do you want to add sample content?"); label.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, columns, 1)); DialogField.createEmptySpace(composite); addSampleContentButton.doFillIntoGrid(composite, columns - 1); }
Example 15
Source File: NewModuleWizardPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
protected void createModuleNameControls(Composite composite, int nColumns) { moduleNameField.doFillIntoGrid(composite, nColumns - 1); DialogField.createEmptySpace(composite); Text moduleNameText = moduleNameField.getTextControl(null); LayoutUtil.setWidthHint(moduleNameText, getMaxFieldWidth()); LayoutUtil.setHorizontalGrabbing(moduleNameText); }
Example 16
Source File: NewXtendClassWizardPage.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
private void createMethodStubSelectionControls(Composite composite, int nColumns) { Control labelControl= fMethodStubsButtons.getLabelControl(composite); LayoutUtil.setHorizontalSpan(labelControl, nColumns); DialogField.createEmptySpace(composite); Control buttonGroup= fMethodStubsButtons.getSelectionButtonsGroup(composite); LayoutUtil.setHorizontalSpan(buttonGroup, nColumns - 1); }
Example 17
Source File: JavadocConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public Control createContents(Composite parent) { fShell= parent.getShell(); PixelConverter converter= new PixelConverter(parent); Composite topComp= new Composite(parent, SWT.NONE); GridLayout topLayout= new GridLayout(); topLayout.numColumns= 3; topLayout.marginWidth= 0; topLayout.marginHeight= 0; topComp.setLayout(topLayout); // Add the first radio button for the path if (!fIsForSource) { fURLRadioButton.doFillIntoGrid(topComp, 3); } fURLField.doFillIntoGrid(topComp, 2); LayoutUtil.setWidthHint(fURLField.getTextControl(null), converter.convertWidthInCharsToPixels(43)); LayoutUtil.setHorizontalGrabbing(fURLField.getTextControl(null)); BidiUtils.applyBidiProcessing(fURLField.getTextControl(null), StructuredTextTypeHandlerFactory.URL); fBrowseFolder.doFillIntoGrid(topComp, 1); DialogField.createEmptySpace(topComp, 2); fValidateURLButton.doFillIntoGrid(topComp, 1); //DialogField.createEmptySpace(topComp, 3); if (!fIsForSource) { // Add the second radio button for the jar/zip fArchiveRadioButton.doFillIntoGrid(topComp, 3); // external - workspace selection DialogField.createEmptySpace(topComp, 1); Composite radioComposite= new Composite(topComp, SWT.NONE); radioComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false)); GridLayout layout= new GridLayout(2, true); layout.marginHeight= 0; layout.marginWidth= 0; radioComposite.setLayout(layout); fExternalRadio.doFillIntoGrid(radioComposite, 1); fWorkspaceRadio.doFillIntoGrid(radioComposite, 1); DialogField.createEmptySpace(topComp, 1); // Add the jar/zip field fArchiveField.doFillIntoGrid(topComp, 2); LayoutUtil.setWidthHint(fArchiveField.getTextControl(null), converter.convertWidthInCharsToPixels(43)); LayoutUtil.setHorizontalGrabbing(fArchiveField.getTextControl(null)); BidiUtils.applyBidiProcessing(fArchiveField.getTextControl(null), StructuredTextTypeHandlerFactory.FILE); fBrowseArchive.doFillIntoGrid(topComp, 1); // Add the path chooser for the jar/zip fArchivePathField.doFillIntoGrid(topComp, 2); LayoutUtil.setWidthHint(fArchivePathField.getTextControl(null), converter.convertWidthInCharsToPixels(43)); LayoutUtil.setHorizontalGrabbing(fArchivePathField.getTextControl(null)); BidiUtils.applyBidiProcessing(fArchivePathField.getTextControl(null), StructuredTextTypeHandlerFactory.FILE); fBrowseArchivePath.doFillIntoGrid(topComp, 1); DialogField.createEmptySpace(topComp, 2); fValidateArchiveButton.doFillIntoGrid(topComp, 1); LayoutUtil.setHorizontalIndent(fArchiveField.getLabelControl(null)); LayoutUtil.setHorizontalIndent(fArchivePathField.getLabelControl(null)); LayoutUtil.setHorizontalIndent(fURLField.getLabelControl(null)); fURLRadioButton.attachDialogFields(new DialogField[] {fURLField, fBrowseFolder, fValidateURLButton }); fArchiveRadioButton.attachDialogFields(new DialogField[] {fArchiveField, fBrowseArchive, fExternalRadio, fWorkspaceRadio, fArchivePathField, fBrowseArchivePath, fValidateArchiveButton }); } return topComp; }
Example 18
Source File: NewTypeWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 3 votes |
/** * Creates the controls for the preference page links. Expects a <code>GridLayout</code> with * at least 3 columns. * * @param composite the parent composite * @param nColumns number of columns to span * * @since 3.1 */ protected void createCommentControls(Composite composite, int nColumns) { Link link= new Link(composite, SWT.NONE); link.setText(NewWizardMessages.NewTypeWizardPage_addcomment_description); link.addSelectionListener(new TypeFieldsAdapter()); link.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, nColumns, 1)); DialogField.createEmptySpace(composite); fAddCommentButton.doFillIntoGrid(composite, nColumns - 1); }