Java Code Examples for org.eclipse.swt.widgets.Text.setSize()

The following are Jave code examples for showing how to use setSize() of the org.eclipse.swt.widgets.Text class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: convertigo-eclipse   File: HttpTriggerXpathEditorComposite.java   View Source Code Vote up 6 votes
/**
 * 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);
}
 
Example 2
Project: Hydrograph   File: ComponentSearchUtility.java   View Source Code Vote up 5 votes
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();
}
 
Example 3
Project: bdf2   File: TransitionLabelCellEditorLocator.java   View Source Code Vote up 5 votes
@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);
}