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

The following are Jave code examples for showing how to use setLocation() 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: 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 2
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);
}