From 6d0c39ccd264ff544f672248109a58de924d2cbd Mon Sep 17 00:00:00 2001 From: richie Date: Tue, 29 Oct 2019 18:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=92=8C=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/report/StyleKit.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main/java/com/fanruan/api/report/StyleKit.java diff --git a/src/main/java/com/fanruan/api/report/StyleKit.java b/src/main/java/com/fanruan/api/report/StyleKit.java new file mode 100644 index 0000000..3b3b557 --- /dev/null +++ b/src/main/java/com/fanruan/api/report/StyleKit.java @@ -0,0 +1,33 @@ +package com.fanruan.api.report; + +import com.fr.base.Style; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.xml.SynchronizedStyleList; + +/** + * @author richie + * @version 10.0 + * Created by richie on 2019/10/29 + * 样式持久化相关工具类 + */ +public class StyleKit { + + /** + * 持久化样式设置 + * + * @param writer xml写入器 + */ + public static void xmlizeStyleList(XMLPrintWriter writer) { + SynchronizedStyleList.getSynchronizedStyleList().xmlizeStyleList(writer); + } + + /** + * 获取指定样式的序列 + * + * @param style 指定的样式 + * @return 序列 + */ + public static int indexOfStyle(Style style) { + return SynchronizedStyleList.getSynchronizedStyleList().indexOfStyle(style); + } +}