本文整理了Java中org.netbeans.editor.Utilities.isSelectionShowing()
方法的一些代码示例,展示了Utilities.isSelectionShowing()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.isSelectionShowing()
方法的具体详情如下:
包路径:org.netbeans.editor.Utilities
类名称:Utilities
方法名:isSelectionShowing
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor
@Override
public void actionPerformed(ActionEvent evt, JTextComponent target) {
final AtomicBoolean processedHere = new AtomicBoolean(false);
if (target != null) {
if (!target.isEditable() || !target.isEnabled() || !(target.getDocument() instanceof BaseDocument)) {
target.getToolkit().beep();
return;
}
final int caretOffset = Utilities.isSelectionShowing(target) ? target.getSelectionStart() : target.getCaretPosition();
final BaseDocument doc = (BaseDocument) target.getDocument();
doc.runAtomic(new Runnable() {
@Override
public void run() {
performCustomAction(doc, caretOffset, processedHere);
}
});
if (!processedHere.get()) {
performDefaultAction(evt, target);
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf
final BaseDocument doc = (BaseDocument) target.getDocument();
int from = Utilities.isSelectionShowing(caret) ? target.getSelectionStart() : caret.getDot();
int to = Utilities.isSelectionShowing(caret) ? target.getSelectionEnd() : caret.getDot();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-editor
int endPos;
if (Utilities.isSelectionShowing(caret)) {
startPos = target.getSelectionStart();
endPos = target.getSelectionEnd();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-editor
int startPos;
int endPos;
if (Utilities.isSelectionShowing(caret)) {
startPos = target.getSelectionStart();
endPos = target.getSelectionEnd();
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-editor
String endString = insertEndCommentString;
if (Utilities.isSelectionShowing(caret)) {
startPos = Utilities.getRowStart(doc, target.getSelectionStart());
endPos = target.getSelectionEnd();
内容来源于网络,如有侵权,请联系作者删除!