@Override public void redisplayJobIds(List<String> jobIds) { tab.clear(); int row = 0; for (final String jobId : jobIds) { int col = 0; final int fRow = row; Button execButton = new Button( constants.execute(), new ClickHandler() { @Override public void onClick(ClickEvent event) { fireAppJobRequested(jobId); } }); execButton.addStyleName("execButton"); execButton.addMouseOverHandler( new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { tab.getRowFormatter().addStyleName(fRow, "hoveredOn"); } }); execButton.addMouseOutHandler( new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { tab.getRowFormatter().removeStyleName(fRow, "hoveredOn"); } }); tab.setWidget(row, col++, new Label(jobId)); tab.setWidget(row, col++, execButton); ++row; } }
protected void addHeaders() { results.getRowFormatter().setStylePrimaryName(0, "tsTableHeader"); results.setWidget(0, 0, new HTML(constants.jobId(), false)); results.setWidget(0, 1, new HTML(constants.status(), false)); results.setWidget(0, 2, new HTML(constants.description(), false)); }