mirror of https://github.com/apache/poi.git
X, Y, Width and Height getters/setters on HSSFChart
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@660474 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
478ec9eabf
commit
f5bcbf9116
|
@ -213,6 +213,23 @@ public class HSSFChart
|
|||
charts.toArray( new HSSFChart[charts.size()] );
|
||||
}
|
||||
|
||||
/** Get the X offset of the chart */
|
||||
public int getChartX() { return chartRecord.getX(); }
|
||||
/** Get the Y offset of the chart */
|
||||
public int getChartY() { return chartRecord.getY(); }
|
||||
/** Get the width of the chart. {@link ChartRecord} */
|
||||
public int getChartWidth() { return chartRecord.getWidth(); }
|
||||
/** Get the height of the chart. {@link ChartRecord} */
|
||||
public int getChartHeight() { return chartRecord.getHeight(); }
|
||||
|
||||
/** Sets the X offset of the chart */
|
||||
public void setChartX(int x) { chartRecord.setX(x); }
|
||||
/** Sets the Y offset of the chart */
|
||||
public void setChartY(int y) { chartRecord.setY(y); }
|
||||
/** Sets the width of the chart. {@link ChartRecord} */
|
||||
public void setChartWidth(int width) { chartRecord.setWidth(width); }
|
||||
/** Sets the height of the chart. {@link ChartRecord} */
|
||||
public void setChartHeight(int height) { chartRecord.setHeight(height); }
|
||||
|
||||
/**
|
||||
* Returns the series of the chart
|
||||
|
|
|
@ -53,6 +53,12 @@ public class TestHSSFChart extends TestCase {
|
|||
assertEquals("1st Column", charts[0].getSeries()[0].getSeriesTitle());
|
||||
assertEquals("2nd Column", charts[0].getSeries()[1].getSeriesTitle());
|
||||
assertEquals(null, charts[0].getChartTitle());
|
||||
|
||||
// Check x, y, width, height
|
||||
assertEquals(0, charts[0].getChartX());
|
||||
assertEquals(0, charts[0].getChartY());
|
||||
assertEquals(26492928, charts[0].getChartWidth());
|
||||
assertEquals(15040512, charts[0].getChartHeight());
|
||||
}
|
||||
|
||||
public void testTwoCharts() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue