本文整理汇总了Java中org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil.getIndent方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutUtil.getIndent方法的具体用法?Java LayoutUtil.getIndent怎么用?Java LayoutUtil.getIndent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil
的用法示例。
在下文中一共展示了LayoutUtil.getIndent方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addLink
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
private void addLink(Composite composite, String text) {
GridData gd;
final Link link= new Link(composite, SWT.NONE);
link.setText(text);
gd= new GridData(SWT.FILL, SWT.BEGINNING, true, false);
gd.widthHint= 300; // don't get wider initially
gd.horizontalSpan= 2;
gd.horizontalIndent= LayoutUtil.getIndent();
link.setLayoutData(gd);
link.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, null);
}
});
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:JavaEditorAppearanceConfigurationBlock.java
示例2: addCompletionRadioButtons
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
private void addCompletionRadioButtons(Composite contentAssistComposite) {
Composite completionComposite= new Composite(contentAssistComposite, SWT.NONE);
GridData ccgd= new GridData();
ccgd.horizontalSpan= 2;
completionComposite.setLayoutData(ccgd);
GridLayout ccgl= new GridLayout();
ccgl.marginWidth= 0;
ccgl.numColumns= 2;
completionComposite.setLayout(ccgl);
SelectionListener completionSelectionListener= new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
boolean insert= fCompletionInsertsRadioButton.getSelection();
setValue(PREF_CODEASSIST_INSERT_COMPLETION, insert);
}
};
fCompletionInsertsRadioButton= new Button(completionComposite, SWT.RADIO | SWT.LEFT);
fCompletionInsertsRadioButton.setText(PreferencesMessages.JavaEditorPreferencePage_completionInserts);
fCompletionInsertsRadioButton.setLayoutData(new GridData());
fCompletionInsertsRadioButton.addSelectionListener(completionSelectionListener);
fCompletionOverwritesRadioButton= new Button(completionComposite, SWT.RADIO | SWT.LEFT);
fCompletionOverwritesRadioButton.setText(PreferencesMessages.JavaEditorPreferencePage_completionOverwrites);
fCompletionOverwritesRadioButton.setLayoutData(new GridData());
fCompletionOverwritesRadioButton.addSelectionListener(completionSelectionListener);
Label label= new Label(completionComposite, SWT.NONE);
label.setText(PreferencesMessages.JavaEditorPreferencePage_completionToggleHint);
GridData gd= new GridData();
gd.horizontalIndent= LayoutUtil.getIndent();
gd.horizontalSpan= 2;
label.setLayoutData(gd);
}
示例3: createControl
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
public void createControl(Composite parent) {
Composite superComposite= new Composite(parent, SWT.NONE);
setControl(superComposite);
initializeDialogUnits(superComposite);
superComposite.setLayout(new GridLayout());
Composite composite= new Composite(superComposite, SWT.NONE);
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
composite.setLayout(layout);
RowLayouter layouter= new RowLayouter(2);
Label label= new Label(composite, SWT.NONE);
label.setText(getLabelText());
Text text= createTextInputField(composite);
text.selectAll();
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint= convertWidthInCharsToPixels(25);
text.setLayoutData(gd);
layouter.perform(label, text, 1);
Label separator= new Label(composite, SWT.NONE);
GridData gridData= new GridData(SWT.FILL, SWT.FILL, false, false);
gridData.heightHint= 2;
separator.setLayoutData(gridData);
int indent= LayoutUtil.getIndent();
addOptionalUpdateReferencesCheckbox(composite, layouter);
addAdditionalOptions(composite, layouter);
addOptionalUpdateTextualMatches(composite, layouter);
addOptionalUpdateQualifiedNameComponent(composite, layouter, indent);
addOptionalLeaveDelegateCheckbox(composite, layouter);
addOptionalDeprecateDelegateCheckbox(composite, layouter, indent);
updateForcePreview();
Dialog.applyDialogFont(superComposite);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), fHelpContextID);
}
示例4: createManifestGroup
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
/**
* Create the export options specification widgets.
*
* @param parent org.eclipse.swt.widgets.Composite
*/
protected void createManifestGroup(Composite parent) {
fManifestGroup= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
fManifestGroup.setLayout(layout);
fManifestGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
fGenerateManifestRadioButton= new Button(fManifestGroup, SWT.RADIO | SWT.LEFT);
fGenerateManifestRadioButton.setText(JarPackagerMessages.JarManifestWizardPage_genetateManifest_text);
fGenerateManifestRadioButton.addListener(SWT.Selection, fUntypedListener);
Composite saveOptions= new Composite(fManifestGroup, SWT.NONE);
GridLayout saveOptionsLayout= new GridLayout();
saveOptionsLayout.marginWidth= 0;
saveOptions.setLayout(saveOptionsLayout);
GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.horizontalIndent= LayoutUtil.getIndent();
saveOptions.setLayoutData(data);
fSaveManifestCheckbox= new Button(saveOptions, SWT.CHECK | SWT.LEFT);
fSaveManifestCheckbox.setText(JarPackagerMessages.JarManifestWizardPage_saveManifest_text);
fSaveManifestCheckbox.addListener(SWT.MouseUp, fUntypedListener);
fReuseManifestCheckbox= new Button(saveOptions, SWT.CHECK | SWT.LEFT);
fReuseManifestCheckbox.setText(JarPackagerMessages.JarManifestWizardPage_reuseManifest_text);
fReuseManifestCheckbox.addListener(SWT.MouseUp, fUntypedListener);
createNewManifestFileGroup(saveOptions);
fUseManifestRadioButton= new Button(fManifestGroup, SWT.RADIO | SWT.LEFT);
fUseManifestRadioButton.setText(JarPackagerMessages.JarManifestWizardPage_useManifest_text);
fUseManifestRadioButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite existingManifestGroup= new Composite(fManifestGroup, SWT.NONE);
GridLayout existingManifestLayout= new GridLayout();
existingManifestLayout.marginWidth= 0;
existingManifestGroup.setLayout(existingManifestLayout);
data= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
data.horizontalIndent= LayoutUtil.getIndent();
existingManifestGroup.setLayoutData(data);
createManifestFileGroup(existingManifestGroup);
}
示例5: createIndentedCheckboxPref
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
private CheckboxPreference createIndentedCheckboxPref(Composite composite, int numColumns, String message, String key, String [] values) {
CheckboxPreference pref= createCheckboxPref(composite, numColumns, message, key, values);
GridData data= (GridData) pref.getControl().getLayoutData();
data.horizontalIndent= LayoutUtil.getIndent();
return pref;
}
示例6: indent
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
protected static void indent(Control control) {
((GridData) control.getLayoutData()).horizontalIndent+= LayoutUtil.getIndent();
}
示例7: createContents
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil; //导入方法依赖的package包/类
@Override
protected Control createContents(Composite parent) {
initializeDialogUnits(parent);
int nColumns= 1;
Composite result= new Composite(parent, SWT.NONE);
result.setFont(parent.getFont());
GridLayout layout= new GridLayout();
layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
layout.marginWidth= 0;
layout.numColumns= nColumns;
result.setLayout(layout);
fShowMethodReturnType.doFillIntoGrid(result, nColumns);
fShowMethodTypeParameters.doFillIntoGrid(result, nColumns);
fShowCategory.doFillIntoGrid(result, nColumns);
fShowMembersInPackageView.doFillIntoGrid(result, nColumns);
fFoldPackagesInPackageExplorer.doFillIntoGrid(result, nColumns);
new Separator().doFillIntoGrid(result, nColumns);
fCompressPackageNames.doFillIntoGrid(result, nColumns);
fPackageNamePattern.doFillIntoGrid(result, 2);
LayoutUtil.setHorizontalIndent(fPackageNamePattern.getLabelControl(null));
Text packageNamePatternControl= fPackageNamePattern.getTextControl(null);
LayoutUtil.setHorizontalIndent(packageNamePatternControl);
LayoutUtil.setHorizontalGrabbing(packageNamePatternControl);
LayoutUtil.setWidthHint(fPackageNamePattern.getLabelControl(null), convertWidthInCharsToPixels(65));
new Separator().doFillIntoGrid(result, nColumns);
fAbbreviatePackageNames.doFillIntoGrid(result, nColumns);
fAbbreviatePackageNamePattern.doFillIntoGrid(result, 2);
LayoutUtil.setHorizontalIndent(fAbbreviatePackageNamePattern.getLabelControl(null));
Text abbreviatePackageNamePatternControl= fAbbreviatePackageNamePattern.getTextControl(null);
LayoutUtil.setHorizontalIndent(abbreviatePackageNamePatternControl);
LayoutUtil.setHorizontalGrabbing(abbreviatePackageNamePatternControl);
LayoutUtil.setWidthHint(fAbbreviatePackageNamePattern.getLabelControl(null), convertWidthInCharsToPixels(65));
LayoutUtil.setVerticalGrabbing(abbreviatePackageNamePatternControl);
LayoutUtil.setHeightHint(abbreviatePackageNamePatternControl, convertHeightInCharsToPixels(3));
new Separator().doFillIntoGrid(result, nColumns);
fStackBrowsingViewsVertically.doFillIntoGrid(result, nColumns);
String noteTitle= PreferencesMessages.AppearancePreferencePage_note;
String noteMessage= PreferencesMessages.AppearancePreferencePage_preferenceOnlyEffectiveForNewPerspectives;
Composite noteControl= createNoteComposite(JFaceResources.getDialogFont(), result, noteTitle, noteMessage);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
gd.horizontalIndent= LayoutUtil.getIndent();
noteControl.setLayoutData(gd);
initFields();
Dialog.applyDialogFont(result);
return result;
}