本文整理汇总了Java中org.eclipse.jface.layout.LayoutConstants类的典型用法代码示例。如果您正苦于以下问题:Java LayoutConstants类的具体用法?Java LayoutConstants怎么用?Java LayoutConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LayoutConstants类属于org.eclipse.jface.layout包,在下文中一共展示了LayoutConstants类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
@Override
protected Control createDialogArea(final Composite parent) {
Composite dialogArea = (Composite) super.createDialogArea(parent);
Composite container = new Composite(dialogArea, SWT.NONE);
Link flexPricing = new Link(container, SWT.WRAP);
flexPricing.setText(Messages.getString("deploy.preferences.dialog.flex.pricing")); //$NON-NLS-1$
flexPricing.addSelectionListener(
new OpenUriSelectionListener(new ErrorDialogErrorHandler(getShell())));
FontUtil.convertFontToItalic(flexPricing);
GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
Point margins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults()
.extendedMargins(margins.x, margins.x, 0 /* no upper margin */, margins.y)
.generateLayout(container);
return dialogArea;
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:20,代码来源:FlexDeployPreferencesDialog.java
示例2: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
@Override
protected Control createDialogArea(final Composite parent) {
Composite dialogArea = (Composite) super.createDialogArea(parent);
Composite container = new Composite(dialogArea, SWT.NONE);
content = createDeployPreferencesPanel(container, project, loginService,
getLayoutChangedHandler(), new ProjectRepository(googleApiFactory));
GridDataFactory.fillDefaults().grab(true, false).applyTo(content);
// we pull in Dialog's content margins which are zeroed out by TitleAreaDialog
GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
GridLayoutFactory.fillDefaults()
.margins(LayoutConstants.getMargins().x, LayoutConstants.getMargins().y)
.generateLayout(container);
TitleAreaDialogSupport.create(this, content.getDataBindingContext())
.setValidationMessageProvider(new ValidationMessageProvider() {
@Override
public int getMessageType(ValidationStatusProvider statusProvider) {
int type = super.getMessageType(statusProvider);
setValid(type != IMessageProvider.ERROR);
return type;
}
});
return dialogArea;
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:27,代码来源:DeployPreferencesDialog.java
示例3: createUI_210_Layout
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private void createUI_210_Layout(final Composite parent) {
final Group group = new Group(parent, SWT.NONE);
group.setText(Messages.Slideout_CalendarOptions_Group_Layout);
GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
GridLayoutFactory
.swtDefaults()//
.numColumns(2)
.spacing(10, LayoutConstants.getSpacing().y)
.applyTo(group);
// group.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
{
createUI_212__Col1(group);
createUI_214__Col2(group);
}
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:SlideoutCalendarOptions.java
示例4: createUI
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private Composite createUI(final Composite parent) {
final Composite container = new Composite(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
GridLayoutFactory.fillDefaults()//
.spacing(LayoutConstants.getSpacing().x, 2)
.numColumns(2)
.applyTo(container);
// container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
{
createUI_10_Title(container);
createUI_20_ColorViewer_Container(container);
createUI_30_Actions(container);
createUI_40_Options(container);
}
return container;
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:PrefPageMap3Color.java
示例5: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite contents = new Composite(parent, SWT.NONE);
contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
setTitle("Create new project");
getShell().setText("Create new project");
if (labelText != null) {
setMessage(labelText);
} else {
setMessage("Enter the name and the description of the project");
}
Label name = new Label(contents, SWT.NULL);
name.setText("Name:");
txtProjectName = new Text(contents, SWT.SINGLE | SWT.BORDER);
txtProjectName.setSize(150, 20);
Point defaultMargins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults().numColumns(2).margins(defaultMargins.x, defaultMargins.y)
.generateLayout(contents);
return contents;
}
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:28,代码来源:CreateProjectDialog.java
示例6: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite tparent = (Composite) super.createDialogArea(parent);
Point defaultSpacing = LayoutConstants.getSpacing();
GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins())
.spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(2).applyTo(tparent);
Label imgLbl = new Label(tparent, SWT.TOP);
imgLbl.setImage(warningImg);
GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING).applyTo(imgLbl);
String message = MessageFormat.format(Messages.getString("dialog.FileCoverMsgDialog.message"), fileName);
if (message != null) {
Label messageLbl = new Label(tparent, SWT.WRAP);
messageLbl.setText(message);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).hint(
convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
SWT.DEFAULT).applyTo(messageLbl);
}
return tparent;
}
开发者ID:heartsome,项目名称:tmxeditor8,代码行数:24,代码来源:FileCoverMsgDialog.java
示例7: createUI_260_YearColumns
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private void createUI_260_YearColumns(final Composite parent) {
final Group group = new Group(parent, SWT.NONE);
group.setText(Messages.Slideout_CalendarOptions_Group_YearColumns);
GridDataFactory
.fillDefaults()//
// .grab(true, true)
.applyTo(group);
GridLayoutFactory
.swtDefaults()//
.numColumns(2)
.spacing(10, LayoutConstants.getSpacing().y)
.applyTo(group);
// container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
{
{
/*
* Year columns
*/
// checkbox
_chkIsShowYearColumns = new Button(group, SWT.CHECK);
_chkIsShowYearColumns.setText(Messages.Slideout_CalendarOptions_Checkbox_IsShowYearColumn);
_chkIsShowYearColumns.setToolTipText(
Messages.Slideout_CalendarOptions_Checkbox_IsShowYearColumn_Tooltip);
_chkIsShowYearColumns.addSelectionListener(_defaultSelectionListener);
GridDataFactory
.fillDefaults()//
.align(SWT.FILL, SWT.BEGINNING)
.span(2, 1)
.applyTo(_chkIsShowYearColumns);
}
createUI_262__Col1(group);
createUI_264__Col2(group);
}
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:37,代码来源:SlideoutCalendarOptions.java
示例8: createUI_30_ViewTooltip
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private void createUI_30_ViewTooltip(final Composite parent) {
final Group group = new Group(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
group.setText(Messages.PrefPage_ViewTooltip_Group);
GridLayoutFactory.swtDefaults().applyTo(group);
{
final Label label = new Label(group, SWT.WRAP);
label.setText(Messages.PrefPage_ViewTooltip_Label_Info);
GridDataFactory.fillDefaults().span(6, 1).hint(400, SWT.DEFAULT).applyTo(label);
final Composite container = new Composite(group, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).indent(0, 5).applyTo(container);
GridLayoutFactory
.fillDefaults()
.spacing(20, LayoutConstants.getSpacing().y)
.numColumns(6)
.applyTo(container);
{
createUI_31_ToolTip_TourImport(container);
createUI_33_ToolTip_TourBook(container);
createUI_35_ToolTip_CollateTour(container);
createUI_37_ToolTip_Tagging(container);
createUI_39_ToolTip_TourCatalog(container);
}
createUI39ToolTipActions(group);
}
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:31,代码来源:PrefPageViews.java
示例9: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite parentComposite = (Composite) super.createDialogArea(parent);
Composite contents = new Composite(parentComposite, SWT.NONE);
GridLayout layout = new GridLayout();
contents.setLayout(layout);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
contents.setLayoutData(gridData);
Composite converterComposite = new Composite(contents, SWT.NONE);
converterComposite.setLayout(new GridLayout(2, false));
gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
converterComposite.setLayoutData(gridData);
String direction = converterViewModel.getDirection();
if (direction.equals(Converter.DIRECTION_POSITIVE)) {
supportList = createConvertControl(Messages.getString("dialog.ConfigConversionDialog.direction1"), converterComposite);
} else {
supportList = createConvertControl(Messages.getString("dialog.ConfigConversionDialog.direction2"), converterComposite);
}
supportList.getCombo().setFocus();
bindValue();
Dialog.applyDialogFont(parentComposite);
Point defaultMargins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults().numColumns(2).margins(defaultMargins.x, defaultMargins.y).generateLayout(
contents);
return contents;
}
开发者ID:heartsome,项目名称:translationstudio8,代码行数:39,代码来源:ConfigConversionDialog.java
示例10: createControl
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
public void createControl(Composite parent) {
initData(); // 先初始化本页面需要的数据
Composite contents = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
contents.setLayout(layout);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
contents.setLayoutData(gridData);
createFilesGroup(contents); // 文件列表区域
createPropertiesGroup(contents); // 源文件属性区域组
createConversionOptionsGroup(contents); // 转换选项组
bindValue(); // 数据绑定
try {
loadFiles(); // 加载文件列表
} catch (Exception e) {
e.printStackTrace();
}
filesTable.select(0); // 默认选中第一行数据
filesTable.notifyListeners(SWT.Selection, null);
Dialog.applyDialogFont(parent);
Point defaultMargins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults().numColumns(1).margins(defaultMargins.x, defaultMargins.y)
.generateLayout(contents);
setControl(contents);
validate();
}
开发者ID:heartsome,项目名称:translationstudio8,代码行数:37,代码来源:ReverseConversionWizardPage.java
示例11: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite parentComposite = (Composite) super.createDialogArea(parent);
Composite contents = new Composite(parentComposite, SWT.NONE);
GridLayout layout = new GridLayout();
contents.setLayout(layout);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
contents.setLayoutData(gridData);
Composite converterComposite = new Composite(contents, SWT.NONE);
converterComposite.setLayout(new GridLayout(2, false));
gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
converterComposite.setLayoutData(gridData);
String direction = converterViewModel.getDirection();
if (direction.equals(Converter.DIRECTION_POSITIVE)) {
supportList = createConvertControl("Convert from Suport format to Xliff", converterComposite);
} else {
supportList = createConvertControl("Convert from Xliff to Support format", converterComposite);
}
supportList.getCombo().setFocus();
bindValue();
Dialog.applyDialogFont(parentComposite);
Point defaultMargins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults().numColumns(2).margins(defaultMargins.x, defaultMargins.y).generateLayout(
contents);
return contents;
}
开发者ID:heartsome,项目名称:translationstudio8,代码行数:39,代码来源:ConfigConversionDialog.java
示例12: createControl
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
public void createControl(Composite parent) {
Composite contents = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
contents.setLayout(layout);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
contents.setLayoutData(gridData);
createFilesGroup(contents); // 文件列表区域
createPropertiesGroup(contents);// 源文件属性区域组
createConversionOptionsGroup(contents); // 转换选项组
createSegmentationGroup(contents); // 分段规则选择区域组
bindValue(); // 数据绑定
loadFiles(); // 加载文件列表
filesTable.select(0); // 默认选中第一行数据
filesTable.notifyListeners(SWT.Selection, null);
Dialog.applyDialogFont(parent);
Point defaultMargins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults().numColumns(1).margins(defaultMargins.x, defaultMargins.y)
.generateLayout(contents);
setControl(contents);
srxFile.setText(ConverterContext.defaultSrx);
validate();
}
开发者ID:heartsome,项目名称:translationstudio8,代码行数:34,代码来源:ConversionWizardPage.java
示例13: createDialogArea
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
/**
* @param parent
* parent composite
* @return Control
* @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
// Set the specific help for this Composite
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, Activator.PLUGIN_ID + ".help_import_ldap");
Composite contents = new Composite(parent, SWT.NONE);
contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
setTitle("LDAP server data");
setMessage("Enter data of server to connect to");
Label name = new Label(contents, SWT.NULL);
name.setText("Server name:");
serverName = new Text(contents, SWT.SINGLE | SWT.BORDER);
serverName.setSize(350, 20);
Label desc = new Label(contents, SWT.NULL);
desc.setText("Server base:");
ldapBase = new Text(contents, SWT.SINGLE | SWT.BORDER);
ldapBase.setSize(350, 20);
Point defaultMargins = LayoutConstants.getMargins();
GridLayoutFactory.fillDefaults().numColumns(2).margins(defaultMargins.x, defaultMargins.y)
.generateLayout(contents);
return contents;
}
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:34,代码来源:LdapSourceDialog.java
示例14: createContents
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
protected Control createContents(Composite parent) {
// initialize the dialog units
initializeDialogUnits(parent);
Point defaultSpacing = LayoutConstants.getSpacing();
GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins())
.spacing(defaultSpacing.x * 2,
defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent);
GridDataFactory.fillDefaults().grab(true, true).applyTo(parent);
createDialogAndButtonArea(parent);
return parent;
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:13,代码来源:IconAndMessageDialog.java
示例15: createGoalsProfilesGroup
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private void createGoalsProfilesGroup(Composite composite) {
Group group = UiUtils.createGroupWithTitle(composite, "Maven command line arguments", 2);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(group);
Point point = new Point(LayoutConstants.getSpacing().x, LayoutConstants.getSpacing().y * 3 / 2);
GridLayoutFactory.swtDefaults().numColumns(2).spacing(point).applyTo(group);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(group);
goals = createTextSection(group, "Goals:");
profiles = createTextSection(group, "Profiles:");
profiles.addModifyListener(updateEffectiveComandListener);
}
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:13,代码来源:MavenRunCommandLineConfigurationComponent.java
示例16: createControl
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
public Control createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
Group group = UiUtils.createGroupWithTitle(composite, "Maven command line arguments", 2);
commandLineText = new Text(group, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
if (baseCommandLine != null) {
createEffectiveCommandlineText(group);
}
UiUtils.addGrayedTooltipWhenEmpty(commandLineText, TOOLTIP_TEXT);
commandLineText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
String text = commandLineText.getText();
if (!text.equals(TOOLTIP_TEXT)) {
onCommandLineModified(text);
}
}
});
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).span(2, 1).applyTo(commandLineText);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(group);
Point point = new Point(LayoutConstants.getSpacing().x, LayoutConstants.getSpacing().y * 3 / 2);
GridLayoutFactory.swtDefaults().numColumns(2).spacing(point).applyTo(group);
GridLayoutFactory.fillDefaults().margins(5, 5).applyTo(composite);
GridDataFactory.fillDefaults().applyTo(composite);
return composite;
}
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:31,代码来源:MavenCommandLineConfigurationComponent.java
示例17: createControl
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayoutFactory.fillDefaults().numColumns(2).spacing(10, LayoutConstants.getSpacing().y).applyTo(composite);
Label label = new Label(composite, SWT.NONE);
label.setText(Messages.COMMONTXT_NAME_WITH_COLON);
nameText = new Text(composite, SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).applyTo(nameText);
nameText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
service.setName(nameText.getText());
}
});
bindingContext = new DataBindingContext();
map = new WritableMap();
WizardPageSupport.create(this, bindingContext);
bindingContext.bindValue(SWTObservables.observeText(nameText, SWT.Modify),
Observables.observeMapEntry(map, "name"), //$NON-NLS-1$
new UpdateValueStrategy().setAfterConvertValidator(new StringValidator()), null);
label = new Label(composite, SWT.NONE);
label.setText(Messages.CloudFoundryServicePlanWizardPage_LABEL_TYPE);
typeCombo = new Combo(composite, SWT.READ_ONLY | SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).applyTo(typeCombo);
typeCombo.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
int index = typeCombo.getSelectionIndex();
if (index != -1) {
CFServiceOffering configuration = serviceOfferings.get(index);
setCloudService(service, configuration);
}
refreshPlan();
}
});
bindingContext.bindValue(SWTObservables.observeSelection(typeCombo), Observables.observeMapEntry(map, "type"), //$NON-NLS-1$
new UpdateValueStrategy().setAfterConvertValidator(new ComboValidator(Messages.CloudFoundryServicePlanWizardPage_TEXT_SELECT_TYPE)), null);
pageBook = new PageBook(composite, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).span(2, 1).applyTo(pageBook);
planGroup = new Group(pageBook, SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, true).applyTo(planGroup);
planGroup.setLayout(new GridLayout());
planGroup.setVisible(false);
planGroup.setText(getPlanLabel());
MultiValidator validator = new MultiValidator() {
protected IStatus validate() {
// access plan value to bind validator
if (planObservable.getValue() == null) {
return ValidationStatus.cancel(getValidationErrorMessage());
}
return ValidationStatus.ok();
}
};
bindingContext.addValidationStatusProvider(validator);
Dialog.applyDialogFont(composite);
setControl(composite);
}
开发者ID:eclipse,项目名称:cft,代码行数:67,代码来源:CloudFoundryServicePlanWizardPage.java
示例18: getDefaultButtonWidth
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private static int getDefaultButtonWidth() {
return LayoutConstants.getMinButtonSize().x;
}
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:4,代码来源:Buttons.java
示例19: createUI_430_DayDate
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private void createUI_430_DayDate(final Composite parent) {
final Group group = new Group(parent, SWT.NONE);
group.setText(Messages.Slideout_CalendarOptions_Group_DayDate);
GridDataFactory
.fillDefaults()//
.grab(true, false)
.applyTo(group);
GridLayoutFactory.swtDefaults().numColumns(2).applyTo(group);
// group.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
{
{
/*
* Day date
*/
// checkbox
_chkIsShowDayDate = new Button(group, SWT.CHECK);
_chkIsShowDayDate.setText(Messages.Slideout_CalendarOptions_Checkbox_IsShowDayDate);
_chkIsShowDayDate.addSelectionListener(_defaultSelectionListener);
GridDataFactory
.fillDefaults()//
.align(SWT.FILL, SWT.BEGINNING)
.span(2, 1)
.applyTo(_chkIsShowDayDate);
}
{
final Composite container = new Composite(group, SWT.NONE);
GridDataFactory
.fillDefaults()//
.grab(true, false)
.span(2, 1)
.applyTo(container);
GridLayoutFactory
.fillDefaults()//
.numColumns(2)
.spacing(20, LayoutConstants.getSpacing().y)
.applyTo(container);
// container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
{
createUI_432__Col1(container);
createUI_434__Col2(container);
}
}
}
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:47,代码来源:SlideoutCalendarOptions.java
示例20: createUI10Colors
import org.eclipse.jface.layout.LayoutConstants; //导入依赖的package包/类
private void createUI10Colors(final Composite parent) {
final Group colorGroup = new Group(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(colorGroup);
GridLayoutFactory.fillDefaults()//
.margins(5, 5)
.spacing(30, LayoutConstants.getSpacing().y)
.numColumns(2)
.applyTo(colorGroup);
colorGroup.setText(Messages.pref_view_layout_label_color_group);
{
final Composite containerDefaultView = new Composite(colorGroup, SWT.NONE);
{
// color: tag category
addField(new ColorFieldEditor(
ITourbookPreferences.VIEW_LAYOUT_COLOR_CATEGORY,
Messages.pref_view_layout_label_category,
containerDefaultView));
// color: tag
addField(new ColorFieldEditor(ITourbookPreferences.VIEW_LAYOUT_COLOR_TITLE, //
Messages.pref_view_layout_label_title,
containerDefaultView));
// color: sub tag (year)
addField(new ColorFieldEditor(
ITourbookPreferences.VIEW_LAYOUT_COLOR_SUB,
Messages.pref_view_layout_label_sub,
containerDefaultView));
// color: sub sub tag (month)
addField(new ColorFieldEditor(
ITourbookPreferences.VIEW_LAYOUT_COLOR_SUB_SUB,
Messages.pref_view_layout_label_sub_sub,
containerDefaultView));
}
final Composite containerSegmenter = new Composite(colorGroup, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.BEGINNING).applyTo(containerSegmenter);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerSegmenter);
{
// show lines
final BooleanFieldEditor2 editorLines = new BooleanFieldEditor2(
ITourbookPreferences.VIEW_LAYOUT_DISPLAY_LINES,
Messages.pref_view_layout_display_lines,
containerSegmenter);
addField(editorLines);
final GridLayout gl = (GridLayout) containerSegmenter.getLayout();
gl.numColumns = 2;
final Button editorLinesControl = editorLines.getChangeControl(containerSegmenter);
GridDataFactory.fillDefaults().span(2, 1).indent(0, 10).applyTo(editorLinesControl);
editorLinesControl.setToolTipText(Messages.pref_view_layout_display_lines_Tooltip);
}
}
}
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:58,代码来源:PrefPageViewColors.java
注:本文中的org.eclipse.jface.layout.LayoutConstants类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论