本文整理匯總了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();
}