gwt-2.2-celltable

Append custom style to a GWT CellTable (in this case all cells)

南楼画角 提交于 2019-11-27 01:51:48
问题 I have a case where I want to append white-space: nowrap; to the style of each cell in my CellTable. Currently it applies to all tables, but it would be nice to know both have to apply it for a specific CellTable, and all CellTables. 回答1: CellTables have their own CssResource. To override this style applied to all cells in a cellTable, create a new css file : /* Incremental changes from CellTable.css */ .cellTableCell { white-space: nowrap; } Then create your own CellTable.Resources interface

Adding clickHandler to row in CellTable in GWT?

北战南征 提交于 2019-11-26 20:14:41
问题 I have created a basic CellTable and filled it with some data. Now I want to add a clickHandler to each row but I'm not sure how to do this. I've created a clickEvent for the whole table but I want one for each row. table.sinkEvents(Event.ONCLICK); table.setTitle("Click me"); table.setSize("600px", "600px"); table.addDomHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Window.alert("You clicked!" +); } }, ClickEvent.getType()); Can I do something similar to add