Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java @ 587:53ad6dd2cb2b
The project list displays the favorite state of a collection now. A gold star means, that a collection is a owner's favorite project and will never die. A silver star means, that the project is a common project.
flys-client/trunk@2181 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 21 Jun 2011 16:22:39 +0000 |
parents | ab7ec931bae2 |
children | 14e5e51a7de4 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java Tue Jun 21 16:14:10 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java Tue Jun 21 16:22:39 2011 +0000 @@ -105,8 +105,9 @@ ListGridField date = buildDateField(); ListGridField name = buildNameField(); + ListGridField fav = buildFavoriteField(); - grid.setFields(date, name); + grid.setFields(date, name, fav); grid.addCellDoubleClickHandler(new CellDoubleClickHandler() { public void onCellDoubleClick(CellDoubleClickEvent e) { @@ -303,7 +304,7 @@ } }); - date.setWidth(105); + date.setWidth(100); date.setAlign(Alignment.LEFT); return date; @@ -333,10 +334,23 @@ } }); - name.setWidth(195); + name.setWidth(165); name.setAlign(Alignment.LEFT); return name; } + + + protected ListGridField buildFavoriteField() { + ListGridField fav = new ListGridField("ttl", "ttl"); + fav.setType(ListGridFieldType.IMAGE); + String base = GWT.getHostPageBaseURL(); + fav.setImageURLPrefix(base + "images/"); + fav.setImageURLSuffix(".png"); + fav.setWidth(30); + fav.setAlign(Alignment.RIGHT); + + return fav; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :