Exemplo n.º 1
0
 @Override
 public String getColumnName(int column) {
   if (column == 0) {
     return "Use as";
   }
   column--;
   if (columnNames == null) {
     if (reductionSelection != null) {
       column += reductionSelection.getColumnIndexStart();
     }
     StringBuffer buffer = new StringBuffer();
     int currentNumber = column % 26;
     buffer.append(((char) (currentNumber + 65)));
     column -= currentNumber;
     while (column > 0) {
       column /= 26;
       currentNumber = column % 26;
       buffer.append(((char) (currentNumber + 65)));
       column -= currentNumber;
     }
     return buffer.toString();
   } else {
     return columnNames.get(column);
   }
 }
Exemplo n.º 2
0
 public int getColumnCount() {
   if (reductionSelection == null) {
     return excelSheet.getColumns() + 1;
   } else {
     return reductionSelection.getColumnIndexEnd()
         - reductionSelection.getColumnIndexStart()
         + 1
         + 1;
   }
 }
Exemplo n.º 3
0
  public Object getValueAt(int rowIndex, int columnIndex) {
    if (columnIndex == 0) {
      String value = getAnnotationMap().get(rowIndex);
      if (value == null) {
        return AnnotationCellEditor.NONE;
      } else {
        return value;
      }
    }
    columnIndex--;

    if (reductionSelection == null) {
      return excelSheet.getCell(columnIndex, rowIndex).getContents();
    } else {
      return excelSheet
          .getCell(
              columnIndex + reductionSelection.getColumnIndexStart(),
              rowIndex + reductionSelection.getRowIndexStart())
          .getContents();
    }
  }