예제 #1
0
 @Override
 public void delete(final RowMetaData metaData) {
   if (!handlesDelete(metaData)) {
     return;
   }
   final int rowIndex = metaData.getRowIndex();
   final GridData.Range rowRange = uiModel.deleteRow(rowIndex);
   final int minRowIndex = rowRange.getMinRowIndex();
   final int maxRowIndex = rowRange.getMaxRowIndex();
   for (int ri = minRowIndex; ri <= maxRowIndex; ri++) {
     model.getData().remove(minRowIndex);
   }
 }
예제 #2
0
  @Override
  public void insert(final RowMetaData metaData) throws ModelSynchronizer.MoveColumnVetoException {
    if (!handlesAppend(metaData)) {
      return;
    }
    final int rowIndex = metaData.getRowIndex();
    final List<DTCellValue52> modelRow = new ArrayList<DTCellValue52>();
    model.getData().add(rowIndex, modelRow);

    final GridRow uiModelRow = new BaseGridRow(GuidedDecisionTableView.ROW_HEIGHT);
    uiModel.insertRow(rowIndex, uiModelRow);

    initialiseRowData(rowIndex);
  }