[英]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.