本文整理汇总了Java中org.eclipse.swt.widgets.Text.setSize方法的典型用法代码示例。如果您正苦于以下问题:Java Text.setSize方法的具体用法?Java Text.setSize怎么用?Java Text.setSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Text
的用法示例。
在下文中一共展示了Text.setSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
/**
* This method initializes this
*
*/
private void initialize() {
XpathTrigger trigger = (parent.getTrigger() instanceof XpathTrigger)?(XpathTrigger)parent.getTrigger():null;
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.FILL;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalAlignment = GridData.CENTER;
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.setLayout(gridLayout);
xpath_label = new Label(this, SWT.NONE);
xpath_label.setText("Waiting for Xpath");
xpath_txt = new Text(this, SWT.BORDER);
xpath_txt.setText( (trigger!=null)? trigger.getXPath():"");
xpath_txt.setLayoutData(gridData2);
xpath_txt.setSize(600, 50);
}
示例2: createAssitTextBox
import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createAssitTextBox(Point cursorRelativePosition) {
assistText = new Text((Composite) graphicControl, SWT.BORDER);
assistText.setLocation(cursorRelativePosition.x, cursorRelativePosition.y - assistText.getLineHeight());
assistText.setSize(200, assistText.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
assistText.setTextLimit(51);
assistText.setFocus();
}
示例3: relocate
import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
public void relocate(CellEditor celleditor) {
Text text=(Text)celleditor.getControl();
Rectangle box=this.transitionLabelEditPart.getFigure().getBounds();
text.setLocation(box.x,box.y);
text.setSize(box.width,box.height);
}