本文整理汇总了Java中org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil.setHorizontalSpan方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutUtil.setHorizontalSpan方法的具体用法?Java LayoutUtil.setHorizontalSpan怎么用?Java LayoutUtil.setHorizontalSpan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil
的用法示例。
在下文中一共展示了LayoutUtil.setHorizontalSpan方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContents
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@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;
}
示例2: createControl
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
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);
}
示例3: createMethodStubSelectionControls
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
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);
}
示例4: createPageElementsControls
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
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);
}
示例5: createMethodStubSelectionControls
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
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);
}
示例6: createDialogArea
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@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;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:29,代码来源:ExpandWithConstructorsConfigurationBlock.java
示例7: createContents
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@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;
}
示例8: createDialogArea
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@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);
TextFieldNavigationHandler.install(text);
DialogField.createEmptySpace(composite, 1);
fNameDialogField.postSetFocusOnDialogField(parent.getDisplay());
applyDialogFont(composite);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:30,代码来源:CodeAssistFavoritesConfigurationBlock.java
示例9: createPreferenceList
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
/**
* Create a list dialog field.
*
* @param parent the composite
*/
private void createPreferenceList(Composite parent) {
String[] buttonLabels= new String[] {
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_newType_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_newMember_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_edit_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_remove_button,
CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_restoreDefaults_button
};
ListAdapter adapter= new ListAdapter();
fList= new ListDialogField<String>(adapter, buttonLabels, new ListLabelProvider());
fList.setDialogFieldListener(adapter);
fList.setLabelText(CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_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));
Control listControl= fList.getListControl(null);
GridData gd= (GridData)listControl.getLayoutData();
gd.verticalAlignment= GridData.FILL;
gd.grabExcessVerticalSpace= true;
gd.heightHint= pixelConverter.convertHeightInCharsToPixels(10);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:37,代码来源:ExpandWithConstructorsConfigurationBlock.java
示例10: createDialogArea
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite composite= (Composite)super.createDialogArea(parent);
int widthHint= convertWidthInCharsToPixels(60);
Composite inner= new Composite(composite, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
inner.setLayout(layout);
Label description= new Label(inner, SWT.WRAP);
if (fIsExclusion) {
description.setText(NewWizardMessages.ExclusionInclusionEntryDialog_exclude_description);
} else {
description.setText(NewWizardMessages.ExclusionInclusionEntryDialog_include_description);
}
GridData gd= new GridData();
gd.horizontalSpan= 2;
gd.widthHint= convertWidthInCharsToPixels(80);
description.setLayoutData(gd);
fExclusionPatternDialog.doFillIntoGrid(inner, 3);
LayoutUtil.setWidthHint(fExclusionPatternDialog.getLabelControl(null), widthHint);
LayoutUtil.setHorizontalSpan(fExclusionPatternDialog.getLabelControl(null), 2);
LayoutUtil.setWidthHint(fExclusionPatternDialog.getTextControl(null), widthHint);
LayoutUtil.setHorizontalGrabbing(fExclusionPatternDialog.getTextControl(null));
fExclusionPatternDialog.postSetFocusOnDialogField(parent.getDisplay());
applyDialogFont(composite);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:38,代码来源:ExclusionInclusionEntryDialog.java
示例11: createContents
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@Override
protected Control createContents(Composite parent) {
setShell(parent.getShell());
GridLayout layout= new GridLayout();
layout.numColumns= 3;
layout.marginHeight= 0;
layout.marginWidth= 0;
Composite composite= new Composite(parent, SWT.NONE);
composite.setFont(parent.getFont());
composite.setLayout(layout);
fNameConventionList.doFillIntoGrid(composite, 4);
LayoutUtil.setHorizontalSpan(fNameConventionList.getLabelControl(null), 2);
Table table= fNameConventionList.getTableViewer().getTable();
GridData data= (GridData)fNameConventionList.getListControl(null).getLayoutData();
data.heightHint= SWTUtil.getTableHeightHint(table, 5);
data.grabExcessHorizontalSpace= true;
data.verticalAlignment= GridData.BEGINNING;
data.grabExcessVerticalSpace= false;
data= (GridData)fNameConventionList.getButtonBox(null).getLayoutData();
data.grabExcessVerticalSpace= false;
data.verticalAlignment= GridData.BEGINNING;
fUseKeywordThisBox.doFillIntoGrid(composite, 3);
fUseIsForBooleanGettersBox.doFillIntoGrid(composite, 3);
fUseOverrideAnnotation.doFillIntoGrid(composite, 3);
DialogField.createEmptySpace(composite, 3);
fExceptionName.doFillIntoGrid(composite, 2);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:37,代码来源:NameConventionConfigurationBlock.java
示例12: createDialogArea
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@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;
}
示例13: createDialogArea
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
initializeDialogUnits(parent);
Composite composite= (Composite) super.createDialogArea(parent);
GridLayout layout= (GridLayout) composite.getLayout();
layout.numColumns= 2;
fVariablesList.doFillIntoGrid(composite, 3);
LayoutUtil.setHorizontalSpan(fVariablesList.getLabelControl(null), 2);
GridData listData= (GridData) fVariablesList.getListControl(null).getLayoutData();
listData.grabExcessHorizontalSpace= true;
listData.heightHint= convertHeightInCharsToPixels(10);
listData.widthHint= convertWidthInCharsToPixels(70);
fWarning= new CLabel(composite, SWT.NONE);
fWarning.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, fVariablesList.getNumberOfControls() - 1, 1));
Composite lowerComposite= new Composite(composite, SWT.NONE);
lowerComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
lowerComposite.setLayout(layout);
fConfigButton.doFillIntoGrid(lowerComposite, 1);
applyDialogFont(composite);
return composite;
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:34,代码来源:NewVariableEntryDialog.java
示例14: createDialogArea
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite composite= (Composite) super.createDialogArea(parent);
Composite inner= new Composite(composite, 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));
DialogField labelField= new DialogField();
labelField.setLabelText(Messages.format(NewWizardMessages.ExclusionInclusionDialog_description, BasicElementLabels.getPathLabel(fCurrElement.getPath(), false)));
labelField.doFillIntoGrid(inner, 2);
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));
applyDialogFont(composite);
return composite;
}
示例15: doFillIntoGrid
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
private void doFillIntoGrid(Composite parent, int numColumns) {
fLinkLocation.doFillIntoGrid(parent, numColumns);
LayoutUtil.setHorizontalSpan(fLinkLocation.getLabelControl(null), numColumns);
LayoutUtil.setHorizontalGrabbing(fLinkLocation.getTextControl(null));
BidiUtils.applyBidiProcessing(fLinkLocation.getTextControl(null), StructuredTextTypeHandlerFactory.FILE);
fVariables.doFillIntoGrid(parent, 1);
}