xfatextarea.java
来自「有关对pdf操作的代码」· Java 代码 · 共 41 行
JAVA
41 行
package com.lowagie.rups.view.itext;
import java.io.IOException;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import com.lowagie.rups.io.OutputStreamResource;
import com.lowagie.rups.io.TextAreaOutputStream;
/**
* TextArea that visualizes the XFA XML file.
*/
public class XfaTextArea extends JScrollPane {
/** The text area with the content stream. */
protected JTextArea text;
/**
* Constructs a StreamTextArea.
* @throws IOException
*/
public XfaTextArea() {
super();
text = new JTextArea();
setViewportView(text);
}
public void clear() {
text.setText("");
}
public void load(OutputStreamResource xml) throws IOException {
TextAreaOutputStream stream = new TextAreaOutputStream(text);
xml.writeTo(stream);
}
/** A Serial Version UID. */
private static final long serialVersionUID = -8275229961781669457L;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?