I want to paste AuthorDocumentFragment (Oxygen) into TextArea (Java swing) of my modal dialog. But the element AuthorDocumentFragment is not supported for textarea. What do I do with this?
My code:
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(???);
}
The AuthorDocumentController API has a method to serialize an AuthorDocumentFragment to XML:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.