poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r660474 - in /poi/trunk/src/scratchpad: src/org/apache/poi/hssf/usermodel/HSSFChart.java testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java
Date Tue, 27 May 2008 11:44:51 GMT
Author: nick
Date: Tue May 27 04:44:49 2008
New Revision: 660474

URL: http://svn.apache.org/viewvc?rev=660474&view=rev
Log:
X, Y, Width and Height getters/setters on HSSFChart

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java?rev=660474&r1=660473&r2=660474&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java Tue May 27 04:44:49
2008
@@ -213,6 +213,23 @@
     		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

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java?rev=660474&r1=660473&r2=660474&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java Tue
May 27 04:44:49 2008
@@ -53,6 +53,12 @@
 		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 {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message