10.2. Creating custom cells
Creating your own custom cell is something you’ll need to do if you want to go beyond the standard set of cells. As you saw in chapter 4 on UI widgets, you can create custom cells in a couple of ways:
- Create a composite of existing cells.
- Create a cell from scratch.
In this section we’ll build a simple cell that will display title, date, and largeUrl fields from an underlying PhotoDetails object. The title and date will be text cells, and the other field will drive the display of an image (a block of color for this example’s purpose). Let’s take a quick look at how we’d achieve that in a composite cell, and then we’ll move on to creating it from scratch.
10.2.1. Composite
Composite cells display a number of ...
Get GWT in Action, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.