Add empty rows to the end of related list and list view tables.
authorBen Konrath <ben@bagu.org>
Fri, 30 Sep 2011 13:25:14 +0000 (15:25 +0200)
committerBen Konrath <ben@bagu.org>
Fri, 30 Sep 2011 13:25:14 +0000 (15:25 +0200)
commit5928d77655dad5a43175c8b75decc0b638fd1651
treebcaf7a1ac75365950529c8b7176d1d8bd794a274
parentd882e4747831559360c3f46e4936e453aa0fbf8e
Add empty rows to the end of related list and list view tables.

I also extracted the cell rendering classes from the ListTable because
the code was becoming a little crazy with all the anonymous inner
classes. My plan is to use these cell rendering classes in the details
view as well so this refactor will be needed for that change.

* src/main/java/org/glom/web/client/activity/DetailsActivity.java: Only
set the row count in related list tables if the data has more rows
than the minimum number of rows visible.
* src/main/java/org/glom/web/client/ui/ListViewImpl.java: Only set the
row count in list view tables if the data has more rows than the
minimum number of rows visible.
* src/main/java/org/glom/web/client/ui/cell/BooleanCell.java: New class
for rendering TYPE_BOOLEAN cells. The code was extracted from the
ListTable class.
* src/main/java/org/glom/web/client/ui/cell/NumericCell.java: New class
for rendering TYPE_NUMERIC cells. The code was extracted from the
ListTable class.
* src/main/java/org/glom/web/client/ui/cell/OpenButtonCell.java: New
class for rendering cells with buttons in list views. The code was
extracted from the ListTable class.
* src/main/java/org/glom/web/client/ui/cell/TextCell.java: New class
for rendering TYPE_TEXT cells. The code was extracted from the
ListTable class.
* src/main/java/org/glom/web/client/ui/details/RelatedListTable.java:
Add empty rows to the end of the data if required. Implement
ListTable.getMinNumVisibleRows().
* src/main/java/org/glom/web/client/ui/list/ListTable.java: Extract
cell renderer code to public classes. Return null in
Column.getValue() for empty rows. Add new abstract method:
getMinNumVisibleRows(). Move code to set the row count of the list view
table to ListViewImpl.
* src/main/java/org/glom/web/client/ui/list/ListViewTable.java: Add
empty rows to the end of the data if required. Implement
ListTable.getMinNumVisibleRows().
ChangeLog
src/main/java/org/glom/web/client/activity/DetailsActivity.java
src/main/java/org/glom/web/client/ui/ListViewImpl.java
src/main/java/org/glom/web/client/ui/cell/BooleanCell.java [new file with mode: 0644]
src/main/java/org/glom/web/client/ui/cell/NumericCell.java [new file with mode: 0644]
src/main/java/org/glom/web/client/ui/cell/OpenButtonCell.java [new file with mode: 0644]
src/main/java/org/glom/web/client/ui/cell/TextCell.java [new file with mode: 0644]
src/main/java/org/glom/web/client/ui/details/RelatedListTable.java
src/main/java/org/glom/web/client/ui/list/ListTable.java
src/main/java/org/glom/web/client/ui/list/ListViewTable.java