org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil Java Examples
The following examples show how to use
org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil.
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: SetFilterWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public void createControl(Composite parent) { Composite inner= new Composite(parent, SWT.NONE); inner.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; inner.setLayout(layout); inner.setLayoutData(new GridData(GridData.FILL_BOTH)); fInclusionPatternList.doFillIntoGrid(inner, 3); LayoutUtil.setHorizontalSpan(fInclusionPatternList.getLabelControl(null), 2); LayoutUtil.setHorizontalGrabbing(fInclusionPatternList.getListControl(null)); fExclusionPatternList.doFillIntoGrid(inner, 3); LayoutUtil.setHorizontalSpan(fExclusionPatternList.getLabelControl(null), 2); LayoutUtil.setHorizontalGrabbing(fExclusionPatternList.getListControl(null)); setControl(inner); Dialog.applyDialogFont(inner); PlatformUI.getWorkbench().getHelpSystem().setHelp(inner, IJavaHelpContextIds.INCLUSION_EXCLUSION_WIZARD_PAGE); }
Example #2
Source File: JavaMethodFilterInputDialog.java From jdt-codemining with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); LayoutUtil.doDefaultLayout(inner, new DialogField[] { fNameDialogField }, true, 0, 0); int fieldWidthHint= convertWidthInCharsToPixels(60); Text text= fNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, fieldWidthHint); LayoutUtil.setHorizontalGrabbing(text); //BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA); TextFieldNavigationHandler.install(text); fNameDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example #3
Source File: PackageFragmentSelection.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public Control[] doFillIntoGrid(Composite parent, int nColumns, int textWidth) { Control[] res= super.doFillIntoGrid(parent, nColumns); final Text text= getTextControl(null); text.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { updateListener(); } }); LayoutUtil.setWidthHint(text, textWidth); LayoutUtil.setHorizontalGrabbing(text); ControlContentAssistHelper.createTextContentAssistant(text, fCurrPackageCompletionProcessor); TextFieldNavigationHandler.install(text); return res; }
Example #4
Source File: NewJavaProjectWizardPageOne.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public Control createContent(Composite composite) { fGroup= new Group(composite, SWT.NONE); fGroup.setFont(composite.getFont()); fGroup.setLayout(initGridLayout(new GridLayout(3, false), true)); fGroup.setText(NewWizardMessages.NewJavaProjectWizardPageOne_LayoutGroup_title); fStdRadio.doFillIntoGrid(fGroup, 3); LayoutUtil.setHorizontalGrabbing(fStdRadio.getSelectionButton(null)); fSrcBinRadio.doFillIntoGrid(fGroup, 2); fPreferenceLink= new Link(fGroup, SWT.NONE); fPreferenceLink.setText(NewWizardMessages.NewJavaProjectWizardPageOne_LayoutGroup_link_description); fPreferenceLink.setLayoutData(new GridData(GridData.END, GridData.END, false, false)); fPreferenceLink.addSelectionListener(this); updateEnableState(); return fGroup; }
Example #5
Source File: NewTypeWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
/** * Creates the controls for the superclass name field. Expects a <code>GridLayout</code> * with at least 3 columns. * * @param composite the parent composite * @param nColumns number of columns to span */ protected void createSuperClassControls(Composite composite, int nColumns) { fSuperClassDialogField.doFillIntoGrid(composite, nColumns); Text text= fSuperClassDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, getMaxFieldWidth()); BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA); JavaTypeCompletionProcessor superClassCompletionProcessor= new JavaTypeCompletionProcessor(false, false, true); superClassCompletionProcessor.setCompletionContextRequestor(new CompletionContextRequestor() { @Override public StubTypeContext getStubTypeContext() { return getSuperClassStubTypeContext(); } }); ControlContentAssistHelper.createTextContentAssistant(text, superClassCompletionProcessor); TextFieldNavigationHandler.install(text); }
Example #6
Source File: HistoryListAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { initializeDialogUnits(parent); Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); inner.setLayoutData(new GridData(GridData.FILL_BOTH)); inner.setFont(composite.getFont()); LayoutUtil.doDefaultLayout(inner, new DialogField[] { fHistoryList }, true, 0, 0); LayoutUtil.setHeightHint(fHistoryList.getListControl(null), convertHeightInCharsToPixels(12)); LayoutUtil.setHorizontalGrabbing(fHistoryList.getListControl(null)); applyDialogFont(composite); return composite; }
Example #7
Source File: JavadocStandardWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private void createListDialogField(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setFont(composite.getFont()); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; String[] buttonlabels= new String[] { JavadocExportMessages.JavadocStandardWizardPage_selectallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_clearallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_configurebutton_label}; JavadocLinkDialogLabelProvider labelProvider= new JavadocLinkDialogLabelProvider(); ListAdapter adapter= new ListAdapter(); fListDialogField= new CheckedListDialogField<JavadocLinkRef>(adapter, buttonlabels, labelProvider); fListDialogField.setDialogFieldListener(adapter); fListDialogField.setCheckAllButtonIndex(0); fListDialogField.setUncheckAllButtonIndex(1); fListDialogField.setViewerComparator(new ViewerComparator()); createLabel(c, SWT.NONE, JavadocExportMessages.JavadocStandardWizardPage_referencedclasses_label, createGridData(GridData.HORIZONTAL_ALIGN_BEGINNING, 4, 0)); fListDialogField.doFillIntoGrid(c, 3); LayoutUtil.setHorizontalGrabbing(fListDialogField.getListControl(null)); fListDialogField.enableButton(2, false); }
Example #8
Source File: HistoryListAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { initializeDialogUnits(parent); Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); inner.setFont(parent.getFont()); inner.setLayoutData(new GridData(GridData.FILL_BOTH)); LayoutUtil.doDefaultLayout(inner, new DialogField[] { fHistoryList }, true, 0, 0); LayoutUtil.setHeightHint(fHistoryList.getListControl(null), convertHeightInCharsToPixels(12)); LayoutUtil.setHorizontalGrabbing(fHistoryList.getListControl(null)); applyDialogFont(composite); return composite; }
Example #9
Source File: HistoryListAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { initializeDialogUnits(parent); Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); inner.setLayoutData(new GridData(GridData.FILL_BOTH)); inner.setFont(composite.getFont()); LayoutUtil.doDefaultLayout(inner, new DialogField[] { fHistoryList, new Separator() }, true); LayoutUtil.setHeightHint(fHistoryList.getListControl(null), convertHeightInCharsToPixels(12)); LayoutUtil.setHorizontalGrabbing(fHistoryList.getListControl(null)); Composite additionalControls= new Composite(inner, SWT.NONE); additionalControls.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); LayoutUtil.doDefaultLayout(additionalControls, new DialogField[] { fMaxEntriesField }, false); LayoutUtil.setHorizontalGrabbing(fMaxEntriesField.getTextControl(null)); applyDialogFont(composite); return composite; }
Example #10
Source File: TypeFilterInputDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); LayoutUtil.doDefaultLayout(inner, new DialogField[] { fNameDialogField }, true, 0, 0); int fieldWidthHint= convertWidthInCharsToPixels(60); Text text= fNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, fieldWidthHint); LayoutUtil.setHorizontalGrabbing(text); BidiUtils.applyBidiProcessing(text, StructuredTextTypeHandlerFactory.JAVA); TextFieldNavigationHandler.install(text); fNameDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example #11
Source File: CodeAssistFavoritesConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private void createFavoriteList(Composite parent) { String[] buttonLabels= new String[] { PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_newType_button, PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_newMember_button, PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_edit_button, PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_remove_button }; ListAdapter adapter= new ListAdapter(); fList= new ListDialogField<String>(adapter, buttonLabels, new ListLabelProvider()); fList.setDialogFieldListener(adapter); fList.setLabelText(PreferencesMessages.CodeAssistStaticMembersConfigurationBlock_description); fList.setRemoveButtonIndex(IDX_REMOVE); fList.enableButton(IDX_EDIT, false); fList.setViewerComparator(new ViewerComparator()); PixelConverter pixelConverter= new PixelConverter(parent); fList.doFillIntoGrid(parent, 3); LayoutUtil.setHorizontalSpan(fList.getLabelControl(null), 2); LayoutUtil.setWidthHint(fList.getLabelControl(null), pixelConverter.convertWidthInCharsToPixels(60)); LayoutUtil.setHorizontalGrabbing(fList.getListControl(null)); }
Example #12
Source File: UserLibraryPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); DialogField[] fields; if (isSave()) { fields= new DialogField[] { fExportImportList, fLocationField }; } else { fields= new DialogField[] { fLocationField, fExportImportList }; } LayoutUtil.doDefaultLayout(composite, fields, true, SWT.DEFAULT, SWT.DEFAULT); fExportImportList.getListControl(null).setLayoutData(new GridData(GridData.FILL_BOTH)); fLocationField.postSetFocusOnDialogField(parent.getDisplay()); BidiUtils.applyBidiProcessing(fLocationField.getTextControl(parent), StructuredTextTypeHandlerFactory.FILE); Dialog.applyDialogFont(composite); if (isSave()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.CP_EXPORT_USER_LIBRARY); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.CP_IMPORT_USER_LIBRARY); } return composite; }
Example #13
Source File: CodeTemplateBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createContents(Composite parent) { fPixelConverter= new PixelConverter(parent); setShell(parent.getShell()); Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; composite.setLayout(layout); fCodeTemplateTree.doFillIntoGrid(composite, 3); LayoutUtil.setHorizontalSpan(fCodeTemplateTree.getLabelControl(null), 2); LayoutUtil.setHorizontalGrabbing(fCodeTemplateTree.getTreeControl(null)); fPatternViewer= createViewer(composite, 2); fGenerateComments.doFillIntoGrid(composite, 2); return composite; }
Example #14
Source File: NewSourceFolderWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.numColumns= 3; composite.setLayout(layout); fProjectField.doFillIntoGrid(composite, 3); fRootDialogField.doFillIntoGrid(composite, 3); fExcludeInOthersFields.doFillIntoGrid(composite, 3); fIgnoreOptionalProblemsField.doFillIntoGrid(composite, 3); int maxFieldWidth= convertWidthInCharsToPixels(40); LayoutUtil.setWidthHint(fProjectField.getTextControl(null), maxFieldWidth); LayoutUtil.setHorizontalGrabbing(fProjectField.getTextControl(null)); LayoutUtil.setWidthHint(fRootDialogField.getTextControl(null), maxFieldWidth); BidiUtils.applyBidiProcessing(fRootDialogField.getTextControl(null), StructuredTextTypeHandlerFactory.FILE); setControl(composite); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_PACKAGEROOT_WIZARD_PAGE); }
Example #15
Source File: NewContainerDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite)super.createDialogArea(parent); int widthHint= convertWidthInCharsToPixels(80); Composite inner= new Composite(composite, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 1; inner.setLayout(layout); fContainerDialogField.doFillIntoGrid(inner, 2); LayoutUtil.setWidthHint(fContainerDialogField.getLabelControl(null), widthHint); LayoutUtil.setWidthHint(fContainerDialogField.getTextControl(null), widthHint); LayoutUtil.setHorizontalGrabbing(fContainerDialogField.getTextControl(null)); fContainerDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example #16
Source File: TodoTaskInputDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); Composite inner= new Composite(composite, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; inner.setLayout(layout); fNameDialogField.doFillIntoGrid(inner, 2); fPriorityDialogField.doFillIntoGrid(inner, 2); LayoutUtil.setHorizontalGrabbing(fNameDialogField.getTextControl(null)); LayoutUtil.setWidthHint(fNameDialogField.getTextControl(null), convertWidthInCharsToPixels(45)); fNameDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.TASK_TAG_INPUT_DIALOG); return composite; }
Example #17
Source File: JavaMethodFiltersTable.java From jdt-codemining with Eclipse Public License 1.0 | 6 votes |
public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginWidth = 0; layout.marginHeight = 0; composite.setLayout(layout); fFilterListField.doFillIntoGrid(composite, 3); LayoutUtil.setHorizontalSpan(fFilterListField.getLabelControl(null), 2); // LayoutUtil.setWidthHint(fFilterListField.getLabelControl(null), // convertWidthInCharsToPixels(40)); LayoutUtil.setHorizontalGrabbing(fFilterListField.getListControl(null)); fFilterListField.getTableViewer().setComparator(new ViewerComparator()); }
Example #18
Source File: NameConventionConfigurationBlock.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.marginHeight= 0; layout.marginWidth= 0; layout.numColumns= 2; inner.setLayout(layout); fMessageField.doFillIntoGrid(inner, 2); fPrefixField.doFillIntoGrid(inner, 2); fSuffixField.doFillIntoGrid(inner, 2); LayoutUtil.setHorizontalGrabbing(fPrefixField.getTextControl(null)); LayoutUtil.setWidthHint(fPrefixField.getTextControl(null), convertWidthInCharsToPixels(45)); LayoutUtil.setWidthHint(fSuffixField.getTextControl(null), convertWidthInCharsToPixels(45)); fPrefixField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.CODE_STYLE_EDIT_PREFIX_SUFFIX); return composite; }
Example #19
Source File: AddResourcesToClientBundleDialog.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private void createClientBundleTypeControls(Composite parent, int nColumns) { clientBundleTypeField = new StringButtonDialogField(fieldAdapter); clientBundleTypeField.setLabelText("ClientBundle:"); clientBundleTypeField.setButtonLabel("Browse..."); clientBundleTypeField.doFillIntoGrid(parent, nColumns); Text text = clientBundleTypeField.getTextControl(null); LayoutUtil.setWidthHint(text, getMaxFieldWidth()); // Set up auto-completion resourceTypeCompletionProcessor = new JavaTypeCompletionProcessorWithAutoActivation(); ControlContentAssistHelper.createTextContentAssistant(text, resourceTypeCompletionProcessor); TextFieldNavigationHandler.install(text); }
Example #20
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 #21
Source File: NewModuleWizardPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
protected void createPackageControls(Composite composite, int nColumns) { modulePackageField.doFillIntoGrid(composite, nColumns); Text modulePackageText = modulePackageField.getTextControl(null); LayoutUtil.setWidthHint(modulePackageText, getMaxFieldWidth()); ControlContentAssistHelper.createTextContentAssistant(modulePackageText, modulePackageCompletionProcessor); TextFieldNavigationHandler.install(modulePackageText); }
Example #22
Source File: TypeFilterPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createContents(Composite parent) { initializeDialogUnits(parent); Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.numColumns= 2; layout.marginWidth= 0; layout.marginHeight= 0; composite.setLayout(layout); fFilterListField.doFillIntoGrid(composite, 3); LayoutUtil.setHorizontalSpan(fFilterListField.getLabelControl(null), 2); LayoutUtil.setWidthHint(fFilterListField.getLabelControl(null), convertWidthInCharsToPixels(40)); LayoutUtil.setHorizontalGrabbing(fFilterListField.getListControl(null)); fFilterListField.getTableViewer().setComparator(new ViewerComparator()); Label spacer= new Label(composite, SWT.LEFT ); GridData gd= new GridData(SWT.DEFAULT, convertHeightInCharsToPixels(1) / 2); gd.horizontalSpan= 2; spacer.setLayoutData(gd); String label= PreferencesMessages.TypeFilterPreferencePage_restricted_link; Map<String, String> targetInfo= new java.util.HashMap<String, String>(2); targetInfo.put(ProblemSeveritiesPreferencePage.DATA_SELECT_OPTION_KEY, JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE); targetInfo.put(ProblemSeveritiesPreferencePage.DATA_SELECT_OPTION_QUALIFIER, JavaCore.PLUGIN_ID); createPreferencePageLink(composite, label, targetInfo); fHideForbiddenField.doFillIntoGrid(composite, 2); fHideDiscouragedField.doFillIntoGrid(composite, 2); Dialog.applyDialogFont(composite); return composite; }
Example #23
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 #24
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 #25
Source File: ProblemSeveritiesConfigurationBlock.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= 3; int fieldWidthHint= convertWidthInCharsToPixels(60); Label intro= new Label(composite, SWT.WRAP); intro.setText(PreferencesMessages.NullAnnotationsConfigurationDialog_null_annotations_description); intro.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, layout.numColumns, 1)); LayoutUtil.setWidthHint(intro, fieldWidthHint); fNullableAnnotationDialogField.doFillIntoGrid(composite, 3); Text text= fNullableAnnotationDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, fieldWidthHint); TextFieldNavigationHandler.install(text); fNonNullAnnotationDialogField.doFillIntoGrid(composite, 3); TextFieldNavigationHandler.install(fNonNullAnnotationDialogField.getTextControl(null)); fNonNullByDefaultAnnotationDialogField.doFillIntoGrid(composite, 3); TextFieldNavigationHandler.install(fNonNullByDefaultAnnotationDialogField.getTextControl(null)); fNullableAnnotationDialogField.postSetFocusOnDialogField(parent.getDisplay()); applyDialogFont(composite); return composite; }
Example #26
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 #27
Source File: UserLibraryPreferencePage.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); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fNameField, fIsSystemField }, true, SWT.DEFAULT, SWT.DEFAULT); fNameField.postSetFocusOnDialogField(parent.getDisplay()); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.CP_EDIT_USER_LIBRARY); return composite; }
Example #28
Source File: UserLibraryPreferencePage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createContents(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); LayoutUtil.doDefaultLayout(composite, new DialogField[] { fLibraryList }, true); LayoutUtil.setHorizontalGrabbing(fLibraryList.getTreeControl(null)); Dialog.applyDialogFont(composite); return composite; }
Example #29
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 #30
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); }