test_class.declarator: CATEGORIES = Arrays.asList("cat 1", "cat 2", "cat 3", "cat 4", "cat 5")
test_class.modifier: private static final
test_class.original_string: private static final List<?> CATEGORIES = Arrays.asList("cat 1", "cat 2", "cat 3", "cat 4", "cat 5");
test_class.type: List<?>
test_class.var_name: CATEGORIES
test_class.declarator: VALUES =
              Arrays.asList(Arrays.asList(5, 7, 10, 12, 6), Arrays.asList(20, 12, 10, 5, 14))
test_class.modifier: private static final
test_class.original_string: private static final List<List<? extends Number>> VALUES =
              Arrays.asList(Arrays.asList(5, 7, 10, 12, 6), Arrays.asList(20, 12, 10, 5, 14));
test_class.type: List<List<? extends Number>>
test_class.var_name: VALUES
test_class.declarator: workbook
test_class.modifier: private
test_class.original_string: private Workbook workbook;
test_class.type: Workbook
test_class.var_name: workbook
test_class.file: web/src/test/java/org/devgateway/toolkit/web/excelcharts/ExcelChartSheetDefaultTest.java
test_class.identifier: ExcelChartSheetDefaultTest
test_case.body: @Test
      public void writeCell() throws Exception {
          final ExcelChartSheet excelChartSheet = new ExcelChartSheetDefault(workbook, ChartType.bar.toString());
          final Row row = excelChartSheet.createRow();
  
          excelChartSheet.writeCell(null, row, 0);
          excelChartSheet.writeCell(Boolean.TRUE, row, 1);
          excelChartSheet.writeCell("text", row, 2);
          excelChartSheet.writeCell(1, row, 3);
  
          Assert.assertEquals(CellType.BLANK, row.getCell(0).getCellTypeEnum());
          Assert.assertEquals("Yes", row.getCell(1).getStringCellValue());
          Assert.assertEquals(CellType.STRING, row.getCell(2).getCellTypeEnum());
          Assert.assertEquals(CellType.NUMERIC, row.getCell(3).getCellTypeEnum());
      }
