本文整理了Java中org.eclipse.swt.widgets.Text.showSelection()
方法的一些代码示例,展示了Text.showSelection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.showSelection()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:showSelection
[英]Shows the selection.
If the selection is already showing in the receiver, this method simply returns. Otherwise, lines are scrolled until the selection is visible.
[中]显示所选内容。
如果所选内容已经显示在接收器中,则此方法只返回。否则,将滚动行,直到所选内容可见。
代码示例来源:origin: pentaho/pentaho-kettle
public void showSelection() {
wText.showSelection();
}
代码示例来源:origin: pentaho/pentaho-kettle
public void showSelection() {
wText.showSelection();
}
代码示例来源:origin: pentaho/pentaho-kettle
wText.showSelection();
} else if ( treeEntry.isJob() ) {
wText.showSelection();
} else {
currentLogText = null;
代码示例来源:origin: pentaho/pentaho-kettle
text.showSelection();
} else {
text.setText( BaseMessages.getString( PKG, "TransHistory.HistoryConfiguration.NoLoggingFieldDefined" ) );
代码示例来源:origin: pentaho/pentaho-kettle
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 );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
text.showSelection();
} else {
text.setText( BaseMessages.getString( PKG, "JobHistory.HistoryConfiguration.NoLoggingFieldDefined" ) );
代码示例来源:origin: pentaho/pentaho-kettle
int idx = widget.getCaretPosition();
widget.selectAll();
widget.showSelection();
widget.setSelection( 0 );
widget.showSelection();
widget.setSelection( idx );
代码示例来源:origin: org.xworker/xworker_swt
public static void showSelection(Object obj) {
if(obj instanceof Text) {
Text text = (Text) obj;
text.showSelection();
}else if(StyledTextProxy.isStyledText(obj)) {
StyledTextProxy.showSelection(obj);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
/**
* Updates the filter from the UI state.
* Must be done here rather than by extending open()
* because after super.open() is called, the widgetry is disposed.
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
protected void okPressed() {
if (!isMaxCallDepthValid()) {
if (fMaxCallDepth.forceFocus()) {
fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
fMaxCallDepth.showSelection();
}
}
updateFilterFromUI();
super.okPressed();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Updates the filter from the UI state.
* Must be done here rather than by extending open()
* because after super.open() is called, the widgetry is disposed.
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
@Override
protected void okPressed() {
if (!isMaxCallDepthValid()) {
if (fMaxCallDepth.forceFocus()) {
fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
fMaxCallDepth.showSelection();
}
}
updateFilterFromUI();
super.okPressed();
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Updates the filter from the UI state.
* Must be done here rather than by extending open()
* because after super.open() is called, the widgetry is disposed.
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
@Override
protected void okPressed() {
if (!isMaxCallDepthValid()) {
if (fMaxCallDepth.forceFocus()) {
fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
fMaxCallDepth.showSelection();
}
}
updateFilterFromUI();
super.okPressed();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
/**
* Updates the filter from the UI state.
* Must be done here rather than by extending open()
* because after super.open() is called, the widgetry is disposed.
*/
@Override
protected void okPressed() {
try {
int parseResult = Integer.parseInt(this.markerLimit.getText());
if (parseResult < 1) {
throw new NumberFormatException();
}
updateFilterFromUI(getFilter());
super.okPressed();
} catch (NumberFormatException eNumberFormat) {
MessageBox messageBox = new MessageBox(getShell(), SWT.OK
| SWT.APPLICATION_MODAL | SWT.ICON_ERROR);
messageBox.setText(TaskListMessages.TaskList_titleMarkerLimitInvalid);
messageBox.setMessage(TaskListMessages.TaskList_messageMarkerLimitInvalid);
messageBox.open();
if (markerLimit.forceFocus()) {
markerLimit.setSelection(0, markerLimit.getCharCount());
markerLimit.showSelection();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!