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


Java GridData.VERTICAL_ALIGN_BEGINNING属性代码示例

本文整理汇总了Java中org.eclipse.swt.layout.GridData.VERTICAL_ALIGN_BEGINNING属性的典型用法代码示例。如果您正苦于以下问题:Java GridData.VERTICAL_ALIGN_BEGINNING属性的具体用法?Java GridData.VERTICAL_ALIGN_BEGINNING怎么用?Java GridData.VERTICAL_ALIGN_BEGINNING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.layout.GridData的用法示例。


在下文中一共展示了GridData.VERTICAL_ALIGN_BEGINNING属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newTextArea

public StyledText newTextArea(Composite composite, boolean editable, int sty) {
    int style = SWT.MULTI | SWT.V_SCROLL;
    if (!editable)
        style |= SWT.READ_ONLY;
    else
        style |= SWT.WRAP;

    StyledText d = new StyledText(composite, style);
    d.setText("To be entered\ntest\n\test\ntest");
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.heightHint = 80;
    gd.widthHint = 460;
    gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;
    d.setEditable(editable);
    d.setLayoutData(gd);
    d.setFont(FontShop.textFont());
    if (keyListener != null)
        d.addKeyListener(keyListener);
    d.setWordWrap(editable);
    WidgetShop.tweakTextWidget(d);
    return d;
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:22,代码来源:GridComposite.java

示例2: createImageLabel

private void createImageLabel(Composite parent) {
    imageLabel = new Label(parent, SWT.BORDER_SOLID);
    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_BEGINNING);
    gd.widthHint = imageSize;
    gd.heightHint = imageSize;
    imageLabel.setLayoutData(gd);
    clearCoverArt();
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:8,代码来源:BookInfoPanel.java

示例3: createPartControl

/**
 * This is a callback that will allow us to create the viewer and initialize
 * it.
 */
public void createPartControl(Composite parent) {
	GridLayout layout = new GridLayout();
	layout.numColumns = 2;
	parent.setLayout(layout);

	layoutData1 = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
	layoutData1.grabExcessHorizontalSpace = true;
	layoutData1.grabExcessVerticalSpace = true;
	layoutData1.horizontalAlignment = GridData.FILL;
	layoutData1.verticalAlignment = GridData.FILL;
	layoutData1.exclude = false;

	this.parent = parent;
	viewer = new List(this.parent, SWT.SINGLE | SWT.V_SCROLL);
	list = new List(this.parent, SWT.SINGLE | SWT.V_SCROLL);
	viewer.setLayoutData(layoutData1);
	list.setLayoutData(layoutData1);

	parent.layout();

	makeActions();
	hookDoubleClickAction();
	contributeToActionBars();

	IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
	mgr.add(selectAction);
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:31,代码来源:TreeView.java

示例4: createLayoutDataForMultiStringAttribute

protected Object createLayoutDataForMultiStringAttribute(int widthHint1, int widthHint2, int heightHint2) {
	GridData gridData1 = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
	gridData1.widthHint = widthHint1;
	GridData gridData2 = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
	gridData2.heightHint = heightHint2;
	gridData2.widthHint = widthHint2;
	return new Object[] { gridData1, gridData2 };
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:8,代码来源:AttributeControlConfigurations.java

示例5: createDialogArea

protected Control createDialogArea(Composite parent) {
	this.getShell().setText("Select Versions");

	// overall layout
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	parent.setLayout(layout);

	// declare some layouts
	GridData ldtDefault = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
	ldtDefault.grabExcessHorizontalSpace = true;
	ldtDefault.grabExcessVerticalSpace = true;
	ldtDefault.horizontalAlignment = GridData.FILL;
	ldtDefault.verticalAlignment = GridData.FILL;
	ldtDefault.exclude = false;

	GridLayout panelLayout = new GridLayout();
	panelLayout.numColumns = 1;

	Composite leftPanel = new Composite(parent, 0);
	leftPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
			| GridData.FILL_VERTICAL | GridData.GRAB_HORIZONTAL
			| GridData.GRAB_VERTICAL));
	leftPanel.setLayout(panelLayout);

	Label base = new Label(leftPanel, 0);
	base.setText("Base Version:");

	// Project1 dropdown
	cmbProj1 = new Combo(leftPanel, SWT.READ_ONLY);
	cmbProj1.setLayoutData(ldtDefault);

	Label changed = new Label(leftPanel, 0);
	changed.setText("Changed Version:");

	// Diff options
	cmbProj2 = new Combo(leftPanel, SWT.READ_ONLY);
	cmbProj2.setLayoutData(ldtDefault);

	// Populate the combo boxes
	for (IProject proj : ResourcesPlugin.getWorkspace().getRoot()
			.getProjects()) {
		cmbProj1.add(proj.getName());
		cmbProj2.add(proj.getName());
	}

	return parent;
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:48,代码来源:SelectProjectDialog.java


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