本文整理了Java中org.netbeans.editor.Utilities.moveMark()
方法的一些代码示例,展示了Utilities.moveMark()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.moveMark()
方法的具体详情如下:
包路径:org.netbeans.editor.Utilities
类名称:Utilities
方法名:moveMark
暂无
代码示例来源:origin: net.java.abeille/abeille
/**
* Sets the caret position to some position. This causes removal of the
* active selection.
*/
public void setDot(int offset, Rectangle scrollRect, int scrollPolicy) {
JTextComponent c = component;
if (c != null) {
setSelectionVisible(false);
BaseDocument doc = (BaseDocument) c.getDocument();
if (doc != null) {
try {
Utilities.moveMark(doc, caretMark, offset);
} catch (BadLocationException e) {
// setting the caret to wrong position leaves it at current
// position
} catch (InvalidMarkException e) {
// Caret not installed or inside the initial-read
}
}
fireStateChanged();
dispatchUpdate(scrollRect, scrollPolicy);
}
}
代码示例来源:origin: net.java.abeille/abeille
Utilities.moveMark(doc, selectionMark, oldCaretPos);
selPos = oldCaretPos;
Utilities.moveMark(doc, caretMark, offset);
if (selectionVisible) { // selection already visible
boolean selMarkFirst = (selPos < offset);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
selPos = selectionMark.getOffset();
} else {
Utilities.moveMark(doc, selectionMark, oldCaretPos);
selPos = oldCaretPos;
Utilities.moveMark(doc, caretMark, offset);
if (selectionVisible) { // selection already visible
boolean selMarkFirst = (selPos < offset);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
dotChanged = true;
try {
Utilities.moveMark(doc, caretMark, offset);
代码示例来源:origin: net.java.abeille/abeille
if (markStartPos != matchBlk[0] || markEndPos != matchBlk[1]) {
editorUI.repaintBlock(markStartPos, markEndPos);
Utilities.moveMark(doc, highlightBraceStartMark, matchBlk[0]);
Utilities.moveMark(doc, highlightBraceEndMark, matchBlk[1]);
editorUI.repaintBlock(matchBlk[0], matchBlk[1]);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
if (bolPos != markPos) {
editorUI.repaintOffset(markPos);
Utilities.moveMark(doc, highlightRowMark, bolPos);
editorUI.repaintOffset(bolPos);
代码示例来源:origin: net.java.abeille/abeille
if (bolPos != markPos) {
editorUI.repaintOffset(markPos);
Utilities.moveMark(doc, highlightRowMark, bolPos);
editorUI.repaintOffset(bolPos);
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
if (markStartPos != matchBlk[0] || markEndPos != matchBlk[1]) {
editorUI.repaintBlock(markStartPos, markEndPos);
Utilities.moveMark(doc, highlightBraceStartMark, matchBlk[0]);
Utilities.moveMark(doc, highlightBraceEndMark, matchBlk[1]);
editorUI.repaintBlock(matchBlk[0], matchBlk[1]);
} else { // on the same position
内容来源于网络,如有侵权,请联系作者删除!