コード例 #1
0
 /**
  * Create summary table with horizontal columns.
  *
  * @param writer The Excel writer.
  * @param rowIndex The selected row.
  */
 private void printSummaryHeader(ExcelWriter writer, int rowIndex) {
   writer.writeElement(rowIndex, 0, "channel");
   writer.writeElement(rowIndex, 1, "zsection");
   writer.writeElement(rowIndex, 2, "time");
   for (int y = 0; y < channelSummaryTable.getRowCount(); y++)
     writer.writeElement(rowIndex, 3 + y, channelSummaryTable.getValueAt(y, 0));
 }
コード例 #2
0
 /**
  * Adds the any remaining fields (min, max, mean, stdDev) to the file being saved.
  *
  * @param writer The Excel writer.
  * @param rowIndex The selected row.
  * @param channel The channel to output.
  * @param z z-section to output.
  * @param t timepoint to output.
  */
 private void outputSummaryRow(ExcelWriter writer, int rowIndex, Integer channel, int z, int t) {
   writer.writeElement(rowIndex, 0, channelName.get(channel));
   writer.writeElement(rowIndex, 1, z + "");
   writer.writeElement(rowIndex, 2, t + "");
   int col;
   String v;
   for (int y = 0; y < channelSummaryTable.getRowCount(); y++) {
     col = getColumn(channelName.get(channel));
     if (col == -1) continue;
     v = (String) channelSummaryTable.getValueAt(y, col);
     if (v.contains(".") && v.contains(",")) {
       v = v.replace(".", "");
       v = v.replace(",", ".");
     }
     writer.writeElement(rowIndex, 3 + y, new Double(v));
   }
 }