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