本文整理汇总了Java中org.eclipse.swt.widgets.Composite.setData方法的典型用法代码示例。如果您正苦于以下问题:Java Composite.setData方法的具体用法?Java Composite.setData怎么用?Java Composite.setData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Composite
的用法示例。
在下文中一共展示了Composite.setData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HydroGroup
import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
* Create the composite.
* @param parent
* @param style
*/
public HydroGroup(Composite parent, int style) {
super(parent, style);
setLayout(new GridLayout(1, false));
setData("org.eclipse.e4.ui.css.id", "HydrographGroup");
hydroGroupLabel = new CLabel(this, SWT.NONE);
hydroGroupLabel.setText("Hydro Group Label");
hydroGroupLabel.setData("org.eclipse.e4.ui.css.id", "HydroGroupLabel");
hydroGroupBorder = new Composite(this, SWT.NONE);
hydroGroupBorder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_hydroGroupBorder = new GridLayout(1, false);
gl_hydroGroupBorder.verticalSpacing = 1;
gl_hydroGroupBorder.marginWidth = 1;
gl_hydroGroupBorder.marginHeight = 1;
gl_hydroGroupBorder.horizontalSpacing = 1;
hydroGroupBorder.setLayout(gl_hydroGroupBorder);
hydroGroupBorder.setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 0, 0, 0));
hydroGroupBorder.setData("org.eclipse.e4.ui.css.id", "HydroGroupBorder");
hydroGroupClientArea = new Composite(hydroGroupBorder, SWT.NONE);
hydroGroupClientArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
hydroGroupClientArea.setData("org.eclipse.e4.ui.css.id", "HydroGroupClientArea");
}
示例2: createFooter
import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private Composite createFooter ( final Composite parent )
{
final Composite footer = new Composite ( parent, SWT.NONE );
footer.setLayout ( new RowLayout () );
footer.setData ( RWT.CUSTOM_VARIANT, "footer" );
footer.setBackgroundMode ( SWT.INHERIT_DEFAULT );
final Label label = new Label ( footer, SWT.NONE );
label.setText ( System.getProperty ( Properties.FOOTER_TEXT, "Eclipse SCADA Admin Console" ) );
return footer;
}