This is an automated email from the ASF dual-hosted git repository.
delei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fesod.git
The following commit(s) were added to refs/heads/main by this push:
new 5f307661 fix: correct wrong class reference in website documentation
(#838)
5f307661 is described below
commit 5f3076614738770fb02075cd2610bb2ae1c78a9f
Author: 蹦蹦巴拉巴拉蹦 <[email protected]>
AuthorDate: Thu Jan 29 00:18:39 2026 +0800
fix: correct wrong class reference in website documentation (#838)
---
website/docs/sheet/help/faq.md | 46 +++++++++++++++++++---
.../current/sheet/help/faq.md | 46 +++++++++++++++++++---
2 files changed, 82 insertions(+), 10 deletions(-)
diff --git a/website/docs/sheet/help/faq.md b/website/docs/sheet/help/faq.md
index 5f672fa3..55f63be2 100644
--- a/website/docs/sheet/help/faq.md
+++ b/website/docs/sheet/help/faq.md
@@ -122,9 +122,21 @@ This section describes common issues that may arise when
using this project.
- **A:** You can customize cell styles by implementing the `WriteHandler`
interface. For example:
```java
- public class CustomCellStyleWriteHandler extends
AbstractCellStyleWriteHandler {
+ public class CustomCellStyleWriteHandler extends AbstractCellStyleStrategy {
+
@Override
- protected void setCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
+ public int order() {
+ // Customize the execution order
+ return OrderConstant.SHEET_ORDER;
+ }
+
+ @Override
+ protected void setHeadCellStyle(CellWriteHandlerContext context) {
+ // Customize the head cell style
+ }
+
+ @Override
+ protected void setContentCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
CellStyle style = cell.getSheet().getWorkbook().createCellStyle();
style.setFillForegroundColor(IndexedColors.RED.getIndex());
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
@@ -274,7 +286,14 @@ This section describes common issues that may arise when
using this project.
- **A:** You can customize the header style by implementing the `WriteHandler`
interface. For example:
```java
- public class CustomHeadStyleWriteHandler extends
AbstractHeadStyleWriteHandler {
+ public class CustomHeadStyleWriteHandler extends AbstractCellStyleStrategy {
+
+ @Override
+ public int order() {
+ // Customize the execution order
+ return OrderConstant.SHEET_ORDER;
+ }
+
@Override
protected void setHeadCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
CellStyle style = cell.getSheet().getWorkbook().createCellStyle();
@@ -282,6 +301,11 @@ This section describes common issues that may arise when
using this project.
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cell.setCellStyle(style);
}
+
+ @Override
+ protected void setContentCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
+ // Customize the content cell style
+ }
}
```
@@ -316,9 +340,21 @@ This section describes common issues that may arise when
using this project.
- **A:** You can set the font by creating a `Font` object and applying it to
the `CellStyle`. For example:
```java
- public class CustomFontWriteHandler extends AbstractCellStyleWriteHandler {
+ public class CustomFontWriteHandler extends AbstractCellStyleStrategy {
+
+ @Override
+ public int order() {
+ // Customize the execution order
+ return OrderConstant.SHEET_ORDER;
+ }
+
+ @Override
+ protected void setHeadCellStyle(CellWriteHandlerContext context) {
+ // Customize the head cell style
+ }
+
@Override
- protected void setCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
+ protected void setContentCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
Workbook workbook = cell.getSheet().getWorkbook();
Font font = workbook.createFont();
font.setFontName("Arial");
diff --git
a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/faq.md
b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/faq.md
index d4cde4eb..504f26be 100644
---
a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/faq.md
+++
b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/faq.md
@@ -107,9 +107,21 @@ title: '常见问题'
- **A:** 可以通过实现`WriteHandler`接口来自定义单元格样式。例如:
```java
- public class CustomCellStyleWriteHandler extends
AbstractCellStyleWriteHandler {
+ public class CustomCellStyleWriteHandler extends AbstractCellStyleStrategy {
+
@Override
- protected void setCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
+ public int order() {
+ // 自定义执行顺序
+ return OrderConstant.SHEET_ORDER;
+ }
+
+ @Override
+ protected void setHeadCellStyle(CellWriteHandlerContext context) {
+ // 自定义表头单元格样式
+ }
+
+ @Override
+ protected void setContentCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
CellStyle style = cell.getSheet().getWorkbook().createCellStyle();
style.setFillForegroundColor(IndexedColors.RED.getIndex());
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
@@ -257,7 +269,14 @@ title: '常见问题'
- **A:** 可以通过实现`WriteHandler`接口来自定义表头样式。例如:
```java
- public class CustomHeadStyleWriteHandler extends
AbstractHeadStyleWriteHandler {
+ public class CustomHeadStyleWriteHandler extends AbstractCellStyleStrategy {
+
+ @Override
+ public int order() {
+ // 自定义执行顺序
+ return OrderConstant.SHEET_ORDER;
+ }
+
@Override
protected void setHeadCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
CellStyle style = cell.getSheet().getWorkbook().createCellStyle();
@@ -265,6 +284,11 @@ title: '常见问题'
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cell.setCellStyle(style);
}
+
+ @Override
+ protected void setContentCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
+ // 自定义内容单元格样式
+ }
}
```
@@ -299,9 +323,21 @@ title: '常见问题'
- **A:** 可以通过创建`Font`对象并应用到`CellStyle`中来设置字体。例如:
```java
- public class CustomFontWriteHandler extends AbstractCellStyleWriteHandler {
+ public class CustomFontWriteHandler extends AbstractCellStyleStrategy {
+
+ @Override
+ public int order() {
+ // 自定义执行顺序
+ return OrderConstant.SHEET_ORDER;
+ }
+
+ @Override
+ protected void setHeadCellStyle(CellWriteHandlerContext context) {
+ // 自定义表头单元格样式
+ }
+
@Override
- protected void setCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
+ protected void setContentCellStyle(Cell cell, Head head, Integer
relativeRowIndex) {
Workbook workbook = cell.getSheet().getWorkbook();
Font font = workbook.createFont();
font.setFontName("Arial");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]