mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
fix comment
This commit is contained in:
parent
c424d76f88
commit
9cc095463e
@ -16,5 +16,5 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
export JAVA_HOME="/cygdrive/d/java/jdk-17.0.11"
|
export JAVA_HOME="/cygdrive/d/java/jdk-17.0.15"
|
||||||
export PATH="$JAVA_HOME/bin:$PATH"
|
export PATH="$JAVA_HOME/bin:$PATH"
|
||||||
|
@ -19,6 +19,7 @@ package cn.hutool.v7.core.data.id;
|
|||||||
import cn.hutool.v7.core.lang.generator.Generator;
|
import cn.hutool.v7.core.lang.generator.Generator;
|
||||||
import cn.hutool.v7.core.text.StrUtil;
|
import cn.hutool.v7.core.text.StrUtil;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
@ -41,27 +42,41 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||||||
* @author funkye,selfishlover
|
* @author funkye,selfishlover
|
||||||
*/
|
*/
|
||||||
public class SeataSnowflake implements Generator<Long>, Serializable {
|
public class SeataSnowflake implements Generator<Long>, Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认的起始时间,为2020-05-03
|
* 默认的起始时间,为2020-05-03
|
||||||
*/
|
*/
|
||||||
public static final long DEFAULT_TWEPOCH = 1588435200000L;
|
public static final long DEFAULT_TWEPOCH = 1588435200000L;
|
||||||
|
/**
|
||||||
// 节点ID长度
|
* 节点ID长度
|
||||||
|
*/
|
||||||
private static final int NODE_ID_BITS = 10;
|
private static final int NODE_ID_BITS = 10;
|
||||||
/**
|
/**
|
||||||
* 节点ID的最大值,1023
|
* 节点ID的最大值,1023
|
||||||
*/
|
*/
|
||||||
protected static final int MAX_NODE_ID = ~(-1 << NODE_ID_BITS);
|
protected static final int MAX_NODE_ID = ~(-1 << NODE_ID_BITS);
|
||||||
// 时间戳长度
|
/**
|
||||||
|
* 时间戳长度
|
||||||
|
*/
|
||||||
private static final int TIMESTAMP_BITS = 41;
|
private static final int TIMESTAMP_BITS = 41;
|
||||||
// 序列号12位(表示只允许序号的范围为:0-4095)
|
/**
|
||||||
|
* 序列号12位(表示只允许序号的范围为:0-4095)
|
||||||
|
*/
|
||||||
private static final int SEQUENCE_BITS = 12;
|
private static final int SEQUENCE_BITS = 12;
|
||||||
// 时间戳+序号的最大值
|
/**
|
||||||
|
* // 时间戳+序号的最大值
|
||||||
|
*/
|
||||||
private static final long timestampAndSequenceMask = ~(-1L << (TIMESTAMP_BITS + SEQUENCE_BITS));
|
private static final long timestampAndSequenceMask = ~(-1L << (TIMESTAMP_BITS + SEQUENCE_BITS));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ID
|
||||||
|
*/
|
||||||
private long nodeId;
|
private long nodeId;
|
||||||
|
/**
|
||||||
|
* 时间戳+序号
|
||||||
|
*/
|
||||||
private final AtomicLong timestampAndSequence;
|
private final AtomicLong timestampAndSequence;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,6 +22,7 @@ import cn.hutool.v7.core.lang.generator.Generator;
|
|||||||
import cn.hutool.v7.core.lang.tuple.Pair;
|
import cn.hutool.v7.core.lang.tuple.Pair;
|
||||||
import cn.hutool.v7.core.util.RandomUtil;
|
import cn.hutool.v7.core.util.RandomUtil;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -50,39 +51,65 @@ import java.util.Date;
|
|||||||
* @since 3.0.1
|
* @since 3.0.1
|
||||||
*/
|
*/
|
||||||
public class Snowflake implements Generator<Long>, Serializable {
|
public class Snowflake implements Generator<Long>, Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认的起始时间,为Thu, 04 Nov 2010 01:42:54 GMT
|
* 默认的起始时间,为Thu, 04 Nov 2010 01:42:54 GMT
|
||||||
*/
|
*/
|
||||||
public static final long DEFAULT_TWEPOCH = 1288834974657L;
|
public static final long DEFAULT_TWEPOCH = 1288834974657L;
|
||||||
|
/**
|
||||||
|
* 机器ID位数
|
||||||
|
*/
|
||||||
private static final long WORKER_ID_BITS = 5L;
|
private static final long WORKER_ID_BITS = 5L;
|
||||||
/**
|
/**
|
||||||
* 最大支持机器节点数0~31,一共32个
|
* 最大支持机器节点数0~31,一共32个
|
||||||
*/
|
*/
|
||||||
protected static final long MAX_WORKER_ID = ~(-1L << WORKER_ID_BITS);
|
protected static final long MAX_WORKER_ID = ~(-1L << WORKER_ID_BITS);
|
||||||
|
/**
|
||||||
|
* 数据中心ID位数
|
||||||
|
*/
|
||||||
private static final long DATA_CENTER_ID_BITS = 5L;
|
private static final long DATA_CENTER_ID_BITS = 5L;
|
||||||
/**
|
/**
|
||||||
* 最大支持数据中心节点数0~31,一共32个
|
* 最大支持数据中心节点数0~31,一共32个
|
||||||
*/
|
*/
|
||||||
protected static final long MAX_DATA_CENTER_ID = ~(-1L << DATA_CENTER_ID_BITS);
|
protected static final long MAX_DATA_CENTER_ID = ~(-1L << DATA_CENTER_ID_BITS);
|
||||||
// 序列号12位(表示只允许序号的范围为:0-4095)
|
/**
|
||||||
|
* 序列号12位(表示只允许序号的范围为:0-4095)
|
||||||
|
*/
|
||||||
private static final long SEQUENCE_BITS = 12L;
|
private static final long SEQUENCE_BITS = 12L;
|
||||||
// 机器节点左移12位
|
/**
|
||||||
|
* 机器节点左移12位
|
||||||
|
*/
|
||||||
private static final long WORKER_ID_SHIFT = SEQUENCE_BITS;
|
private static final long WORKER_ID_SHIFT = SEQUENCE_BITS;
|
||||||
// 数据中心节点左移17位
|
/**
|
||||||
|
* 数据中心节点左移17位
|
||||||
|
*/
|
||||||
private static final long DATA_CENTER_ID_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS;
|
private static final long DATA_CENTER_ID_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS;
|
||||||
// 时间毫秒数左移22位
|
/**
|
||||||
|
* 时间毫秒数左移22位
|
||||||
|
*/
|
||||||
private static final long TIMESTAMP_LEFT_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS + DATA_CENTER_ID_BITS;
|
private static final long TIMESTAMP_LEFT_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS + DATA_CENTER_ID_BITS;
|
||||||
// 序列掩码,用于限定序列最大值不能超过4095
|
/**
|
||||||
|
* 序列掩码,用于限定序列最大值不能超过4095
|
||||||
|
*/
|
||||||
private static final long SEQUENCE_MASK = ~(-1L << SEQUENCE_BITS);// 4095
|
private static final long SEQUENCE_MASK = ~(-1L << SEQUENCE_BITS);// 4095
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化时间点
|
* 初始化时间点
|
||||||
*/
|
*/
|
||||||
private final long twepoch;
|
private final long twepoch;
|
||||||
|
/**
|
||||||
|
* 工作节点ID
|
||||||
|
*/
|
||||||
private final long workerId;
|
private final long workerId;
|
||||||
|
/**
|
||||||
|
* 数据中心ID
|
||||||
|
*/
|
||||||
private final long dataCenterId;
|
private final long dataCenterId;
|
||||||
|
/**
|
||||||
|
* 是否使用{@link SystemClock} 获取当前
|
||||||
|
*/
|
||||||
private final boolean useSystemClock;
|
private final boolean useSystemClock;
|
||||||
/**
|
/**
|
||||||
* 当在低频模式下时,序号始终为0,导致生成ID始终为偶数<br>
|
* 当在低频模式下时,序号始终为0,导致生成ID始终为偶数<br>
|
||||||
@ -96,6 +123,9 @@ public class Snowflake implements Generator<Long>, Serializable {
|
|||||||
* 自增序号,当高频模式下时,同一毫秒内生成N个ID,则这个序号在同一毫秒下,自增以避免ID重复。
|
* 自增序号,当高频模式下时,同一毫秒内生成N个ID,则这个序号在同一毫秒下,自增以避免ID重复。
|
||||||
*/
|
*/
|
||||||
private long sequence = 0L;
|
private long sequence = 0L;
|
||||||
|
/**
|
||||||
|
* 上次生成ID的时间戳
|
||||||
|
*/
|
||||||
private long lastTimestamp = -1L;
|
private long lastTimestamp = -1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,10 +24,7 @@ import cn.hutool.v7.core.lang.Assert;
|
|||||||
import cn.hutool.v7.core.util.CharsetUtil;
|
import cn.hutool.v7.core.util.CharsetUtil;
|
||||||
import cn.hutool.v7.core.util.ObjUtil;
|
import cn.hutool.v7.core.util.ObjUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.Reader;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.io.StringReader;
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -42,13 +39,16 @@ import java.util.Objects;
|
|||||||
* @since 5.0.4
|
* @since 5.0.4
|
||||||
*/
|
*/
|
||||||
public class CsvBaseReader implements Serializable {
|
public class CsvBaseReader implements Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认编码
|
* 默认编码
|
||||||
*/
|
*/
|
||||||
protected static final Charset DEFAULT_CHARSET = CharsetUtil.UTF_8;
|
protected static final Charset DEFAULT_CHARSET = CharsetUtil.UTF_8;
|
||||||
|
/**
|
||||||
|
* 读取配置
|
||||||
|
*/
|
||||||
private final CsvReadConfig config;
|
private final CsvReadConfig config;
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------- Constructor start
|
//--------------------------------------------------------------------------------------------- Constructor start
|
||||||
|
@ -18,6 +18,7 @@ package cn.hutool.v7.poi.csv;
|
|||||||
|
|
||||||
import cn.hutool.v7.core.collection.ListUtil;
|
import cn.hutool.v7.core.collection.ListUtil;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -28,9 +29,16 @@ import java.util.List;
|
|||||||
* @author Looly
|
* @author Looly
|
||||||
*/
|
*/
|
||||||
public class CsvData implements Iterable<CsvRow>, Serializable {
|
public class CsvData implements Iterable<CsvRow>, Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头信息
|
||||||
|
*/
|
||||||
private final List<String> header;
|
private final List<String> header;
|
||||||
|
/**
|
||||||
|
* 行数据
|
||||||
|
*/
|
||||||
private final List<CsvRow> rows;
|
private final List<CsvRow> rows;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,10 +24,7 @@ import cn.hutool.v7.core.text.StrTrimer;
|
|||||||
import cn.hutool.v7.core.text.StrUtil;
|
import cn.hutool.v7.core.text.StrUtil;
|
||||||
import cn.hutool.v7.core.util.ObjUtil;
|
import cn.hutool.v7.core.util.ObjUtil;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.Reader;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,11 +33,18 @@ import java.util.*;
|
|||||||
* @author Looly
|
* @author Looly
|
||||||
*/
|
*/
|
||||||
public final class CsvParser extends ComputeIter<CsvRow> implements Closeable, Serializable {
|
public final class CsvParser extends ComputeIter<CsvRow> implements Closeable, Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private static final int DEFAULT_ROW_CAPACITY = 10;
|
private static final int DEFAULT_ROW_CAPACITY = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取配置
|
||||||
|
*/
|
||||||
private final CsvReadConfig config;
|
private final CsvReadConfig config;
|
||||||
|
/**
|
||||||
|
* Tokener
|
||||||
|
*/
|
||||||
private final CsvTokener tokener;
|
private final CsvTokener tokener;
|
||||||
/**
|
/**
|
||||||
* 前一个特殊分界字符
|
* 前一个特殊分界字符
|
||||||
|
@ -25,6 +25,7 @@ import cn.hutool.v7.core.io.file.PathUtil;
|
|||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
import java.io.Serial;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -38,8 +39,12 @@ import java.util.stream.StreamSupport;
|
|||||||
* @since 4.0.1
|
* @since 4.0.1
|
||||||
*/
|
*/
|
||||||
public class CsvReader extends CsvBaseReader implements Iterable<CsvRow>, Closeable {
|
public class CsvReader extends CsvBaseReader implements Iterable<CsvRow>, Closeable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link Reader}
|
||||||
|
*/
|
||||||
private final Reader reader;
|
private final Reader reader;
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------- Constructor start
|
//--------------------------------------------------------------------------------------------- Constructor start
|
||||||
|
@ -19,6 +19,7 @@ package cn.hutool.v7.poi.excel;
|
|||||||
import org.apache.poi.ss.usermodel.CellStyle;
|
import org.apache.poi.ss.usermodel.CellStyle;
|
||||||
import cn.hutool.v7.core.collection.CollUtil;
|
import cn.hutool.v7.core.collection.CollUtil;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -32,6 +33,7 @@ import java.util.List;
|
|||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
public class RowGroup implements Serializable {
|
public class RowGroup implements Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,8 +46,17 @@ public class RowGroup implements Serializable {
|
|||||||
return new RowGroup(name);
|
return new RowGroup(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组名称
|
||||||
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
/**
|
||||||
|
* 样式
|
||||||
|
*/
|
||||||
private CellStyle style;
|
private CellStyle style;
|
||||||
|
/**
|
||||||
|
* 子分组
|
||||||
|
*/
|
||||||
private List<RowGroup> children;
|
private List<RowGroup> children;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,44 +45,78 @@ public class SheetDataSaxHandler extends DefaultHandler {
|
|||||||
* 行处理器
|
* 行处理器
|
||||||
*/
|
*/
|
||||||
protected RowHandler rowHandler;
|
protected RowHandler rowHandler;
|
||||||
// 配置项:是否对齐数据,即在行尾补充null cell
|
/**
|
||||||
|
*/
|
||||||
private final boolean padCellAtEndOfRow;
|
private final boolean padCellAtEndOfRow;
|
||||||
|
|
||||||
// 单元格的格式表,对应style.xml
|
/**
|
||||||
|
* 单元格的格式表,对应style.xml
|
||||||
|
*/
|
||||||
protected StylesTable stylesTable;
|
protected StylesTable stylesTable;
|
||||||
// excel 2007 的共享字符串表,对应sharedString.xml
|
/**
|
||||||
|
* excel 2007 的共享字符串表,对应sharedString.xml
|
||||||
|
*/
|
||||||
protected SharedStrings sharedStrings;
|
protected SharedStrings sharedStrings;
|
||||||
// sheet的索引,从0开始
|
/**
|
||||||
|
* sheet索引,从0开始
|
||||||
|
*/
|
||||||
protected int sheetIndex;
|
protected int sheetIndex;
|
||||||
|
/**
|
||||||
// 当前非空行
|
* 当前非空行索引,从0开始
|
||||||
|
*/
|
||||||
protected int index;
|
protected int index;
|
||||||
// 当前列
|
/**
|
||||||
|
* 当前列坐标
|
||||||
|
*/
|
||||||
private int curCell;
|
private int curCell;
|
||||||
// 单元数据类型
|
/**
|
||||||
|
* 单元格数据类型
|
||||||
|
*/
|
||||||
private CellDataType cellDataType;
|
private CellDataType cellDataType;
|
||||||
// 当前行号,从0开始
|
/**
|
||||||
|
* 当前行号,从0开始
|
||||||
|
*/
|
||||||
private long rowNumber;
|
private long rowNumber;
|
||||||
// 当前列坐标, 如A1,B5
|
/**
|
||||||
|
* 当前列坐标, 如A1,B5
|
||||||
|
*/
|
||||||
private String curCoordinate;
|
private String curCoordinate;
|
||||||
// 当前节点名称
|
/**
|
||||||
|
* 当前节点名称
|
||||||
|
*/
|
||||||
private ElementName curElementName;
|
private ElementName curElementName;
|
||||||
// 前一个列的坐标
|
/**
|
||||||
|
* 前一个列的坐标
|
||||||
|
*/
|
||||||
private String preCoordinate;
|
private String preCoordinate;
|
||||||
// 行的最大列坐标
|
/**
|
||||||
|
* 行的最大列坐标
|
||||||
|
*/
|
||||||
private String maxCellCoordinate;
|
private String maxCellCoordinate;
|
||||||
// 单元格样式
|
/**
|
||||||
|
* 单元格样式
|
||||||
|
*/
|
||||||
private XSSFCellStyle xssfCellStyle;
|
private XSSFCellStyle xssfCellStyle;
|
||||||
// 单元格存储的格式化字符串,nmtFmt的formatCode属性的值
|
/**
|
||||||
|
* 单元格存储的格式化字符串,nmtFmt的formatCode属性的值
|
||||||
|
*/
|
||||||
private String numFmtString;
|
private String numFmtString;
|
||||||
// 是否处于sheetData标签内,sax只解析此标签内的内容,其它标签忽略
|
/**
|
||||||
|
* 是否处于sheetData标签内,sax只解析此标签内的内容,其它标签忽略
|
||||||
|
*/
|
||||||
private boolean isInSheetData;
|
private boolean isInSheetData;
|
||||||
|
|
||||||
// 上一次的内容
|
/**
|
||||||
|
* 上一次的内容
|
||||||
|
*/
|
||||||
private final StringBuilder lastContent = new StringBuilder();
|
private final StringBuilder lastContent = new StringBuilder();
|
||||||
// 上一次的内容
|
/**
|
||||||
|
* 上一次的公式
|
||||||
|
*/
|
||||||
private final StringBuilder lastFormula = new StringBuilder();
|
private final StringBuilder lastFormula = new StringBuilder();
|
||||||
// 存储每行的列元素
|
/**
|
||||||
|
* 存储每行的列元素
|
||||||
|
*/
|
||||||
private List<Object> rowCellList = new ArrayList<>();
|
private List<Object> rowCellList = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
|
|
||||||
package cn.hutool.v7.poi.excel.style;
|
package cn.hutool.v7.poi.excel.style;
|
||||||
|
|
||||||
|
import cn.hutool.v7.core.util.ObjUtil;
|
||||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||||
import org.apache.poi.ss.usermodel.CellStyle;
|
import org.apache.poi.ss.usermodel.CellStyle;
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
import cn.hutool.v7.core.util.ObjUtil;
|
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,6 +31,7 @@ import java.io.Serializable;
|
|||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
public class CellBorderStyle implements Serializable {
|
public class CellBorderStyle implements Serializable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,15 +71,47 @@ public class CellBorderStyle implements Serializable {
|
|||||||
.setLeftColor(colorIndex.getIndex());
|
.setLeftColor(colorIndex.getIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部边框样式定义,如细线、粗线、虚线等
|
||||||
|
*/
|
||||||
private BorderStyle topStyle;
|
private BorderStyle topStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部边框颜色索引值,用于指定颜色主题或调色板中的颜色
|
||||||
|
*/
|
||||||
private Short topColor;
|
private Short topColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右侧边框样式定义,如细线、粗线、虚线等
|
||||||
|
*/
|
||||||
private BorderStyle rightStyle;
|
private BorderStyle rightStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右侧边框颜色索引值,用于指定颜色主题或调色板中的颜色
|
||||||
|
*/
|
||||||
private Short rightColor;
|
private Short rightColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 底部边框样式定义,如细线、粗线、虚线等
|
||||||
|
*/
|
||||||
private BorderStyle bottomStyle;
|
private BorderStyle bottomStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 底部边框颜色索引值,用于指定颜色主题或调色板中的颜色
|
||||||
|
*/
|
||||||
private Short bottomColor;
|
private Short bottomColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 左侧边框样式定义,如细线、粗线、虚线等
|
||||||
|
*/
|
||||||
private BorderStyle leftStyle;
|
private BorderStyle leftStyle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 左侧边框颜色索引值,用于指定颜色主题或调色板中的颜色
|
||||||
|
*/
|
||||||
private Short leftColor;
|
private Short leftColor;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取上边框的样式。
|
* 获取上边框的样式。
|
||||||
*
|
*
|
||||||
|
@ -27,11 +27,7 @@ import org.ofdrw.layout.element.Img;
|
|||||||
import org.ofdrw.layout.element.Paragraph;
|
import org.ofdrw.layout.element.Paragraph;
|
||||||
import org.ofdrw.reader.OFDReader;
|
import org.ofdrw.reader.OFDReader;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.*;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,8 +37,12 @@ import java.nio.file.Path;
|
|||||||
* @since 5.5.3
|
* @since 5.5.3
|
||||||
*/
|
*/
|
||||||
public class OfdWriter implements Serializable, Closeable {
|
public class OfdWriter implements Serializable, Closeable {
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OFD文档
|
||||||
|
*/
|
||||||
private final OFDDoc doc;
|
private final OFDDoc doc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user