org.netbeans.editor.Utilities.moveMark()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(72)

本文整理了Java中org.netbeans.editor.Utilities.moveMark()方法的一些代码示例,展示了Utilities.moveMark()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.moveMark()方法的具体详情如下:
包路径:org.netbeans.editor.Utilities
类名称:Utilities
方法名:moveMark

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

相关文章

微信公众号

最新文章

更多