当前位置: 首页>>代码示例>>Java>>正文


Java LayoutConstants类代码示例

本文整理汇总了Java中org.eclipse.jface.layout.LayoutConstants的典型用法代码示例。如果您正苦于以下问题:Java LayoutConstants类的具体用法?Java LayoutConstants怎么用?Java LayoutConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LayoutConstants类属于org.eclipse.jface.layout包,在下文中一共展示了LayoutConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的org.eclipse.jface.layout.LayoutConstants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。