[]
将此类与 PdfSaveOptions.getBorderOptions() 一起使用,可以在工作簿导出为 PDF 时重写应用于特定 BorderLineStyle 的宽度和虚线模式。使用 setBorderWidth(double) 配置边框宽度,并使用 setDashes(ArrayList) 定义虚线线段。
PdfSaveOptions options = new PdfSaveOptions();
CustomBorderStyle borderStyle = new CustomBorderStyle();
ArrayList<Double> dashes = new ArrayList<>();
dashes.add(3.0);
dashes.add(1.5);
borderStyle.setBorderWidth(0.4);
borderStyle.setDashes(dashes);
options.getBorderOptions().put(BorderLineStyle.Dashed, borderStyle);
final doublefinal voidsetBorderWidth(double value) final void使用此方法可在通过 PdfSaveOptions.getBorderOptions() 应用样式前,获取为此边框样式配置的自定义宽度。
PdfSaveOptions options = new PdfSaveOptions();
CustomBorderStyle borderStyle = new CustomBorderStyle();
borderStyle.setBorderWidth(0.4);
options.getBorderOptions().put(BorderLineStyle.Thin, borderStyle);
double borderWidth = options.getBorderOptions().get(BorderLineStyle.Thin).getBorderWidth();
0。将此方法与 PdfSaveOptions.getBorderOptions() 一起使用,可以重写 PDF 导出期间应用于特定 BorderLineStyle 的宽度。
PdfSaveOptions options = new PdfSaveOptions();
CustomBorderStyle borderStyle = new CustomBorderStyle();
borderStyle.setBorderWidth(0.4);
options.getBorderOptions().put(BorderLineStyle.Thin, borderStyle);
double borderWidth = options.getBorderOptions().get(BorderLineStyle.Thin).getBorderWidth();
value - PDF 导出期间要应用的边框宽度。返回列表中的每一项都记录为 PDF 导出配置的虚线模式中一个线段的长度。
PdfSaveOptions options = new PdfSaveOptions();
CustomBorderStyle borderStyle = new CustomBorderStyle();
ArrayList<Double> dashes = new ArrayList<>();
dashes.add(3.0);
dashes.add(1.5);
borderStyle.setDashes(dashes);
options.getBorderOptions().put(BorderLineStyle.Dashed, borderStyle);
ArrayList<Double> dashPattern = options.getBorderOptions().get(BorderLineStyle.Dashed).getDashes();
null。列表中的每个值都记录虚线模式中一个线段的长度。将此方法与 PdfSaveOptions.getBorderOptions() 一起使用,可以配置 PDF 导出期间特定 BorderLineStyle 的呈现方式。
PdfSaveOptions options = new PdfSaveOptions();
CustomBorderStyle borderStyle = new CustomBorderStyle();
ArrayList<Double> dashes = new ArrayList<>();
dashes.add(3.0);
dashes.add(1.5);
borderStyle.setDashes(dashes);
options.getBorderOptions().put(BorderLineStyle.Dashed, borderStyle);
ArrayList<Double> dashPattern = options.getBorderOptions().get(BorderLineStyle.Dashed).getDashes();
value - 记录虚线模式中每个线段长度的列表。此值可以为 null。