本文整理汇总了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;
}
示例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;
}
示例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());
}
示例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();
}