Calls {@link #createTableCell(java.lang.Object, java.util.Collection, boolean) }

@param val
@param style
@param noWrap
@return
@throws com.vectorprint.VectorPrintException
333114
public PdfPCell createTableCell(Object val, BaseStyler style, boolean noWrap) throws VectorPrintException {
      return createTableCell(val, toCollection(style), noWrap);
   }
1114386
public Phrase createPhrase(Object data, Collection<? extends BaseStyler> stylers) throws VectorPrintException {
      return initTextElementArray(styleHelper.style(new Phrase(Float.NaN), data, stylers), data, stylers);
   }
173271
@SuppressWarnings("squid:S2259") // Null pointers should not be dereferenced
  void setCellValue(Cell cell, Object value) {
    if (value instanceof Boolean) {
      cell.setCellValue(toBoolean(value));
    } else if (value instanceof LocalDate) {
      Instant instant = toLocalDate(value).atStartOfDay(timeZone.toZoneId()).toInstant();
      cell.setCellValue(simpleDateFormat.format(Date.from(instant)));
    } else if (value instanceof Instant) {
      cell.setCellValue(simpleDateTimeFormat.format(Date.from((Instant) value)));
    } else if (value instanceof Double) {
      cell.setCellValue(toDouble(value));
    } else if (value instanceof Integer) {
      cell.setCellValue(toInt(value));
    } else if (value instanceof Long) {
      cell.setCellValue(toLong(value));
    } else if (value instanceof String) {
      cell.setCellValue(value.toString());
    } else {
      throw new UnsupportedValueException(value);
    }
  }
995401
@SuppressWarnings("unchecked")
    private void writeRows(Cell templateCell, List<Object> items) {
        val tmplRow = templateCell.getRow();
        val fromRow = tmplRow.getRowNum();

        val tmplCol = templateCell.getColumnIndex();
        for (int i = 0, ii = items.size(); i < ii; ++i) {
            val item = items.get(i);
            val row = i == 0 ? tmplRow : sheet.createRow(fromRow + i);
            if (row != tmplRow) {
                row.setHeight(tmplRow.getHeight());
            }

            val fields = item.getClass().getDeclaredFields();
            int cutoff = 0;
            for (int j = 0; j < fields.length; ++j) {
                val field = fields[j];
                if (Fields.shouldIgnored(field, ExcelColIgnore.class)) {
                    ++cutoff;
                    continue;
                }
                if (field.getName().endsWith("Tmpl")) {
                    ++cutoff;
                    continue;
                }

                val fv = Fields.invokeField(field, item);
                val excelCell = field.getAnnotation(ExcelCell.class);
                int maxLen = excelCell == null ? 0 : excelCell.maxLineLen();
                val cell = newCell(tmplRow, tmplCol + j - cutoff, i, row, fv, maxLen);
                applyTemplateCellStyle(field, item, excelCell, cell);
            }

            emptyEndsCells(tmplRow, tmplCol, i, row, fields.length);
        }
    }
75700
@InternalApi
  public static RowCell create(
      @Nonnull String family,
      @Nonnull ByteString qualifier,
      long timestamp,
      @Nonnull List<String> labels,
      @Nonnull ByteString value) {
    return new AutoValue_RowCell(family, qualifier, timestamp, value, labels);
  }
34323
protected StringBuffer buildTableRowStart(String propertyName) {

        StringBuffer result = new StringBuffer(96);
        result.append("<tr>\n");
        result.append("\t<td style=\"white-space: nowrap;\" unselectable=\"on\">");
        result.append(propertyName);
        result.append("</td>\n");
        result.append("\t<td class=\"maxwidth\">");
        return result;
    }
18718
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions, // optional
        boolean quickPath
    ) throws IOException {

        ChronoFormatter<T> cf = this.getFormatter(attributes, quickPath, formattable);
        Set<ElementPosition> newPositions = cf.print(formattable, buffer, attributes, positions != null);

        if (positions != null) {
            assert (newPositions != null);
            positions.addAll(newPositions);
        }

        return Integer.MAX_VALUE;

    }
