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


Java SWT.LEAD属性代码示例

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


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

示例1: InfoBar

/**
 * Constructor.
 * 
 * @param parent The parent {@link Composite}.
 * @param style The InfoBar {@link Composite#getStyle() style}.
 */
public InfoBar(Composite parent, int style) {
    super(parent, style);
    setVisible(false);

    FormLayout layout = new FormLayout();
    layout.marginTop = 5;
    layout.marginBottom = 5;
    layout.marginLeft = 5;
    layout.marginRight = 5;
    layout.spacing = 5;
    setLayout(layout);

    Color backgroundColor = parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);

    setBackground(backgroundColor);
    _Label = new Label(this, SWT.LEAD | SWT.WRAP);
    _Label.setBackground(backgroundColor);

    FormData labelFormData = new FormData();
    labelFormData.top = new FormAttachment(0, 0);
    labelFormData.left = new FormAttachment(0, 0);
    _Label.setLayoutData(labelFormData);
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:29,代码来源:InfoBar.java

示例2: convertColumnAlignmentToSWT

public static int convertColumnAlignmentToSWT(int align) {
	int swt = 0;
	int hAlign = align & 3;
	if (hAlign == TableColumn.ALIGN_CENTER) {
		swt = SWT.CENTER;
	} else if (hAlign == TableColumn.ALIGN_LEAD) {
		swt = SWT.LEAD;
	} else if (hAlign == TableColumn.ALIGN_TRAIL) {
		swt = SWT.TRAIL;
	} else {
		swt = SWT.LEAD;
	}
	int vAlign = align & ~3;
	if (vAlign == TableColumn.ALIGN_TOP) {
		swt |= SWT.TOP;
	} else if (vAlign == TableColumn.ALIGN_BOTTOM) {
		swt |= SWT.BOTTOM;
	}
	return swt;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:20,代码来源:TableColumnSWTUtils.java

示例3: createContents

@Override
protected void createContents() {

    Label authInfoLabel = new Label(this, SWT.LEAD);
    authInfoLabel.setText("Auth Info:");
    authInfoLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    _AuthInfoComposite = new ZooKeeperConnectionAuthInfoComposite(this, SWT.NULL);
    _AuthInfoComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    GridLayout authInfoCompositeLayout = new GridLayout(2, false);
    authInfoCompositeLayout.marginWidth = 0;
    authInfoCompositeLayout.marginHeight = 0;
    authInfoCompositeLayout.horizontalSpacing = ((GridLayout) getLayout()).horizontalSpacing;
    _AuthInfoComposite.setLayout(authInfoCompositeLayout);

    Table table = new Table(_AuthInfoComposite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL
            | SWT.V_SCROLL);
    GridData tableLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2);
    tableLayoutData.heightHint = 200;
    table.setLayoutData(tableLayoutData);
    _AuthInfoComposite.setTable(table);

    Button addButton = new Button(_AuthInfoComposite, SWT.NULL);
    addButton.setText("Add...");
    addButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
    _AuthInfoComposite.setAddButton(addButton);

    final Button removeButton = new Button(_AuthInfoComposite, SWT.NULL);
    removeButton.setText("Remove");
    removeButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
    _AuthInfoComposite.setRemoveButton(removeButton);

    _AuthInfoComposite.init();
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:35,代码来源:ZooKeeperConnectionComposite2.java

示例4: createContents

@Override
protected void createContents() {

    ZnodeModel parentZnodeModel = getParentZnodeModel();

    Label connectionLabel = new Label(this, SWT.LEAD);
    connectionLabel.setText("Connection:");
    connectionLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));

    Label connectionImageLabel = new Label(this, SWT.LEAD);
    connectionImageLabel.setImage(ZooKeeperActivator
            .getManagedImage(ZooKeeperActivator.IMAGE_KEY_OBJECT_ZOO_KEEPER_CONNECTION));
    connectionImageLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));

    Label connectionValueLabel = new Label(this, SWT.LEAD);
    connectionValueLabel.setText(parentZnodeModel.getOwnerModel().getKey().getName());
    connectionValueLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    addControl(CONTROL_NAME_CONNECTION_LABEL, connectionValueLabel);
    addControlDecoration(CONTROL_NAME_CONNECTION_LABEL, connectionValueLabel);

    Label parentLabel = new Label(this, SWT.LEAD);
    parentLabel.setText("Parent:");
    parentLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));

    Label parentImageLabel = new Label(this, SWT.LEAD);
    parentImageLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    addControl(CONTROL_NAME_PARENT_IMAGE_LABEL, parentImageLabel);
    updateParentZnodeImage();

    Label parentValueLabel = new Label(this, SWT.LEAD);
    parentValueLabel.setText(parentZnodeModel.getData().getPath());
    parentValueLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    addControl(CONTROL_NAME_PARENT_PATH_LABEL, parentValueLabel);
    addControlDecoration(CONTROL_NAME_PARENT_PATH_LABEL, parentValueLabel);

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:36,代码来源:ZnodeNewWizardComposite.java

示例5: convertSWTAlignmentToColumn

private static int convertSWTAlignmentToColumn(int align) {
	if ((align & SWT.LEAD) != 0) {
		return TableColumn.ALIGN_LEAD;
	} else if ((align & SWT.CENTER) != 0) {
		return TableColumn.ALIGN_CENTER;
	} else if ((align & SWT.RIGHT) != 0) {
		return TableColumn.ALIGN_TRAIL;
	}
	return TableColumn.ALIGN_LEAD;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:10,代码来源:TableColumnSWTUtils.java


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