public void setSelection( int i ) { wText.setSelection( i ); }
public void setSelection( int i ) { wText.setSelection( i ); }
public void addLog( String line ) { StringBuilder rest = new StringBuilder( XMLHandler.date2string( new Date() ) ); rest.append( " : " ); rest.append( line ).append( Const.CR ); wLogging.append( rest.toString() ); wLogging.setSelection( wLogging.getText().length() ); // make it scroll }
@Override protected Control createMessageArea( Composite composite ) { GridLayout gridLayout = (GridLayout) composite.getLayout(); gridLayout.numColumns = 1; composite.setLayout( gridLayout ); if ( this.message != null ) { this.messageLabel = new Label( composite, this.getMessageLabelStyle() ); this.messageLabel.setText( this.message ); } if ( this.details != null ) { this.detailsText = new Text( composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL ); this.detailsText.pack(); this.detailsText.setText( this.details ); GridData gridData = new GridData( ); gridData.widthHint = 1024; gridData.heightHint = 300; this.detailsText.setLayoutData( gridData ); this.detailsText.setSelection( this.details.length() ); } return composite; }
wText.setSelection( wText.getText().length() ); wText.showSelection(); } else if ( treeEntry.isJob() ) { wText.setSelection( wText.getText().length() ); wText.showSelection(); } else {
protected void showKeySelection( String key ) { if ( !key.equals( selectedKey ) ) { applyChangedValue(); } if ( selectedLocale != null && key != null && selectedMessagesPackage != null ) { String mainValue = store.lookupKeyValue( referenceLocale, selectedMessagesPackage, key ); String value = store.lookupKeyValue( selectedLocale, selectedMessagesPackage, key ); KeyOccurrence keyOccurrence = crawler.getKeyOccurrence( key, selectedMessagesPackage ); wKey.setText( key ); wMain.setText( Const.NVL( mainValue, "" ) ); wValue.setText( Const.NVL( value, "" ) ); wSource.setText( Const.NVL( keyOccurrence.getSourceLine(), "" ) ); // Focus on the entry field // Put the cursor all the way at the back // wValue.setFocus(); wValue.setSelection( wValue.getText().length() ); wValue.showSelection(); wValue.clearSelection(); selectedKey = key; lastValueChanged = false; wApply.setEnabled( false ); wRevert.setEnabled( false ); } }
text.setSelection( text.getText().length() ); text.showSelection(); } else {
text.setSelection( text.getText().length() ); text.showSelection(); } else {
wName.setSelection( 0, wName.getText().length() );
widget.selectAll(); widget.showSelection(); widget.setSelection( 0 ); widget.showSelection(); widget.setSelection( idx );
textWidget.setSelection( content.length() );
@Override public void setControlContents(Control control, String text, int cursorPosition) { ((Text) control).setText(text); ((Text) control).setSelection(cursorPosition, cursorPosition); }
public void setValue(Object value) { String txt = m_smartFieldModel.getText(value); m_text.setText(txt); m_text.setSelection(0, txt.length()); m_lastVerifiedInput = m_text.getText(); fireInputChanged(value); }
@Override public boolean setFocus() { if (isOkToUse(fTextControl)) { fTextControl.setFocus(); fTextControl.setSelection(0, fTextControl.getText().length()); } return true; }
@Override public boolean setFocus() { if (isOkToUse(fTextControl)) { fTextControl.setFocus(); fTextControl.setSelection(0, fTextControl.getText().length()); } return true; }
@Override public void insertControlContents(Control control, String text, int cursorPosition) { Point selection = ((Text) control).getSelection(); ((Text) control).insert(text); // Insert will leave the cursor at the end of the inserted text. If this // is not what we wanted, reset the selection. if (cursorPosition < text.length()) { ((Text) control).setSelection(selection.x + cursorPosition, selection.x + cursorPosition); } }
public void insertControlContents(Control control, String text, int cursorPosition) { Point selection = ((Text) control).getSelection(); ((Text) control).insert(text); // Insert will leave the cursor at the end of the inserted text. If this // is not what we wanted, reset the selection. if (cursorPosition < text.length()) { ((Text) control).setSelection(selection.x + cursorPosition, selection.x + cursorPosition); } }
@Override public void widgetSelected(SelectionEvent e) { fNameText.setEnabled(true); fNameText.setFocus(); fNameText.setSelection(0, fNameText.getText().length()); doValidation(); } @Override
@Override protected void doSetFocus() { if (text != null) { text.setFocus(); text.setSelection(text.getText().length()); checkSelection(); checkDeleteable(); checkSelectable(); } } };
public void open(OpenEvent event) { String text = getTextFromSelection(event.getSelection()); if (text != null) { textSearchControl.getTextControl().setText(text); textControl.setSelection(text.length()); textSearchControl.addToSearchHistory(text); } close(); }