691909
public static void copyCell(XSSFCell oldCell, XSSFCell newCell, Map<Integer, CellStyle> styleMap) {
		if (styleMap != null) {			
			if (oldCell.getSheet().getWorkbook() == newCell.getSheet().getWorkbook()) {
				newCell.setCellStyle(oldCell.getCellStyle());
			} else {				
				int stHashCode = oldCell.getCellStyle().hashCode();
				CellStyle newCellStyle = styleMap.get(stHashCode);				
				if (newCellStyle == null) {					
					newCellStyle = newCell.getSheet().getWorkbook().createCellStyle();
					newCellStyle.cloneStyleFrom(oldCell.getCellStyle());					
					styleMap.put(stHashCode, newCellStyle);
				}
				newCell.setCellStyle(newCellStyle);
			}			
		}
		switch (oldCell.getCellType()) {
		case XSSFCell.CELL_TYPE_STRING:
			newCell.setCellValue(oldCell.getStringCellValue());
			break;
		case XSSFCell.CELL_TYPE_NUMERIC:
			newCell.setCellValue(oldCell.getNumericCellValue());
			break;
		case XSSFCell.CELL_TYPE_BLANK:
			newCell.setCellType(XSSFCell.CELL_TYPE_BLANK);
			break;
		case XSSFCell.CELL_TYPE_BOOLEAN:
			newCell.setCellValue(oldCell.getBooleanCellValue());
			break;
		case XSSFCell.CELL_TYPE_ERROR:
			newCell.setCellErrorValue(oldCell.getErrorCellValue());
			break;
		case XSSFCell.CELL_TYPE_FORMULA:
			newCell.setCellFormula(oldCell.getCellFormula());
			break;
		default:
			break;
		}

	}
1214441
public static void createNewRow(SheetTemplate template) {
        if (template.lastRowIndex > template.currentRowIndex && template.currentRowIndex != template.initRowIndex) {
            template.sheet.shiftRows(template.currentRowIndex, template.lastRowIndex, 1, true, true);
            template.lastRowIndex++;
        }
        template.currentRow = template.sheet.createRow(template.currentRowIndex);
        template.currentRow.setHeightInPoints(template.rowHeight);
        template.currentRowIndex++;
        template.currentColumnIndex = template.initColumnIndex;
    }
467832
public synchronized TableModel<V> setCell(int columnIndex, int rowIndex, V value) {
        getCell(columnIndex, rowIndex);
        List<V> row = rows.get(rowIndex);

        //Pad row with null if necessary
        for(int j = row.size(); j < columnIndex; j++) {
            row.add(null);
        }

        V existingValue = row.get(columnIndex);
        if(existingValue == value) {
            return this;
        }
        row.set(columnIndex, value);
        for(Listener<V> listener: listeners) {
            listener.onCellChanged(this, rowIndex, columnIndex, existingValue, value);
        }
        return this;
    }
1270312
public PdfPCell createPdfPCell(SimpleCell rowAttributes) {
		PdfPCell cell = new PdfPCell();
		cell.setBorder(NO_BORDER);
		SimpleCell tmp = new SimpleCell(CELL);
		tmp.setSpacing_left(spacing_left);
		tmp.setSpacing_right(spacing_right);
		tmp.setSpacing_top(spacing_top);
		tmp.setSpacing_bottom(spacing_bottom);
		tmp.cloneNonPositionParameters(rowAttributes);
		tmp.softCloneNonPositionParameters(this);
		cell.setCellEvent(tmp);
		cell.setHorizontalAlignment(rowAttributes.horizontalAlignment);
		cell.setVerticalAlignment(rowAttributes.verticalAlignment);
		cell.setUseAscender(rowAttributes.useAscender);
		cell.setUseBorderPadding(rowAttributes.useBorderPadding);
		cell.setUseDescender(rowAttributes.useDescender);
		cell.setColspan(colspan);
		if (horizontalAlignment != Element.ALIGN_UNDEFINED)
			cell.setHorizontalAlignment(horizontalAlignment);
		if (verticalAlignment != Element.ALIGN_UNDEFINED)
			cell.setVerticalAlignment(verticalAlignment);
		if (useAscender)
			cell.setUseAscender(useAscender);
		if (useBorderPadding)
			cell.setUseBorderPadding(useBorderPadding);
		if (useDescender)
			cell.setUseDescender(useDescender);
		float p;
		float sp_left = spacing_left;
		if (Float.isNaN(sp_left)) sp_left = 0f;
		float sp_right = spacing_right;
		if (Float.isNaN(sp_right)) sp_right = 0f;
		float sp_top = spacing_top;
		if (Float.isNaN(sp_top)) sp_top = 0f;
		float sp_bottom = spacing_bottom;
		if (Float.isNaN(sp_bottom)) sp_bottom = 0f;
		p = padding_left;
		if (Float.isNaN(p)) p = 0f; 
		cell.setPaddingLeft(p + sp_left);
		p = padding_right;
		if (Float.isNaN(p)) p = 0f; 
		cell.setPaddingRight(p + sp_right);
		p = padding_top;
		if (Float.isNaN(p)) p = 0f; 
		cell.setPaddingTop(p + sp_top);
		p = padding_bottom;
		if (Float.isNaN(p)) p = 0f; 
		cell.setPaddingBottom(p + sp_bottom);
		Element element;
		for (Iterator i = content.iterator(); i.hasNext(); ) {
			element = (Element)i.next();
			cell.addElement(element);
		}
		return cell;
	}
