本文整理了Java中javax.swing.text.StyledDocument.getEndPosition()
方法的一些代码示例,展示了StyledDocument.getEndPosition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StyledDocument.getEndPosition()
方法的具体详情如下:
包路径:javax.swing.text.StyledDocument
类名称:StyledDocument
方法名:getEndPosition
暂无
代码示例来源:origin: edu.illinois.lis/indri
/**
* Clear all highlighting markup in a styled document.
* @param myDoc The StyledDocument to highlight
* @param highlight The highlighting attributes
*/
private void clearHighlight(StyledDocument myDoc,
MutableAttributeSet highlight) {
// clear any attributes.
myDoc.setCharacterAttributes(myDoc.getStartPosition().getOffset(),
myDoc.getEndPosition().getOffset(),
highlight, true);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-navigation
public boolean attach() {
int offset = pos.getOffset();
if (offset == -1) {
return false;
}
Position endPos = document.getEndPosition();
if (endPos == null || offset >= endPos.getOffset()) {
return false;
}
if (!(document instanceof NbDocument.Annotatable)) {
return false;
}
if (getAnnotationType() == null) {
return false;
}
try {
NbDocument.addAnnotation(document, pos, -1, this);
return true;
} catch (Throwable e) {
Exceptions.printStackTrace(e);
return false;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
return org.openide.text.NbDocument.findLineNumber(styledDoc, styledDoc.getEndPosition().getOffset());
代码示例来源:origin: org.netbeans.api/org-openide-text
);
} catch (BadLocationException e) {
p = mgr.getDoc().getEndPosition();
);
} catch (BadLocationException e) {
retObject = mgr.getDoc().getEndPosition();
} catch (IndexOutOfBoundsException e) {
retObject = mgr.getDoc().getEndPosition();
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
argInsertAfter ? Position.Bias.Forward : Position.Bias.Backward);
} catch (BadLocationException e) {
p = mgr.getDoc ().getEndPosition ();
argInsertAfter ? Position.Bias.Forward : Position.Bias.Backward);
} catch (BadLocationException e) {
retObject = mgr.getDoc ().getEndPosition ();
} catch (IndexOutOfBoundsException e) {
retObject = mgr.getDoc ().getEndPosition();
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
argInsertAfter ? Position.Bias.Forward : Position.Bias.Backward);
} catch (BadLocationException e) {
p = mgr.getDoc ().getEndPosition ();
argInsertAfter ? Position.Bias.Forward : Position.Bias.Backward);
} catch (BadLocationException e) {
retObject = mgr.getDoc ().getEndPosition ();
} catch (IndexOutOfBoundsException e) {
retObject = mgr.getDoc ().getEndPosition();
内容来源于网络,如有侵权,请联系作者删除!