當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。