Skip to content

Commit 19b2c6e

Browse files
committed
Fix groovydocs for TableItem
1 parent afbd450 commit 19b2c6e

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/main/groovy/geoscript/carto/TableItem.groovy

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ package geoscript.carto
33
import java.awt.Font
44
import java.awt.Color
55

6+
/**
7+
* Add table to a cartographic document
8+
* @author Jared Erickson
9+
*/
610
class TableItem extends Item {
711

812
List<String> columns = []
@@ -30,20 +34,42 @@ class TableItem extends Item {
3034
strokeColor: Color.BLACK
3135
)
3236

37+
/**
38+
* Create table from the top left with the given width and height.
39+
* @param x The number of pixels from the left
40+
* @param y The number of pixels from the top
41+
* @param width The width in pixels
42+
* @param height The height in pixels
43+
*/
3344
TableItem(int x, int y, int width, int height) {
3445
super(x, y, width, height)
3546
}
3647

48+
/**
49+
* Set the columns of the table
50+
* @param names The column names
51+
* @return The TableItem
52+
*/
3753
TableItem columns(List<String> names) {
3854
this.columns.addAll(names)
3955
this
4056
}
4157

58+
/**
59+
* Add a column to the table
60+
* @param name The column name
61+
* @return The TableItem
62+
*/
4263
TableItem column(String name) {
4364
this.columns.add(name)
4465
this
4566
}
4667

68+
/**
69+
* Add a row to the table
70+
* @param values A Map of values
71+
* @return The TableItem
72+
*/
4773
TableItem row(Map values) {
4874
rows.add(values)
4975
this

0 commit comments

Comments
 (0)