public class FigureProducer extends Object
header1 | header2 | ... ------------------------ entry1 | entry2 | ... ...Each column has a ColumnDescriptor and a table consists of column-descriptors and values for the rows, e.g. as follows:
Table table=new Table("Table caption",
// left-aligned, non-emphasized column
new ColumnDescriptor("header1", Alignment.LEFT, false),
// a column with numerical values and 5 digits after the dot
new ColumnDescriptor("header2", "##.#####"));
table.addRow("blah",7);
table.addRow("blub",8.876);
Tables can be rendered as Latex-tables and as JPG graphics as follows:
FigureProducer.latexTable(table,"output.tex"); FigureProducer.figure(table,"output.jpg");
| Modifier and Type | Class and Description |
|---|---|
static class |
FigureProducer.Alignment
Alignment within a cell (left/right/center)
|
static class |
FigureProducer.ColumnDescriptor
describes a column
|
static class |
FigureProducer.Table
Holds table data
|
| Constructor and Description |
|---|
FigureProducer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
figure(FigureProducer.Table table,
File output)
Writes a neat figure to a jpg file for a table
|
static String |
latexTable(FigureProducer.Table table)
Produces a latex table for a table
|
static void |
latexTable(FigureProducer.Table table,
File output)
Produces a latex table and stores it in a file
|
static void |
main(String[] args)
Test method
|
public static String latexTable(FigureProducer.Table table)
public static void latexTable(FigureProducer.Table table, File output) throws IOException
IOExceptionpublic static void figure(FigureProducer.Table table, File output) throws IOException
IOExceptionCopyright © 2018. All rights reserved.