You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
44 lines
1.0 KiB
package com.fanruan.api.report; |
|
|
|
import com.fr.base.Style; |
|
import com.fr.stable.xml.XMLPrintWriter; |
|
import com.fr.stable.xml.XMLableReader; |
|
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 reader xml读取器 |
|
*/ |
|
public static void deXmlizeStyleList(XMLableReader reader) { |
|
SynchronizedStyleList.getSynchronizedStyleList().deXmlizeStyleList(reader); |
|
} |
|
|
|
|
|
/** |
|
* 获取指定样式的序列 |
|
* |
|
* @param style 指定的样式 |
|
* @return 序列 |
|
*/ |
|
public static int indexOfStyle(Style style) { |
|
return SynchronizedStyleList.getSynchronizedStyleList().indexOfStyle(style); |
|
} |
|
}
|
|
|