test_case.class_method_signature: ExcelChartSheetDefaultTest.writeCell()
test_case.full_signature: @Test public void writeCell()
test_case.identifier: writeCell
test_case.invocations: toString createRow writeCell writeCell writeCell writeCell assertEquals getCellTypeEnum getCell assertEquals getStringCellValue getCell assertEquals getCellTypeEnum getCell assertEquals getCellTypeEnum getCell
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void writeCell()
focal_class.declarator: DATAFONTHEIGHT = 12
focal_class.modifier: private static final
focal_class.original_string: private static final int DATAFONTHEIGHT = 12;
focal_class.type: int
focal_class.var_name: DATAFONTHEIGHT
focal_class.declarator: HEADERFONTHEIGHT = 14
focal_class.modifier: private static final
focal_class.original_string: private static final int HEADERFONTHEIGHT = 14;
focal_class.type: int
focal_class.var_name: HEADERFONTHEIGHT
focal_class.declarator: ROWHEADERHEIGHT = 800
focal_class.modifier: private static final
focal_class.original_string: private static final int ROWHEADERHEIGHT = 800;
focal_class.type: int
focal_class.var_name: ROWHEADERHEIGHT
focal_class.declarator: ROWHEIGHT = 600
focal_class.modifier: private static final
focal_class.original_string: private static final int ROWHEIGHT = 600;
focal_class.type: int
focal_class.var_name: ROWHEIGHT
focal_class.declarator: excelSheet
focal_class.modifier: private final
focal_class.original_string: private final Sheet excelSheet;
focal_class.type: Sheet
focal_class.var_name: excelSheet
focal_class.declarator: dataStyleCell
focal_class.modifier: private final
focal_class.original_string: private final CellStyle dataStyleCell;
focal_class.type: CellStyle
focal_class.var_name: dataStyleCell
focal_class.declarator: headerStyleCell
focal_class.modifier: private final
focal_class.original_string: private final CellStyle headerStyleCell;
focal_class.type: CellStyle
focal_class.var_name: headerStyleCell
focal_class.file: web/src/main/java/org/devgateway/toolkit/web/excelcharts/ExcelChartSheetDefault.java
focal_class.identifier: ExcelChartSheetDefault
focal_class.interfaces: implements ExcelChartSheet
focal_class.class_method_signature: ExcelChartSheetDefault.ExcelChartSheetDefault(final Workbook workbook, final String excelSheetName)
focal_class.full_signature: public  ExcelChartSheetDefault(final Workbook workbook, final String excelSheetName)
focal_class.identifier: ExcelChartSheetDefault
focal_class.modifiers: public
focal_class.parameters: (final Workbook workbook, final String excelSheetName)
focal_class.signature:  ExcelChartSheetDefault(final Workbook workbook, final String excelSheetName)
focal_class.class_method_signature: ExcelChartSheetDefault.writeCell(final Object value, final Row row, final int column)
focal_class.full_signature: @Override public void writeCell(final Object value, final Row row, final int column)
focal_class.identifier: writeCell
focal_class.modifiers: @Override public
focal_class.parameters: (final Object value, final Row row, final int column)
focal_class.return: void
focal_class.signature: void writeCell(final Object value, final Row row, final int column)
focal_class.class_method_signature: ExcelChartSheetDefault.createRow(final int rowNumber)
focal_class.full_signature: @Override public Row createRow(final int rowNumber)
focal_class.identifier: createRow
focal_class.modifiers: @Override public
focal_class.parameters: (final int rowNumber)
focal_class.return: Row
focal_class.signature: Row createRow(final int rowNumber)
focal_class.class_method_signature: ExcelChartSheetDefault.createRow()
focal_class.full_signature: @Override public Row createRow()
focal_class.identifier: createRow
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Row
focal_class.signature: Row createRow()
focal_class.class_method_signature: ExcelChartSheetDefault.setColumnWidth(final int collNumber, final int size)
focal_class.full_signature: @Override public void setColumnWidth(final int collNumber, final int size)
focal_class.identifier: setColumnWidth
focal_class.modifiers: @Override public
focal_class.parameters: (final int collNumber, final int size)
focal_class.return: void
focal_class.signature: void setColumnWidth(final int collNumber, final int size)
focal_class.class_method_signature: ExcelChartSheetDefault.createChartAndLegend()
focal_class.full_signature: @Override public Chart createChartAndLegend()
focal_class.identifier: createChartAndLegend
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Chart
focal_class.signature: Chart createChartAndLegend()
focal_class.class_method_signature: ExcelChartSheetDefault.getCategoryChartDataSource()
focal_class.full_signature: @Override public ChartDataSource<?> getCategoryChartDataSource()
focal_class.identifier: getCategoryChartDataSource
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ChartDataSource<?>
focal_class.signature: ChartDataSource<?> getCategoryChartDataSource()
focal_class.class_method_signature: ExcelChartSheetDefault.getValuesChartDataSource()
focal_class.full_signature: @Override public List<ChartDataSource<Number>> getValuesChartDataSource()
focal_class.identifier: getValuesChartDataSource
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<ChartDataSource<Number>>
focal_class.signature: List<ChartDataSource<Number>> getValuesChartDataSource()
focal_class.class_method_signature: ExcelChartSheetDefault.getChartDataSource(final int row)
focal_class.full_signature: private ChartDataSource getChartDataSource(final int row)
focal_class.identifier: getChartDataSource
focal_class.modifiers: private
focal_class.parameters: (final int row)
focal_class.return: ChartDataSource
focal_class.signature: ChartDataSource getChartDataSource(final int row)
focal_method.body: @Override
      public void writeCell(final Object value, final Row row, final int column) {
          // try to determine the cell type based on the object value
          // if nothing matches then use 'CELL_TYPE_STRING' as type and call the
          // object toString() function.
          // * don't create any cell if the value is null (Cell.CELL_TYPE_BLANK)
          // * do nothing if we have an empty List/Set instead of display empty
          // brackets like []
          if (value != null && !((value instanceof List || value instanceof Set) && ((Collection) value).isEmpty())) {
              final Cell cell;
              if (value instanceof String) {
                  cell = row.createCell(column, CellType.STRING);
                  cell.setCellValue((String) value);
              } else {
                  if (value instanceof Integer) {
                      cell = row.createCell(column, CellType.NUMERIC);
                      cell.setCellValue((Integer) value);
                  } else {
                      if (value instanceof Number) {
                          cell = row.createCell(column, CellType.NUMERIC);
                          cell.setCellValue(((Number) value).doubleValue());
                      } else {
                          if (value instanceof Boolean) {
                              cell = row.createCell(column, CellType.BOOLEAN);
                              cell.setCellValue(((Boolean) value) ? "Yes" : "No");
                          } else {
                              if (value instanceof Date) {
                                  final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
                                  cell = row.createCell(column, CellType.STRING);
                                  cell.setCellValue(sdf.format((Date) value));
                              } else {
                                  cell = row.createCell(column, CellType.STRING);
                                  cell.setCellValue(value.toString());
                              }
                          }
                      }
                  }
              }
  
              // determine the style of the row based on it's index
              if (row.getRowNum() < 1) {
                  cell.setCellStyle(headerStyleCell);
              } else {
                  cell.setCellStyle(dataStyleCell);
              }
          } else {
              // create a Cell.CELL_TYPE_BLANK
              row.createCell(column);
          }
      }
focal_method.class_method_signature: ExcelChartSheetDefault.writeCell(final Object value, final Row row, final int column)
focal_method.full_signature: @Override public void writeCell(final Object value, final Row row, final int column)
focal_method.identifier: writeCell
focal_method.invocations: isEmpty createCell setCellValue createCell setCellValue createCell setCellValue doubleValue createCell setCellValue createCell setCellValue format createCell setCellValue toString getRowNum setCellStyle setCellStyle createCell
focal_method.modifiers: @Override public
focal_method.parameters: (final Object value, final Row row, final int column)
focal_method.return: void
focal_method.signature: void writeCell(final Object value, final Row row, final int column)