本文整理了Java中jxl.write.Label.<init>()
方法的一些代码示例,展示了Label.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.<init>()
方法的具体详情如下:
包路径:jxl.write.Label
类名称:Label
方法名:<init>
[英]Creates a cell which, when added to the sheet, will be presented at the specified column and row co-ordinates and will contain the specified text
[中]创建一个单元格,当添加到图纸中时,该单元格将以指定的列坐标和行坐标显示,并将包含指定的文本
代码示例来源:origin: pentaho/pentaho-kettle
data.sheet.addCell( new Label( data.positionX, rowNumber, vMeta.getName(), data.headerCellFormat ) );
if ( cellFormat == null ) {
data.sheet.addCell( dateTime );
} else if ( !meta.isNullBlank() ) {
data.sheet.addCell( new Label( data.positionX, data.positionY, "" ) );
Label label = new Label( data.positionX, data.positionY, vMeta.getString( v ), cellFormat );
data.sheet.addCell( label );
} else if ( !meta.isNullBlank() ) {
data.sheet.addCell( new Label( data.positionX, data.positionY, "" ) );
data.sheet.addCell( number );
} else if ( !meta.isNullBlank() ) {
data.sheet.addCell( new Label( data.positionX, data.positionY, "" ) );
代码示例来源:origin: Impetus/Kundera
private void addCaption(WritableSheet sheet, int column, int row, String s) throws RowsExceededException,
WriteException
{
Label label;
label = new Label(column, row, s, timesBoldUnderline);
sheet.addCell(label);
}
代码示例来源:origin: Impetus/Kundera
private void addLabel(WritableSheet sheet, int column, int row, Object s) throws WriteException,
RowsExceededException
{
Label label;
label = new Label(column, row, s.toString(), times);
sheet.addCell(label);
}
代码示例来源:origin: x-ream/x7
if (Objects.nonNull(tagList)) {
for (KV kv : tagList) {
sheet.addCell(new Label(c++, r, kv.v.toString()));
c++;
}else {
sheet.addCell(new Label(c++, r, v.toString()));
c++;
}else {
sheet.addCell(new Label(c++, r, v.toString()));
代码示例来源:origin: x-ream/x7
if (Objects.nonNull(tagList)) {
for (KV kv : tagList) {
sheet.addCell(new Label(c++, r, kv.v.toString()));
c++;
}else {
sheet.addCell(new Label(c++, r, v.toString()));
c++;
}else {
sheet.addCell(new Label(c++, r, v.toString()));
代码示例来源:origin: bill1012/AdminEAP
if (isExport(column)) {
head = new Label(h - ignoreCount, headIndex, column.getHeader(), ft_head);
sheet.addCell(head);
if (column.getHeader().getBytes().length > sheet.getColumnWidth(h - ignoreCount))
代码示例来源:origin: bill1012/AdminEAP
sheet.addCell(num1);
} else {
Label label = new Label(colIndex - ignoreCount, rowIndex + headIndex, "", ft_decimal);
sheet.addCell(label);
sheet.addCell(num2);
} else if (column.getSuffix() != null) {
Label label = new Label(colIndex - ignoreCount, rowIndex + headIndex, data + "%", format);
sheet.addCell(label);
} else {
Label label = new Label(colIndex - ignoreCount, rowIndex + headIndex, data, format);
sheet.addCell(label);
代码示例来源:origin: net.sourceforge.jexcelapi/jxl
/**
* Implementation of the deep copy function
*
* @param col the column which the new cell will occupy
* @param row the row which the new cell will occupy
* @return a copy of this cell, which can then be added to the sheet
*/
public WritableCell copyTo(int col, int row)
{
return new Label(col, row, this);
}
}
代码示例来源:origin: com.hynnet/jxl
/**
* Implementation of the deep copy function
*
* @param col the column which the new cell will occupy
* @param row the row which the new cell will occupy
* @return a copy of this cell, which can then be added to the sheet
*/
public WritableCell copyTo(int col, int row)
{
return new Label(col, row, this);
}
}
代码示例来源:origin: bill1012/AdminEAP
try {
Label title = new Label(0, 0, StrUtil.isEmpty(queryCondition.getSheetTitle()) ?
queryCondition.getSheetName() : queryCondition.getSheetTitle(), ft_title);
Label subTitle = new Label(0, 1, queryCondition.getSheetSubTitle(), ft_left);
sheet.addCell(subTitle);
sheet.setRowView(1, 600, false);
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private static void addStringToSheet(WritableSheet dataSheet, int column, int row, String string, WritableCellFormat format)
{
Label cell = new Label(column, row, string, format);
addCell(dataSheet, cell);
}
代码示例来源:origin: jasperreports/jasperreports
protected CellValue getLabelCell(int x, int y, String textStr, StyleInfo baseStyle) throws JRException
{
WritableCellFormat cellStyle = getLoadedCellStyle(baseStyle);
CellValue cellValue = new Label(x, y, textStr, cellStyle);
return cellValue;
}
代码示例来源:origin: jasperreports/jasperreports
public void handle(StringTextValue textValue) throws JRException
{
WritableCellFormat cellStyle = getLoadedCellStyle(baseStyle);
result = new Label(x, y, textValue.getText(), cellStyle);
}
代码示例来源:origin: net.thucydides/thucydides-core
private void writeRow(List<? extends Object> columnValues,
WritableSheet sheet,
SimpleValueMatcher... checks) throws WriteException {
recordingStarted = true;
boolean isAFailedTest = checkIfTestHasFailed(checks);
WritableCellFormat font = getFontFor(isAFailedTest);
int row = sheet.getRows();
int column = 0;
for (Object columnValue : columnValues) {
Label resultCell = new Label(column++, row, columnValue.toString(), font);
sheet.addCell(resultCell);
}
}
代码示例来源:origin: net.serenity-bdd/core
private void writeRow(List<? extends Object> columnValues,
WritableSheet sheet,
SimpleValueMatcher... checks) throws WriteException {
recordingStarted = true;
boolean isAFailedTest = checkIfTestHasFailed(checks);
WritableCellFormat font = getFontFor(isAFailedTest);
int row = sheet.getRows();
int column = 0;
for (Object columnValue : columnValues) {
Label resultCell = new Label(column++, row, columnValue.toString(), font);
sheet.addCell(resultCell);
}
}
代码示例来源:origin: stackoverflow.com
Workbook aWorkBook = Workbook.getWorkbook(new File("Originalfile.xls"));
WritableWorkbook aCopy = Workbook.createWorkbook(new File("Originalfile.xls"), aWorkBook);
WritableSheet aCopySheet = aCopy.getSheet(0);//index of the needed sheet
WritableCell aWritableCell = aCopySheet.getWritableCell(1,1);//no need!
jxl.write.Label anotherWritableCell = new jxl.write.Label(1,12 ,"SUN");
//position of the new cell in column,row
//can be a new Label() or new Number() or new Formula
aCopySheet.addCell(anotherWritableCell);
aCopy.write();
aCopy.close();
代码示例来源:origin: com.manydesigns/elements
private void addHeaderToSheet(WritableSheet sheet) throws WriteException {
WritableCellFormat formatCell = headerExcel();
int i = 0;
for (FieldSet fieldset : form) {
for (Field field : fieldset.fields()) {
sheet.addCell(new jxl.write.Label(i, 0, field.getLabel(), formatCell));
i++;
}
}
}
代码示例来源:origin: ManyDesigns/Portofino
private void addHeaderToSheet(WritableSheet sheet) throws WriteException {
WritableCellFormat formatCell = headerExcel();
int i = 0;
for (FieldSet fieldset : form) {
for (Field field : fieldset.fields()) {
sheet.addCell(new jxl.write.Label(i, 0, field.getLabel(), formatCell));
i++;
}
}
}
代码示例来源:origin: com.manydesigns/elements
private void addHeaderToSheet(WritableSheet sheet) throws WriteException {
WritableCellFormat formatCell = headerExcel();
int l = 0;
for (TableForm.Column col : form.getColumns()) {
sheet.addCell(new jxl.write.Label(l, 0, col.getLabel(), formatCell));
l++;
}
}
代码示例来源:origin: ManyDesigns/Portofino
private void addHeaderToSheet(WritableSheet sheet) throws WriteException {
WritableCellFormat formatCell = headerExcel();
int l = 0;
for (TableForm.Column col : form.getColumns()) {
sheet.addCell(new jxl.write.Label(l, 0, col.getLabel(), formatCell));
l++;
}
}
内容来源于网络,如有侵权,请联系作者删除!