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


Java Text.getLayoutData方法代码示例

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


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

示例1: createWidgetTextbox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * Create TextBoxes on Stack layout composite
 * @param labelName
 * @param compositeWithStack
 * @return
 */
private AbstractELTWidget createWidgetTextbox(String labelName, ELTDefaultSubgroupComposite compositeWithStack, String text) {

	AbstractELTWidget textboxWgt = new ELTDefaultTextBox()
			.grabExcessHorizontalSpace(true).defaultText(text);
	compositeWithStack.attachWidget(textboxWgt);
	Text textbox = ((Text) textboxWgt.getSWTWidgetControl());
	
	GridData data = (GridData) textbox.getLayoutData();
	data.horizontalIndent = 5;
	data.verticalIndent = 5;
	data.widthHint = 260;
	return textboxWgt;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:20,代码来源:FTPProtocolWidget.java

示例2: createWidgetTextbox

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
 * Create TextBoxes on Stack layout composite
 * @param labelName
 * @param compositeWithStack
 * @return
 */
private AbstractELTWidget createWidgetTextbox(String labelName, ELTSubGroupCompositeWithStack compositeWithStack) {

	AbstractELTWidget textboxWgt = new ELTDefaultTextBox()
			.grabExcessHorizontalSpace(textBoxConfig.getGrabExcessSpace());
	compositeWithStack.attachWidget(textboxWgt);
	Text textbox = ((Text) textboxWgt.getSWTWidgetControl());

	GridData data = (GridData) textbox.getLayoutData();
	data.horizontalIndent = 16;
	data.verticalIndent = 5;
	data.widthHint = 260;
	return textboxWgt;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:20,代码来源:SelectionDatabaseWidget.java

示例3: attachToPropertySubGroup

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
public void attachToPropertySubGroup(AbstractELTContainerWidget container) {
	
	logger.trace("Starting {} textbox creation", textBoxConfig.getName());
	lableAndTextBox = new ELTDefaultSubgroupComposite(container.getContainerControl());
	lableAndTextBox.createContainerWidget();
	
	AbstractELTWidget label = new ELTDefaultLable(textBoxConfig.getName() + " ");
	lableAndTextBox.attachWidget(label);
	setPropertyHelpWidget((Control) label.getSWTWidgetControl());
	
	AbstractELTWidget textBoxWidget = new ELTDefaultTextBox().
			grabExcessHorizontalSpace(textBoxConfig.getGrabExcessSpace());//.textBoxWidth(textBoxConfig.getwidgetWidth());
	lableAndTextBox.attachWidget(textBoxWidget);
	
	textBox = (Text) textBoxWidget.getSWTWidgetControl();
	textBox.setEnabled(textBoxConfig.isEnabled());
	txtDecorator = WidgetUtility.addDecorator(textBox, Messages.bind(Messages.EMPTY_FIELD, textBoxConfig.getName()));
	txtDecorator.setMarginWidth(3);
	GridData gridData = (GridData)textBox.getLayoutData();
	if(OSValidator.isMac()){
		gridData.widthHint = 106;
	}else{
		gridData.widthHint = 80;
	}
	attachListeners(textBoxWidget);
	String property = propertyValue;
	textBox.setText(property);
	
	 /**
	 *parameter resolution at dev phase 
	 */
	Utils.INSTANCE.loadProperties();
	cursor = container.getContainerControl().getDisplay().getSystemCursor(SWT.CURSOR_HAND);
	
	populateWidget();
	logger.trace("Finished {} textbox creation", textBoxConfig.getName());
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:39,代码来源:TextBoxWithLabelWidget.java

示例4: attachToPropertySubGroup

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
public void attachToPropertySubGroup(AbstractELTContainerWidget subGroup) {
	eltSubgroupComposite = new ELTDefaultSubgroupComposite(subGroup.getContainerControl());
	eltSubgroupComposite.createContainerWidget();
	Utils.INSTANCE.loadProperties();
	this.cursor = subGroup.getContainerControl().getDisplay().getSystemCursor(SWT.CURSOR_HAND);

	AbstractELTWidget label = new ELTDefaultLable(Messages.LABEL_WORKSHEET_NAME + " ");
	eltSubgroupComposite.attachWidget(label);
	setPropertyHelpWidget((Control) label.getSWTWidgetControl());

	AbstractELTWidget textBoxWidget = new ELTDefaultTextBox();
	eltSubgroupComposite.attachWidget(textBoxWidget);

	textBox = (Text) textBoxWidget.getSWTWidgetControl();
	txtDecorator = WidgetUtility.addDecorator(textBox, Messages.bind(Messages.EMPTY_FIELD, ((Label) label.getSWTWidgetControl()).getText()));
	txtDecorator.setMarginWidth(3);
	txtDecorator.show();
	textBox.setToolTipText("Worksheet Name can be static or FieldName or a Parameter");
	GridData gridData = (GridData) textBox.getLayoutData();
	if (OSValidator.isMac()) {
		gridData.widthHint = 106;
	} else {
		gridData.widthHint = 80;
	}
	attachListeners(textBox);

	isFieldCheckBox = new Button(eltSubgroupComposite.getContainerControl(), SWT.CHECK);
	isFieldCheckBox.setEnabled(false);
	isFieldCheckBox.setText(Constants.IS_FIELD);
	attachSelectionListener(isFieldCheckBox);
	populateWidget();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:34,代码来源:WorksheetWidget.java


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