示例#1
0
 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();
 }
示例#2
0
 @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);
   }
 }
示例#3
0
  @Override
  public void onClick(ClickEvent event) {
    Cell cell = grid.getCellForEvent(event);
    if (cell == null) {
      return;
    }

    selectedY = cell.getRowIndex();
    selectedX = cell.getCellIndex();
  }
示例#4
0
    @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);
    }
示例#5
0
 @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();
     }
   }
 }
示例#6
0
 @Override
 public void onClick(ClickEvent event) {
   Cell clickedCell = table.getCellForEvent(event);
   int rowIndex = clickedCell.getRowIndex();
   saveAction(rowIndex);
 }