本文整理了Java中javax.swing.text.AbstractDocument.createPosition()
方法的一些代码示例,展示了AbstractDocument.createPosition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractDocument.createPosition()
方法的具体详情如下:
包路径:javax.swing.text.AbstractDocument
类名称:AbstractDocument
方法名:createPosition
暂无
代码示例来源:origin: net.sf.jt400/jt400
/**
Returns a position that will track changes as the document is altered.
If the relative position is null, then the start of the document will
be used.
@param offset The offset from the start of the document.
@return The position.
@exception BadLocationException If the given offset does not
represent a valid location in the
document.
**/
public synchronized Position createPosition (int offset)
throws BadLocationException
{
return document_.createPosition (offset);
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Returns a position that will track change as the document is altered.
If the relative position is null, then the start of the document will
be used.
@param offset The offset from the start of the document.
@return The position.
@exception BadLocationException If the given offset does not
represent a valid location in the
document.
**/
public synchronized Position createPosition (int offset)
throws BadLocationException
{
return document_.createPosition (offset);
}
代码示例来源:origin: T145/JTerm
void protect(int start, int end) {
try {
positions.put(doc.createPosition(start), doc.createPosition(end));
} catch (BadLocationException ble) {
JTerm.out.println(TextColor.ERROR, ble.toString());
}
}
内容来源于网络,如有侵权,请联系作者删除!