mirror of https://github.com/apache/poi.git
Fix examples to build chart from scratch
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1870696 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2eee474063
commit
dd3279df30
|
@ -105,7 +105,7 @@ public class BarChartDemo {
|
||||||
final String valuesDataRange2 = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnSpeakers, columnSpeakers));
|
final String valuesDataRange2 = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnSpeakers, columnSpeakers));
|
||||||
final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, columnLanguages);
|
final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, columnLanguages);
|
||||||
final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values1, valuesDataRange, columnCountries);
|
final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values1, valuesDataRange, columnCountries);
|
||||||
values1[6] = 16.0; // if you ever want to change the underlying data
|
values1[6] = 16.0; // if you ever want to change the underlying data, it has to be done before building the data source
|
||||||
final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, columnSpeakers);
|
final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, columnSpeakers);
|
||||||
|
|
||||||
XDDFChartData.Series series1 = bar.getSeries(0);
|
XDDFChartData.Series series1 = bar.getSeries(0);
|
||||||
|
|
|
@ -28,13 +28,16 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
|
import org.apache.poi.util.Units;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.AxisCrossBetween;
|
||||||
import org.apache.poi.xddf.usermodel.chart.AxisCrosses;
|
import org.apache.poi.xddf.usermodel.chart.AxisCrosses;
|
||||||
import org.apache.poi.xddf.usermodel.chart.AxisPosition;
|
import org.apache.poi.xddf.usermodel.chart.AxisPosition;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.AxisTickMark;
|
||||||
import org.apache.poi.xddf.usermodel.chart.BarDirection;
|
import org.apache.poi.xddf.usermodel.chart.BarDirection;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.BarGrouping;
|
||||||
import org.apache.poi.xddf.usermodel.chart.ChartTypes;
|
import org.apache.poi.xddf.usermodel.chart.ChartTypes;
|
||||||
import org.apache.poi.xddf.usermodel.chart.LegendPosition;
|
import org.apache.poi.xddf.usermodel.chart.LegendPosition;
|
||||||
import org.apache.poi.xddf.usermodel.chart.XDDFBarChartData;
|
import org.apache.poi.xddf.usermodel.chart.XDDFBarChartData;
|
||||||
import org.apache.poi.xddf.usermodel.chart.XDDFChart;
|
|
||||||
import org.apache.poi.xddf.usermodel.chart.XDDFChartAxis;
|
import org.apache.poi.xddf.usermodel.chart.XDDFChartAxis;
|
||||||
import org.apache.poi.xddf.usermodel.chart.XDDFChartLegend;
|
import org.apache.poi.xddf.usermodel.chart.XDDFChartLegend;
|
||||||
import org.apache.poi.xddf.usermodel.chart.XDDFDataSource;
|
import org.apache.poi.xddf.usermodel.chart.XDDFDataSource;
|
||||||
|
@ -47,7 +50,7 @@ import org.apache.poi.xddf.usermodel.chart.XDDFValueAxis;
|
||||||
*/
|
*/
|
||||||
public class ChartFromScratch {
|
public class ChartFromScratch {
|
||||||
private static void usage(){
|
private static void usage(){
|
||||||
System.out.println("Usage: BarChartExample <bar-chart-data.txt>");
|
System.out.println("Usage: ChartFromScratch <bar-chart-data.txt>");
|
||||||
System.out.println(" bar-chart-data.txt the model to set. First line is chart title, " +
|
System.out.println(" bar-chart-data.txt the model to set. First line is chart title, " +
|
||||||
"then go pairs {axis-label value}");
|
"then go pairs {axis-label value}");
|
||||||
}
|
}
|
||||||
|
@ -86,8 +89,7 @@ public class ChartFromScratch {
|
||||||
try (XMLSlideShow ppt = new XMLSlideShow()) {
|
try (XMLSlideShow ppt = new XMLSlideShow()) {
|
||||||
XSLFSlide slide = ppt.createSlide();
|
XSLFSlide slide = ppt.createSlide();
|
||||||
XSLFChart chart = ppt.createChart();
|
XSLFChart chart = ppt.createChart();
|
||||||
Rectangle2D rect2D = new java.awt.Rectangle(XDDFChart.DEFAULT_X, XDDFChart.DEFAULT_Y,
|
Rectangle2D rect2D = new java.awt.Rectangle(fromCM(1.5), fromCM(4), fromCM(22), fromCM(14));
|
||||||
XDDFChart.DEFAULT_WIDTH, XDDFChart.DEFAULT_HEIGHT);
|
|
||||||
slide.addChart(chart, rect2D);
|
slide.addChart(chart, rect2D);
|
||||||
setBarData(chart, chartTitle, series, categories, values1, values2);
|
setBarData(chart, chartTitle, series, categories, values1, values2);
|
||||||
// save the result
|
// save the result
|
||||||
|
@ -99,6 +101,10 @@ public class ChartFromScratch {
|
||||||
System.out.println("Done");
|
System.out.println("Done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int fromCM(double cm) {
|
||||||
|
return (int) (Math.rint(cm * Units.EMU_PER_CENTIMETER));
|
||||||
|
}
|
||||||
|
|
||||||
private static void setBarData(XSLFChart chart, String chartTitle, String[] series, String[] categories, Double[] values1, Double[] values2) {
|
private static void setBarData(XSLFChart chart, String chartTitle, String[] series, String[] categories, Double[] values1, Double[] values2) {
|
||||||
// Use a category axis for the bottom axis.
|
// Use a category axis for the bottom axis.
|
||||||
XDDFChartAxis bottomAxis = chart.createCategoryAxis(AxisPosition.BOTTOM);
|
XDDFChartAxis bottomAxis = chart.createCategoryAxis(AxisPosition.BOTTOM);
|
||||||
|
@ -106,6 +112,8 @@ public class ChartFromScratch {
|
||||||
XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
|
XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
|
||||||
leftAxis.setTitle(series[0]+","+series[1]);
|
leftAxis.setTitle(series[0]+","+series[1]);
|
||||||
leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
|
leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
|
||||||
|
leftAxis.setMajorTickMark(AxisTickMark.OUT);
|
||||||
|
leftAxis.setCrossBetween(AxisCrossBetween.BETWEEN);
|
||||||
|
|
||||||
final int numOfPoints = categories.length;
|
final int numOfPoints = categories.length;
|
||||||
final String categoryDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnLanguages, columnLanguages));
|
final String categoryDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnLanguages, columnLanguages));
|
||||||
|
@ -113,11 +121,15 @@ public class ChartFromScratch {
|
||||||
final String valuesDataRange2 = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnSpeakers, columnSpeakers));
|
final String valuesDataRange2 = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnSpeakers, columnSpeakers));
|
||||||
final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, columnLanguages);
|
final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, columnLanguages);
|
||||||
final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values1, valuesDataRange, columnCountries);
|
final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values1, valuesDataRange, columnCountries);
|
||||||
values1[6] = 16.0; // if you ever want to change the underlying data
|
valuesData.setFormatCode("General");
|
||||||
|
values1[6] = 16.0; // if you ever want to change the underlying data, it has to be done before building the data source
|
||||||
final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, columnSpeakers);
|
final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, columnSpeakers);
|
||||||
|
valuesData2.setFormatCode("General");
|
||||||
|
|
||||||
|
|
||||||
XDDFBarChartData bar = (XDDFBarChartData) chart.createData(ChartTypes.BAR, bottomAxis, leftAxis);
|
XDDFBarChartData bar = (XDDFBarChartData) chart.createData(ChartTypes.BAR, bottomAxis, leftAxis);
|
||||||
|
bar.setBarGrouping(BarGrouping.CLUSTERED);
|
||||||
|
|
||||||
XDDFBarChartData.Series series1 = (XDDFBarChartData.Series) bar.addSeries(categoriesData, valuesData);
|
XDDFBarChartData.Series series1 = (XDDFBarChartData.Series) bar.addSeries(categoriesData, valuesData);
|
||||||
series1.setTitle(series[0], chart.setSheetTitle(series[0], columnCountries));
|
series1.setTitle(series[0], chart.setSheetTitle(series[0], columnCountries));
|
||||||
|
|
||||||
|
@ -134,10 +146,10 @@ public class ChartFromScratch {
|
||||||
|
|
||||||
chart.setTitleText(chartTitle);
|
chart.setTitleText(chartTitle);
|
||||||
chart.setTitleOverlay(false);
|
chart.setTitleOverlay(false);
|
||||||
|
chart.setAutoTitleDeleted(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int columnLanguages = 0;
|
private static final int columnLanguages = 0;
|
||||||
private static final int columnCountries = 1;
|
private static final int columnCountries = 1;
|
||||||
private static final int columnSpeakers = 2;
|
private static final int columnSpeakers = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,12 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.AxisCrossBetween;
|
||||||
import org.apache.poi.xddf.usermodel.chart.AxisCrosses;
|
import org.apache.poi.xddf.usermodel.chart.AxisCrosses;
|
||||||
import org.apache.poi.xddf.usermodel.chart.AxisPosition;
|
import org.apache.poi.xddf.usermodel.chart.AxisPosition;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.AxisTickMark;
|
||||||
import org.apache.poi.xddf.usermodel.chart.BarDirection;
|
import org.apache.poi.xddf.usermodel.chart.BarDirection;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.BarGrouping;
|
||||||
import org.apache.poi.xddf.usermodel.chart.ChartTypes;
|
import org.apache.poi.xddf.usermodel.chart.ChartTypes;
|
||||||
import org.apache.poi.xddf.usermodel.chart.LegendPosition;
|
import org.apache.poi.xddf.usermodel.chart.LegendPosition;
|
||||||
import org.apache.poi.xddf.usermodel.chart.XDDFBarChartData;
|
import org.apache.poi.xddf.usermodel.chart.XDDFBarChartData;
|
||||||
|
@ -48,7 +51,7 @@ import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
*/
|
*/
|
||||||
public class ChartFromScratch {
|
public class ChartFromScratch {
|
||||||
private static void usage(){
|
private static void usage(){
|
||||||
System.out.println("Usage: BarChartExample <bar-chart-data.txt>");
|
System.out.println("Usage: ChartFromScratch <bar-chart-data.txt>");
|
||||||
System.out.println(" bar-chart-data.txt the model to set. First line is chart title, " +
|
System.out.println(" bar-chart-data.txt the model to set. First line is chart title, " +
|
||||||
"then go pairs {axis-label value}");
|
"then go pairs {axis-label value}");
|
||||||
}
|
}
|
||||||
|
@ -85,10 +88,10 @@ public class ChartFromScratch {
|
||||||
Double[] values2 = listSpeakers.toArray(new Double[0]);
|
Double[] values2 = listSpeakers.toArray(new Double[0]);
|
||||||
|
|
||||||
try (XWPFDocument doc = new XWPFDocument()) {
|
try (XWPFDocument doc = new XWPFDocument()) {
|
||||||
XWPFChart chart = doc.createChart(XDDFChart.DEFAULT_WIDTH, XDDFChart.DEFAULT_HEIGHT);
|
XWPFChart chart = doc.createChart(XDDFChart.DEFAULT_WIDTH * 10, XDDFChart.DEFAULT_HEIGHT * 15);
|
||||||
setBarData(chart, chartTitle, series, categories, values1, values2);
|
setBarData(chart, chartTitle, series, categories, values1, values2);
|
||||||
// save the result
|
// save the result
|
||||||
try (OutputStream out = new FileOutputStream("bar-chart-demo-output.docx")) {
|
try (OutputStream out = new FileOutputStream("chart-from-scratch.docx")) {
|
||||||
doc.write(out);
|
doc.write(out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,23 +110,29 @@ public class ChartFromScratch {
|
||||||
XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
|
XDDFValueAxis leftAxis = chart.createValueAxis(AxisPosition.LEFT);
|
||||||
leftAxis.setTitle(series[0]+","+series[1]);
|
leftAxis.setTitle(series[0]+","+series[1]);
|
||||||
leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
|
leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);
|
||||||
|
leftAxis.setMajorTickMark(AxisTickMark.OUT);
|
||||||
|
leftAxis.setCrossBetween(AxisCrossBetween.BETWEEN);
|
||||||
|
|
||||||
final int numOfPoints = categories.length;
|
final int numOfPoints = categories.length;
|
||||||
final String categoryDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, 0, 0));
|
final String categoryDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnLanguages, columnLanguages));
|
||||||
final String valuesDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, 1, 1));
|
final String valuesDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnCountries, columnCountries));
|
||||||
final String valuesDataRange2 = chart.formatRange(new CellRangeAddress(1, numOfPoints, 2, 2));
|
final String valuesDataRange2 = chart.formatRange(new CellRangeAddress(1, numOfPoints, columnSpeakers, columnSpeakers));
|
||||||
final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, 0);
|
final XDDFDataSource<?> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, columnLanguages);
|
||||||
final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values1, valuesDataRange, 1);
|
final XDDFNumericalDataSource<? extends Number> valuesData = XDDFDataSourcesFactory.fromArray(values1, valuesDataRange, columnCountries);
|
||||||
values1[6] = 16.0; // if you ever want to change the underlying data
|
valuesData.setFormatCode("General");
|
||||||
final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, 2);
|
values1[6] = 16.0; // if you ever want to change the underlying data, it has to be done before building the data source
|
||||||
|
final XDDFNumericalDataSource<? extends Number> valuesData2 = XDDFDataSourcesFactory.fromArray(values2, valuesDataRange2, columnSpeakers);
|
||||||
|
valuesData2.setFormatCode("General");
|
||||||
|
|
||||||
|
|
||||||
XDDFBarChartData bar = (XDDFBarChartData) chart.createData(ChartTypes.BAR, bottomAxis, leftAxis);
|
XDDFBarChartData bar = (XDDFBarChartData) chart.createData(ChartTypes.BAR, bottomAxis, leftAxis);
|
||||||
|
bar.setBarGrouping(BarGrouping.CLUSTERED);
|
||||||
|
|
||||||
XDDFBarChartData.Series series1 = (XDDFBarChartData.Series) bar.addSeries(categoriesData, valuesData);
|
XDDFBarChartData.Series series1 = (XDDFBarChartData.Series) bar.addSeries(categoriesData, valuesData);
|
||||||
series1.setTitle(series[0], chart.setSheetTitle(series[0], 1));
|
series1.setTitle(series[0], chart.setSheetTitle(series[0], columnCountries));
|
||||||
|
|
||||||
XDDFBarChartData.Series series2 = (XDDFBarChartData.Series) bar.addSeries(categoriesData, valuesData2);
|
XDDFBarChartData.Series series2 = (XDDFBarChartData.Series) bar.addSeries(categoriesData, valuesData2);
|
||||||
series2.setTitle(series[1], chart.setSheetTitle(series[1], 2));
|
series2.setTitle(series[1], chart.setSheetTitle(series[1], columnSpeakers));
|
||||||
|
|
||||||
bar.setVaryColors(true);
|
bar.setVaryColors(true);
|
||||||
bar.setBarDirection(BarDirection.COL);
|
bar.setBarDirection(BarDirection.COL);
|
||||||
|
@ -135,6 +144,11 @@ public class ChartFromScratch {
|
||||||
|
|
||||||
chart.setTitleText(chartTitle);
|
chart.setTitleText(chartTitle);
|
||||||
chart.setTitleOverlay(false);
|
chart.setTitleOverlay(false);
|
||||||
|
chart.setAutoTitleDeleted(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final int columnLanguages = 0;
|
||||||
|
private static final int columnCountries = 1;
|
||||||
|
private static final int columnSpeakers = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -392,7 +392,7 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
||||||
series.plot();
|
series.plot();
|
||||||
XDDFDataSource<?> categoryDS = series.getCategoryData();
|
XDDFDataSource<?> categoryDS = series.getCategoryData();
|
||||||
XDDFNumericalDataSource<? extends Number> valuesDS = series.getValuesData();
|
XDDFNumericalDataSource<? extends Number> valuesDS = series.getValuesData();
|
||||||
if (categoryDS.isReference() || valuesDS.isReference()
|
if (categoryDS.isCellRange() || valuesDS.isCellRange()
|
||||||
|| categoryDS.isLiteral() || valuesDS.isLiteral()) {
|
|| categoryDS.isLiteral() || valuesDS.isLiteral()) {
|
||||||
// let's assume the data is already in the sheet
|
// let's assume the data is already in the sheet
|
||||||
} else {
|
} else {
|
||||||
|
@ -773,8 +773,14 @@ public abstract class XDDFChart extends POIXMLDocumentPart implements TextContai
|
||||||
int numOfPoints = categoryData.getPointCount();
|
int numOfPoints = categoryData.getPointCount();
|
||||||
for (int i = 0; i < numOfPoints; i++) {
|
for (int i = 0; i < numOfPoints; i++) {
|
||||||
XSSFRow row = this.getRow(sheet, i + 1); // first row is for title
|
XSSFRow row = this.getRow(sheet, i + 1); // first row is for title
|
||||||
this.getCell(row, categoryData.getColIndex()).setCellValue(categoryData.getPointAt(i).toString());
|
Object category = categoryData.getPointAt(i);
|
||||||
this.getCell(row, valuesData.getColIndex()).setCellValue(valuesData.getPointAt(i).doubleValue());
|
if (category != null) {
|
||||||
|
this.getCell(row, categoryData.getColIndex()).setCellValue(category.toString());
|
||||||
|
}
|
||||||
|
Number value = valuesData.getPointAt(i);
|
||||||
|
if (value != null) {
|
||||||
|
this.getCell(row, valuesData.getColIndex()).setCellValue(value.doubleValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,11 @@ public interface XDDFDataSource<T> {
|
||||||
*/
|
*/
|
||||||
boolean isLiteral();
|
boolean isLiteral();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since POI 4.1.2
|
||||||
|
*/
|
||||||
|
boolean isCellRange();
|
||||||
|
|
||||||
boolean isReference();
|
boolean isReference();
|
||||||
|
|
||||||
boolean isNumeric();
|
boolean isNumeric();
|
||||||
|
|
|
@ -46,6 +46,11 @@ public class XDDFDataSourcesFactory {
|
||||||
return new XDDFCategoryDataSource() {
|
return new XDDFCategoryDataSource() {
|
||||||
private CTNumData category = (CTNumData) categoryDS.getNumRef().getNumCache().copy();
|
private CTNumData category = (CTNumData) categoryDS.getNumRef().getNumCache().copy();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCellRange() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isNumeric() {
|
public boolean isNumeric() {
|
||||||
return true;
|
return true;
|
||||||
|
@ -70,6 +75,11 @@ public class XDDFDataSourcesFactory {
|
||||||
return new XDDFCategoryDataSource() {
|
return new XDDFCategoryDataSource() {
|
||||||
private CTStrData category = (CTStrData) categoryDS.getStrRef().getStrCache().copy();
|
private CTStrData category = (CTStrData) categoryDS.getStrRef().getStrCache().copy();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCellRange() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFormula() {
|
public String getFormula() {
|
||||||
return categoryDS.getStrRef().getF();
|
return categoryDS.getStrRef().getF();
|
||||||
|
@ -108,6 +118,11 @@ public class XDDFDataSourcesFactory {
|
||||||
this.formatCode = formatCode;
|
this.formatCode = formatCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCellRange() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isNumeric() {
|
public boolean isNumeric() {
|
||||||
return true;
|
return true;
|
||||||
|
@ -199,6 +214,11 @@ public class XDDFDataSourcesFactory {
|
||||||
return elements[index];
|
return elements[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCellRange() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isReference() {
|
public boolean isReference() {
|
||||||
return dataRange != null;
|
return dataRange != null;
|
||||||
|
@ -310,6 +330,11 @@ public class XDDFDataSourcesFactory {
|
||||||
return numOfCells;
|
return numOfCells;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCellRange() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isReference() {
|
public boolean isReference() {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue