Skip to content

Commit 05e0d09

Browse files
committed
Added documentation for fj-doc-lib-simpletable
1 parent 6c8b989 commit 05e0d09

File tree

3 files changed

+51
-5
lines changed

3 files changed

+51
-5
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,20 @@ There are five kinds of components (each components README.md contains module st
3333
* [FO](fj-doc-mod-fop/src/main/java/org/fugerit/java/doc/mod/fop/FreeMarkerFopTypeHandler.java) - (fj-doc-mod-fop) - output as FO using Apache FOP
3434
* [CSV](fj-doc-mod-opencsv/src/main/java/org/fugerit/java/doc/mod/opencsv/OpenCSVTypeHandler.java) - (fj-doc-mod-opencsv) - output as CSV using OpenCSV
3535

36-
### 4. Tutorial :
36+
### 4. Bundled libraries :
37+
* [Simple table (fj-doc-lib-singletable)](fj-doc-lib-simpletable/README.md) - offers a simple API for creating a document made of a table.
38+
39+
### 5. Tutorial :
3740
* [Samples and Quickstart (fj-doc-sample)](fj-doc-sample/README.md)
3841

39-
### 5. Extension Type Handlers (Extension renders) :
42+
### 6. Extension Type Handlers (Extension renders) :
4043
Basically the same as type handlers but based on libraries non available on Maven Repository Central (es. PDFLIB).
4144
You can find in them in a dedicated repository [fj-doc-ext](https://gitlab.com/fugerit-org/fj-doc-ext)
4245

43-
### 5. Incubator Type Handlers (Are too far from being complete) :
46+
### 7. Incubator Type Handlers (Are too far from being complete) :
4447
* [Apache PdfBox Renderer (PDF)(fj-doc-mod-pdfbox)](https://github.com/fugerit-org/fj-doc-mod-pdfbox.git) (incubator since version 0.5.0)
4548

46-
### 6. Deprecated Type Handlers (Will not be maintained) :
49+
### 8. Deprecated Type Handlers (Will not be maintained) :
4750
* [JXL Renderer (XLS)(fj-doc-mod-jxl)](https://github.com/fugerit-org/fj-doc-mod-jxl.git) (deprecated as [jexcelapi](https://jexcelapi.sourceforge.net/) is no longer mantained, may be used 'AS IS') (deprecated since version 0.5.0)
4851
* [Itext 2.X Renderer (PDF/RTF/HTML)(fj-doc-mod-jxl)](https://github.com/fugerit-org/fj-doc-mod-itext.git) (deprecated as [IText 2.1.X](https://mvnrepository.com/artifact/com.lowagie/itext/2.1.7) is no longer mantained, may be used 'AS IS') (deprecated since version 0.5.0)
4952
* [Java EE extension (fj-doc-ent)](https://github.com/fugerit-org/fj-doc-ent.git)) (deprecated as not the module fj-mod-freemarker provided mostly the same features, but in a standalone mode) (deprecated since version 0.5.0)

fj-doc-lib-simpletable/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Fugerit Document Generation Framework (fj-doc)
2+
3+
## Bundle library : simple table (fj-doc-lib-simpletable)
4+
5+
[back to fj-doc index](../README.md)
6+
7+
*Description* :
8+
This is the first of a series of bundled libraries using fj-doc framework for specific tasks.
9+
10+
*Status* :
11+
All basic features are implemented.
12+
13+
14+
*Quickstart* :
15+
This module is already configured, and can be called just creating the model of the table to be rendered and providing a TypeHandler.
16+
17+
```
18+
19+
OutputStream os = ....
20+
DocTypeHandler handler = ...
21+
22+
// the table model
23+
SimpleTable simpleTableModel = new SimpleTable( "30;30;40" );
24+
SimpleRow headerRow = new SimpleRow( BooleanUtils.BOOLEAN_TRUE );
25+
headerRow.addCell( "Name" );
26+
headerRow.addCell( "Surname" );
27+
headerRow.addCell( "Title" );
28+
simpleTableModel.addRow( headerRow );
29+
SimpleRow luthienRow = new SimpleRow();
30+
luthienRow.addCell( "Luthien" );
31+
luthienRow.addCell( "Tinuviel" );
32+
luthienRow.addCell( "Queen" );
33+
simpleTableModel.addRow( luthienRow );
34+
SimpleRow thorinRow = new SimpleRow();
35+
thorinRow.addCell( "Thorin" );
36+
thorinRow.addCell( "Oakshield" );
37+
thorinRow.addCell( "King" );
38+
simpleTableModel.addRow( thorinRow );
39+
40+
SimpleTableDocConfig docConfig = SimpleTableDocConfig.newConfig();
41+
docConfig.processSimpleTable(simpleTableModel, handler, os);
42+
43+
```

fj-doc-sample/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Fugerit Document Generation Framework (fj-doc)
1+
fj-doc-lib-singletable# Fugerit Document Generation Framework (fj-doc)
22

33
## Samples and Quickstart (fj-doc-sample)
44

0 commit comments

Comments
 (0)