add some diagnostics in case of table error
This commit is contained in:
parent
0162464b0f
commit
ba25c5ed3b
6 changed files with 23 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
group = org.xbib.graphics
|
||||
name = graphics
|
||||
version = 4.5.8
|
||||
version = 4.5.9
|
||||
|
||||
org.gradle.warning.mode = ALL
|
||||
|
|
|
@ -236,4 +236,9 @@ public abstract class AbstractCell implements Cell {
|
|||
}
|
||||
|
||||
protected abstract Renderer createDefaultRenderer();
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AbstractCell";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ public class Column {
|
|||
|
||||
private float width;
|
||||
|
||||
Column(final float width) {
|
||||
Column(float width) {
|
||||
if (width < 0) {
|
||||
throw new IllegalArgumentException("Column width must be non-negative");
|
||||
}
|
||||
|
@ -42,4 +42,9 @@ public class Column {
|
|||
public Column getNext() {
|
||||
return next;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Column[width=" + width +"]";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,6 +88,10 @@ public class Row {
|
|||
this.height += (this.height / (heightOfHighestCell - rowSpanSizeDifference)) * rowSpanSizeDifference;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return cells.toString();
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
|
|
@ -285,7 +285,8 @@ public class Table {
|
|||
public Table build() {
|
||||
if (getNumberOfRegularCells() != getNumberOfSpannedCells()) {
|
||||
throw new TableSetupException("Number of table cells does not match with table setup. " +
|
||||
"This could be due to row or col spanning not being correct");
|
||||
"Number of regular cells = " + getNumberOfRegularCells() + ", number of spanned cells = " + getNumberOfSpannedCells() +
|
||||
". This could be due to row or col spanning not being correct. Rows = " + rows);
|
||||
}
|
||||
Table table = new Table(rows, columns, rowSpanCells);
|
||||
table.setSettings(parameters);
|
||||
|
|
|
@ -23,6 +23,11 @@ public class TextCell extends AbstractTextCell {
|
|||
return text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Cell:" + getText() + "[colspan=" + getColSpan() + ",rowspan=" + getRowSpan() + "]";
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue