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


Java Label.setAlignment方法代码示例

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


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

示例1: createLabel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
/**
 * Creates the label for dataset information window
 * @param composite_2
 */
public void createLabel(Composite composite_2, String windowLabelName) {
	
	Label lblName = new Label(composite_2, SWT.NONE);
	lblName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
	lblName.setText(windowLabelName);
	lblName.setAlignment(SWT.RIGHT);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:DatasetInformationDialog.java

示例2: XYZDisplayComp

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
public XYZDisplayComp(Composite parent, int style){
	super(parent, style);
	
	this.setLayout(new RowLayout(SWT.HORIZONTAL));
	this.setBackground(AvoColors.COLOR_QSET_BG);
	
	FontData fd = new FontData();
	fd.setHeight(10);
	fd.setStyle(SWT.BOLD);
	fd.setName("Verdana");
	Font f = new Font(this.getDisplay(), fd);		
	
	Label llx = new Label(this, SWT.NO_BACKGROUND);
	llx.setFont(f);
	llx.setText("X:");
	llx.setBackground(AvoColors.COLOR_QSET_BG);
	lX = new Label(this, SWT.NONE);	
	lX.setAlignment(SWT.RIGHT);
	lX.setFont(f);
	lX.setBackground(AvoColors.COLOR_QSET_BG);
	
	Label lly = new Label(this, SWT.NONE);
	lly.setFont(f);
	lly.setText(" Y:");
	lly.setBackground(AvoColors.COLOR_QSET_BG);
	lY = new Label(this, SWT.NONE);
	lY.setAlignment(SWT.RIGHT);
	lY.setFont(f);
	lY.setBackground(AvoColors.COLOR_QSET_BG);
	
	Label llz = new Label(this, SWT.NONE);
	llz.setFont(f);
	llz.setText(" Z:");
	llz.setBackground(AvoColors.COLOR_QSET_BG);
	lZ = new Label(this, SWT.NONE);
	lZ.setAlignment(SWT.RIGHT);
	lZ.setFont(f);
	lZ.setBackground(AvoColors.COLOR_QSET_BG);
	
	updateXYZ();
	
	AvoGlobal.glViewEventHandler.addGLViewListener(new GLViewListener(){
		@Override
		public void cursorMoved() {
			updateXYZ();
		}			
	});
}
 
开发者ID:avoCADo-3d,项目名称:avoCADo,代码行数:49,代码来源:XYZDisplayComp.java

示例3: createContents

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void createContents(String exlplain, String version) {
	aboutToolsShell = new Shell(getParent(), getStyle());
	aboutToolsShell.setImage(SWTResourceManager.getImage(AboutTools.class, Resource.IMAGE_ICON));
	aboutToolsShell.setSize(400, 391);
	aboutToolsShell.setText(getText());
	PubUtils.setCenterinParent(getParent(), aboutToolsShell);

	Label copyRightlabel = new Label(aboutToolsShell, SWT.CENTER);
	copyRightlabel.setBounds(10, 311, 375, 17);
	copyRightlabel.setText(Resource.AUTHOR);

	Link link = new Link(aboutToolsShell, SWT.NONE);
	link.setBounds(143, 336, 108, 17);
	link.setText("<a>www.itlaborer.com</a>");
	link.addSelectionListener(new LinkSelection());

	Label versionLabel = new Label(aboutToolsShell, SWT.NONE);
	versionLabel.setAlignment(SWT.CENTER);
	versionLabel.setBounds(156, 288, 82, 17);
	versionLabel.setText(version);

	StyledText readMeTextLabel = new StyledText(aboutToolsShell,
			SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
	readMeTextLabel.setBounds(3, 33, 389, 114);
	readMeTextLabel.setText(exlplain);

	StyledText lblgplV = new StyledText(aboutToolsShell, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
	lblgplV.setText(
			"Copyright itlaborer.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.");
	lblgplV.setBounds(3, 176, 389, 106);

	Label label_1 = new Label(aboutToolsShell, SWT.NONE);
	label_1.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微软雅黑", 9, SWT.BOLD));
	label_1.setText("Apache License:");
	label_1.setBounds(3, 155, 136, 17);

	Label label_2 = new Label(aboutToolsShell, SWT.NONE);
	label_2.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微软雅黑", 9, SWT.BOLD));
	label_2.setText("软件说明:");
	label_2.setBounds(3, 12, 136, 17);
}
 
开发者ID:cnldw,项目名称:APITools,代码行数:42,代码来源:AboutTools.java


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