显示边框
示例代码
package test.create.c05;
import iofd.layout.DefaultPageProperty;
import iofd.layout.OfdDocument;
import iofd.layout.block.Paragraph;
import iofd.layout.block.paragraph.Text;
import test.create.TestDocUtil;
/**
* 增加对panel画框的功能,用于测试
* */
public class C0501PaintBorder {
public static void main(String[] args) throws Throwable {
C0501PaintBorder o = new C0501PaintBorder();
o.done();
}
private void done() throws Throwable {
String clzName = this.getClass().getSimpleName();
System.out.println(clzName + " begin");
OfdDocument doc = new OfdDocument();
DefaultPageProperty prop = DefaultPageProperty.createDefaultPageProperty();
prop.setDebug(true);
doc.setDefaultPageProperty(prop);
Paragraph p = new Paragraph();
p.add(new Text("增加对panel画框的功能,用于测试"));
doc.add(p);
String fileName = TestDocUtil.getOfdFilePath(this.getClass());
doc.save(fileName);
System.out.println(clzName + " end");
}
}