1019331
@InternalApi
  public Row createRowFromProto(com.google.bigtable.v2.Row row) {
    RowBuilder<Row> builder = createRowBuilder();
    builder.startRow(row.getKey());

    for (Family family : row.getFamiliesList()) {
      for (Column column : family.getColumnsList()) {
        for (Cell cell : column.getCellsList()) {
          builder.startCell(
              family.getName(),
              column.getQualifier(),
              cell.getTimestampMicros(),
              cell.getLabelsList(),
              cell.getValue().size());
          builder.cellValue(cell.getValue());
          builder.finishCell();
        }
      }
    }

    return builder.finishRow();
  }
368889
@Override
   public <E> E style(E element, Object data) throws VectorPrintException {
      if (getValue(DYNAMICDATA, Boolean.class)) {
         setData(convert(data));
      }
      return element;
   }
425104
private static void setCellStyle(SheetTemplate template, Cell cell, String styleKey) {
        if (null != styleKey && null != template.classifyStyle.get(styleKey)) {
            cell.setCellStyle(template.classifyStyle.get(styleKey));
            return;
        }

        if (null != template.appointLineStyle && template.appointLineStyle.containsKey(cell.getRowIndex())) {
            cell.setCellStyle(template.appointLineStyle.get(cell.getRowIndex()));
            return;
        }
        if (null != template.singleLineStyle && (cell.getRowIndex() % 2 != 0)) {
            cell.setCellStyle(template.singleLineStyle);
            return;
        }
        if (null != template.doubleLineStyle && (cell.getRowIndex() % 2 == 0)) {
            cell.setCellStyle(template.doubleLineStyle);
            return;
        }
        if (null != template.defaultStyle)
            cell.setCellStyle(template.defaultStyle);
    }
814306
public CrosstabBuilder addRow(String title, String property, String className, boolean showTotal,
			Style headerStyle, Style totalStyle, Style totalHeaderStyle) {
		DJCrosstabRow row = new CrosstabRowBuilder()
		.setProperty(property,className)
		.setShowTotals(showTotal)
		.setTitle(title)
		.setHeaderStyle(headerStyle)
		.setTotalHeaderStyle(totalHeaderStyle)
		.setTotalStyle(totalStyle)
		.build();
		addRow(row);
		return this;
	}
234224
@Override
  public org.apache.spark.unsafe.KVIterator<UnsafeRow, UnsafeRow> rowIterator() {
    return new org.apache.spark.unsafe.KVIterator<UnsafeRow, UnsafeRow>() {
      private final UnsafeRow key = new UnsafeRow(keySchema.length());
      private final UnsafeRow value = new UnsafeRow(valueSchema.length());

      private long offsetInPage = 0;
      private int recordsInPage = 0;

      private int currentklen;
      private int currentvlen;
      private int totalLength;

      private boolean initialized = false;

      private void init() {
        if (page != null) {
          offsetInPage = page.getBaseOffset();
          recordsInPage = numRows;
        }
        initialized = true;
      }

      @Override
      public boolean next() {
        if (!initialized) init();
        //searching for the next non empty page is records is now zero
        if (recordsInPage == 0) {
          freeCurrentPage();
          return false;
        }

        totalLength = Platform.getInt(base, offsetInPage) - 4;
        currentklen = Platform.getInt(base, offsetInPage + 4);
        currentvlen = totalLength - currentklen;

        key.pointTo(base, offsetInPage + 8, currentklen);
        value.pointTo(base, offsetInPage + 8 + currentklen, currentvlen);

        offsetInPage += 8 + totalLength + 8;
        recordsInPage -= 1;
        return true;
      }

      @Override
      public UnsafeRow getKey() {
        return key;
      }

      @Override
      public UnsafeRow getValue() {
        return value;
      }

      @Override
      public void close() {
        // do nothing
      }

      private void freeCurrentPage() {
        if (page != null) {
          freePage(page);
          page = null;
        }
      }
    };
  }
645988
public static Link create(final String text, final TextStyle ts, final NamedObject table) {
		return new Link(text, ts, '#'+table.getName());
	}