File tree Expand file tree Collapse file tree 4 files changed +30
-4
lines changed
java/org/fugerit/java/doc/lib/simpletable/model
resources/fj_doc_lib_simpletable/template Expand file tree Collapse file tree 4 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 1
- 0.5.9 (2022-12-11)
1
+ 0.5.9 (2022-12-12)
2
+ ------------------
3
+ + Added support for maximum table width in simpletable module
4
+
5
+ 0.5.9 (2022-12-11)
2
6
------------------
3
7
+ Added support for style and align in simpletable module
4
8
Original file line number Diff line number Diff line change 1
1
# Changelog for module fj-doc-lib-simpletable
2
2
3
+ ## version 0.5.10 - 2022-12-12
4
+ * Added maximum table width
5
+
3
6
## version 0.5.9 - 2022-12-11
4
7
* Added support for cell style and align
Original file line number Diff line number Diff line change @@ -12,8 +12,12 @@ public class SimpleTable {
12
12
13
13
public static final String DEFAULT_SHEET_NAME = "Table" ;
14
14
15
+ public static final String DEFAULT_TABLE_WIDTH = "100" ;
16
+
15
17
public static final int DEFAULT_BORDER_WIDTH = 0 ;
16
18
19
+ private String tableWidth ;
20
+
17
21
private String columns ;
18
22
19
23
private String sheetName ;
@@ -41,6 +45,7 @@ public SimpleTable( String colwidths ) {
41
45
this .colwidths = colwidths ;
42
46
this .sheetName = DEFAULT_SHEET_NAME ;
43
47
this .defaultBorderWidth = DEFAULT_BORDER_WIDTH ;
48
+ this .tableWidth = DEFAULT_TABLE_WIDTH ;
44
49
}
45
50
46
51
public void addRow ( SimpleRow row ) {
@@ -79,4 +84,18 @@ public void setDefaultBorderWidth(int defaultBorderWidth) {
79
84
this .defaultBorderWidth = defaultBorderWidth ;
80
85
}
81
86
87
+ public String getTableWidth () {
88
+ return tableWidth ;
89
+ }
90
+
91
+ public SimpleTable withTableWidth ( String tableWidth ) {
92
+ this .tableWidth = tableWidth ;
93
+ return this ;
94
+ }
95
+
96
+ public SimpleTable withSheetName ( String tableWidth ) {
97
+ this .tableWidth = tableWidth ;
98
+ return this ;
99
+ }
100
+
82
101
}
Original file line number Diff line number Diff line change 6
6
<metadata >
7
7
<info name =" default-font-size" >10</info >
8
8
<!-- for xlsx format -->
9
- <info name =" excel-table-id" >excel -table=${simpleTableModel.sheetName} </info >
9
+ <info name =" excel-table-id" >simple -table=${simpleTableModel.sheetName} </info >
10
10
<info name =" excel-try-autoresize" >true</info >
11
11
<!-- for cvs format -->
12
- <info name =" csv-table-id" >excel -table</info >
12
+ <info name =" csv-table-id" >simple -table</info >
13
13
<!-- for fixed size formats, like pdf -->
14
14
<info name =" page-width" >29.7cm</info >
15
15
<info name =" page-height" >21cm</info >
16
16
</metadata >
17
17
<body >
18
18
19
- <table columns =" ${simpleTableModel.columns}" colwidths =" ${simpleTableModel.colwidths}" width =" 100 " id =" excel -table" padding =" 2" >
19
+ <table columns =" ${simpleTableModel.columns}" colwidths =" ${simpleTableModel.colwidths}" width =" ${simpleTableModel.tableWidth} " id =" simple -table" padding =" 2" >
20
20
<#list simpleTableModel.rows as simpleRow >
21
21
<row header =" ${simpleRow.head}" >
22
22
<#list simpleRow.cells as simpleCell >
You can’t perform that action at this time.
0 commit comments