public void onClick(ClickEvent event) { // autoCompleteTextField should not loose focus this.textField.setFocus(true, false); Cell clickCell = ((HTMLTable) event.getSource()).getCellForEvent(event); textField.insertString(clickCell.getElement().getInnerText()); hide(); }
@UiHandler("table") void onTableClicked(ClickEvent event) { // Select the row that was clicked (-1 to account for header row). Cell cell = table.getCellForEvent(event); if (cell != null) { int row = cell.getRowIndex(); selectRow(row); } }
@Override public void onClick(ClickEvent event) { Cell cell = grid.getCellForEvent(event); if (cell == null) { return; } selectedY = cell.getRowIndex(); selectedX = cell.getCellIndex(); }
@Override public void onClick(ClickEvent event) { // don't remove last row if (outputPortTable.getRowCount() == 4) { return; } Cell cell = outputPortTable.getCellForEvent(event); int rowCount = cell.getRowIndex(); outputPortTable.removeRow(rowCount); // remove factport from postconditions buildingBlock.removeFromPostconditions(factPort); }
@UiHandler("flexTable") protected void onFlexTableClicked(ClickEvent event) { removeSelectedRowStyleFromTable(); Cell cell = flexTable.getCellForEvent(event); if (cell != null && totalCount != 0) { int row = cell.getRowIndex(); selectedIndex = row; flexTable.getRowFormatter().addStyleName(row, selectionStyle.rowHighlighted()); RadioButtonContainer radioButtonContainer = radioButtons.get(row); if (radioButtonContainer != null && radioButtonContainer.getRadioButton() != null) { clearRadioButtons(); radioButtonContainer.getRadioButton().setValue(true); selectedRowId = radioButtonContainer.getIdentifier(); if (listner != null) { listner.onRowSelected(selectedRowId); } } if (radioButtonContainer != null && radioButtonContainer.getRadioButton() == null && radioButtonContainer.getIdentifier() != null) { selectedRowId = radioButtonContainer.getIdentifier(); } } }
@Override public void onClick(ClickEvent event) { Cell clickedCell = table.getCellForEvent(event); int rowIndex = clickedCell.getRowIndex(); saveAction(rowIndex); }