本文整理匯總了Java中org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.setSelectionEnd方法的典型用法代碼示例。如果您正苦於以下問題:Java RSyntaxTextArea.setSelectionEnd方法的具體用法?Java RSyntaxTextArea.setSelectionEnd怎麽用?Java RSyntaxTextArea.setSelectionEnd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
的用法示例。
在下文中一共展示了RSyntaxTextArea.setSelectionEnd方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: actionPerformed
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
@Override
public void actionPerformed(ActionEvent event) {
if (textField.getText().length() == 0)
return;
RSyntaxTextArea pane = mainWindow.getModel().getCurrentTextArea();
if (pane == null)
return;
SearchContext context = new SearchContext();
context.setSearchFor(textField.getText());
context.setMatchCase(mcase.isSelected());
context.setRegularExpression(regex.isSelected());
context.setSearchForward(!reverse.isSelected());
context.setWholeWord(wholew.isSelected());
if (!SearchEngine.find(pane, context).wasFound()) {
pane.setSelectionStart(0);
pane.setSelectionEnd(0);
}
}
示例2: actionPerformed
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
@Override
public void actionPerformed(ActionEvent event) {
if (textField.getText().length() == 0)
return;
RSyntaxTextArea pane = mainWindow.getModel().getCurrentTextArea();
if (pane == null)
return;
SearchContext context = new SearchContext();
context.setSearchFor(textField.getText());
context.setMatchCase(mcase.isSelected());
context.setRegularExpression(regex.isSelected());
context.setSearchForward(!reverse.isSelected());
context.setWholeWord(wholew.isSelected());
if (!SearchEngine.find(pane, context).wasFound()) {
if (wrap.isSelected()) {
pane.setSelectionStart(0);
pane.setSelectionEnd(0);
} else {
mainWindow.getLabel().setText("Search Complete");
}
}
}
示例3: onSelectAllMenu
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
public void onSelectAllMenu() {
try {
RSyntaxTextArea pane = this.getModel().getCurrentTextArea();
if (pane != null) {
pane.requestFocusInWindow();
pane.setSelectionStart(0);
pane.setSelectionEnd(pane.getText().length());
}
} catch (Exception e) {
Luyten.showExceptionDialog("Exception!", e);
}
}