[英]paste AuthorDocumentFragment (Oxygen) into TextArea (Java swing)
我想将 AuthorDocumentFragment (Oxygen) 粘贴到我的模态对话框的 TextArea (Java swing) 中。 但是 textarea 不支持元素 AuthorDocumentFragment。 我该怎么办?
我的代码:
public void doOperation(final AuthorAccess authorAccess, final ArgumentsMap args)
throws IllegalArgumentException, AuthorOperationException {
AuthorNode[] nodeList2 = authorAccess.getDocumentController().findNodesByXPath("//*[@id]/child::node()", true, true, true);
ArrayList<AuthorDocumentFragment> arrayList = new ArrayList<AuthorDocumentFragment>();
for (AuthorNode i : nodeList2) {
AuthorDocumentFragment newFragText = null;
try {
newFragText = authorAccess.getDocumentController().createDocumentFragment(i, true);
} catch (BadLocationException e) {
e.printStackTrace();
}
arrayList.add(newFragText);
}
}
void jList1MouseClicked(java.awt.event.MouseEvent evt) {
textAreaRefs.setText(???);
}
AuthorDocumentController API 具有将 AuthorDocumentFragment 序列化为 XML 的方法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.