コード例 #1
0
ファイル: TableHandler.java プロジェクト: eclipse/ptp
 /** @return */
 private RowType[] getTableData(TableType table, BigInteger[] cids) {
   final RowType[] tableData = new RowType[table.getRow().size()];
   for (int i = 0; i < tableData.length; i++) {
     final RowType row = table.getRow().get(i);
     tableData[i] = new RowType();
     if (row.getOid() != null) {
       tableData[i].setOid(row.getOid());
     }
     for (final BigInteger cid : cids) {
       boolean exists = false;
       for (final CellType cell : row.getCell()) {
         if (cell.getCid().equals(cid)) {
           tableData[i].getCell().add(cell);
           exists = true;
           break;
         }
       }
       if (!exists) {
         final CellType newCell = new CellType();
         newCell.setCid(cid);
         newCell.setValue(ILMLCoreConstants.QM);
         tableData[i].getCell().add(newCell);
       }
     }
   }
   return tableData;
 }
コード例 #2
0
ファイル: TableHandler.java プロジェクト: eclipse/ptp
 public String setCellValue(TableType table, RowType row, String colName, String value) {
   final BigInteger index = getColumnIndex(table, colName);
   if (index != null) {
     for (final CellType cell : row.getCell()) {
       if (cell.getCid().equals(index)) {
         final String oldVal = cell.getValue();
         cell.setValue(value);
         return oldVal;
       }
     }
   }
   return null;
 }