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


Java CLabel.setLeftMargin方法代码示例

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


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

示例1: createUI

import org.eclipse.swt.custom.CLabel; //导入方法依赖的package包/类
public void createUI(Composite cParent) {
	Label spcStatus = new Label(cParent, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_IN);
	spcStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	Composite pStatus = new Composite(cParent, SWT.NO_FOCUS);
	pStatus.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));
	GridLayout gl_pStatus = new GridLayout(4, false);
	gl_pStatus.marginTop = 1;
	gl_pStatus.marginBottom = 2;
	gl_pStatus.marginHeight = 0;
	gl_pStatus.verticalSpacing = 0;
	pStatus.setLayout(gl_pStatus);
	pStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	lStatus = new CLabel(pStatus, SWT.NONE);
	lStatus.setLeftMargin(3);
	lStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	lStatus.setRightMargin(5);
	lStatus.setTopMargin(2);
	lStatus.setBottomMargin(1);

	setPortStatus("Port closed", false);

	createLeds(pStatus);
}
 
开发者ID:ploys,项目名称:ecle,代码行数:26,代码来源:PortStatus.java

示例2: createLeds

import org.eclipse.swt.custom.CLabel; //导入方法依赖的package包/类
protected void createLeds(Composite parent) {
	Composite pSigstate = new Composite(parent, SWT.NONE);
	GridLayout gl_pSigstate = new GridLayout(6, true);
	gl_pSigstate.marginHeight = 0;
	pSigstate.setLayout(gl_pSigstate);

	createLed(pSigstate, Serial.Pin.RXD);
	createLed(pSigstate, Serial.Pin.TXD);

	createLed(pSigstate, Serial.Pin.CTS);
	createLed(pSigstate, Serial.Pin.DCD);
	createLed(pSigstate, Serial.Pin.DSR);
	createLed(pSigstate, Serial.Pin.RNG);

	CLabel led = createLed(parent, Serial.Pin.BREAK);
	led.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	led.setLeftMargin(20);

	led = createLed(parent, Serial.Pin.ERROR);
	led.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	led.setRightMargin(2);
	led.setLeftMargin(10);
}
 
开发者ID:ploys,项目名称:ecle,代码行数:24,代码来源:PortStatus.java

示例3: createContextButton

import org.eclipse.swt.custom.CLabel; //导入方法依赖的package包/类
protected CLabel createContextButton (String text, Image icon)
{
	CLabel lbl = new CLabel(buttonsContainer, SWT.NONE);
	lbl.setLayoutData(new RowData(SWT.DEFAULT, 28));
	lbl.setRightMargin(10);
	lbl.setLeftMargin(8);
	lbl.setText(text);
	lbl.setImage(icon);
	lbl.setBackground(ColorResources.COLOR_CS_BLUE);
	lbl.setForeground(ColorResources.COLOR_WHITE);
	lbl.setCursor(new Cursor(getDisplay(), SWT.CURSOR_HAND));
	
	contextButtonsMap.put(lbl, text);
	
	return lbl;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:17,代码来源:TitleWidget.java

示例4: createErrorComposite

import org.eclipse.swt.custom.CLabel; //导入方法依赖的package包/类
protected void createErrorComposite(final Composite parent) {
    errorMessageText = new CLabel(parent, SWT.NONE);
    errorMessageText.setLeftMargin(0);
    errorMessageText.setText("");

    final GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.heightHint = 30 * getErrorLine();
    gridData.horizontalSpan = numColumns;

    errorMessageText.setLayoutData(gridData);
    errorMessageText.setForeground(ColorConstants.red);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:14,代码来源:AbstractDialog.java

示例5: createLed

import org.eclipse.swt.custom.CLabel; //导入方法依赖的package包/类
protected CLabel createLed(Composite parent, Serial.Pin led) {
	CLabel element = new CLabel(parent, SWT.NONE);
	element.setTopMargin(1);
	element.setRightMargin(0);
	element.setBottomMargin(1);
	element.setLeftMargin(0);
	element.setText(led.name());
	element.setImage(Icons.state(State.OFF));

	leds.put(led, element);
	return element;
}
 
开发者ID:ploys,项目名称:ecle,代码行数:13,代码来源:PortStatus.java

示例6: createSeparator

import org.eclipse.swt.custom.CLabel; //导入方法依赖的package包/类
protected CLabel createSeparator ()
{
	CLabel label = new CLabel(buttonsContainer, SWT.SEPARATOR | SWT.VERTICAL);
	label.setRightMargin(1);
	label.setLeftMargin(1);
	label.setBackground(org.eclipse.wb.swt.SWTResourceManager.getColor(SWT.COLOR_DARK_GRAY));
	label.setLayoutData(new RowData(-1, 24));
	return label;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:10,代码来源:TitleWidget.java


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