简体   繁体   English

将 AuthorDocumentFragment (Oxygen) 粘贴到 TextArea (Java swing)

[英]paste AuthorDocumentFragment (Oxygen) into TextArea (Java swing)

I want to paste AuthorDocumentFragment (Oxygen) into TextArea (Java swing) of my modal dialog.我想将 AuthorDocumentFragment (Oxygen) 粘贴到我的模态对话框的 TextArea (Java swing) 中。 But the element AuthorDocumentFragment is not supported for textarea.但是 textarea 不支持元素 AuthorDocumentFragment。 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(???);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM