Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 32619 invoked from network); 27 May 2008 11:45:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 May 2008 11:45:16 -0000 Received: (qmail 16969 invoked by uid 500); 27 May 2008 11:45:18 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 16928 invoked by uid 500); 27 May 2008 11:45:18 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 16919 invoked by uid 99); 27 May 2008 11:45:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 04:45:18 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 11:44:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E6FB92388A0B; Tue, 27 May 2008 04:44:52 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080527114452.E6FB92388A0B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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