incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r795089 [3/3] - in /websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo: demo10.html demo2.html demo3.html demo4.html demo5.html demo6.html demo7.html demo8.html demo9.html index.html
Date Thu, 01 Sep 2011 10:05:27 GMT
Modified: websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo/demo9.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo/demo9.html (original)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo/demo9.html Thu Sep  1 10:05:27 2011
@@ -21,38 +21,8 @@
 
 <link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
 
-
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="stylesheet" href="../images/style.css" type="text/css" />
-<link type="text/css" rel="stylesheet" href="styles/shCoreEclipse.css"/>
-<title>Demos - SimpleODF</title>
-<style type="text/css">
-<!--

-.STYLE1 {

-	color: #FFFFFF;

-	font-size: 24px;

-}

-.STYLE2 {font-size: 32px}

-.STYLE3 {font-size: 16px}

-.STYLE4 {font-size: 36px}

--->
-</style>
-<script type="text/javascript" src="scripts/shCore.js"></script>  
-<script type="text/javascript" src="scripts/shBrushJava.js"></script>  
-<script type="text/javascript"> SyntaxHighlighter.all();</script>
-<script type="text/javascript">
-  var _gaq = _gaq || [];

-  _gaq.push(['_setAccount', 'UA-22366020-1']);

-  _gaq.push(['_trackPageview']);

-

-  (function() {

-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

-  })();

-

-</script>
-
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
 </head>
 
@@ -66,64 +36,300 @@
   </div>
   <div id="clear"></div>
   
-  <div id="content">
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
   
     
-    
-<div id="page" align="center">
-<div id="content" style="width:920px" class="contentpanel">
-<div id="topheader">
-    <div class="topright"> </div>
-</div>
-<div id="menu">
-<div align="left" class="smallwhitetext"> <a href="../index.html" class="home"> </a> <a href="../downloads.html" class="download"></a> <a href="../documents.html" class="document"></a> <a href="../demo/index.html" class="sample"> </a> </div>
-</div>
-<div id="subcontent" align ="left">
-        <div align="left" class="titletext"> <span>
-		<a href="index.html">Simple Demos<a> > 
-		<a href="demo9.html">Demo 8: Create Analysis Report with Charts<a>
-	</span> 
-</div>
-<!---------------------------------------------------------------------------------------------------->	
-<div class="contenttitle">
-    <a name="overview">Overview</a>
-</div>
-<div class="bodytext">
-    <p>
	Simple ODF provides Chart API since version 0.6. Chart is a visualized way of data show in electronic document. For ODF document, text document, spreadsheet document and presentation document can embed charts to help describe content. This demo shows the power of chart support in Simple ODF.<br/><br/>
	In this demo, a web traffic analytics report will be generated in presentation document and text document format. The initial data is stored in a spreadsheet document, which includes visitors, traffic sources and page visit information. These data will be used in charts. Each chart chooses a cell range and uses the values of these cells to draw picture. It's easy and convenient.<br/><br/>
	No need predefined template, all of the document are generated by Simple ODF API. This demo not only tell you how to use Chart API, but also teach you ro use slide layout to improve presentation design.<br/><br/>
	This picture shows the generated presentation document.<br/><br/>
-	<img src="image/demo9p.png"></img><br/><br/>
	This picture shows the generated text document.<br/><br/>
	<img src="image/demo9t.png"></img><br/><br/>
	Besides, we also supply some codes to show how to create chart in a spreadsheet document. The following picture shows the generated document.<br/><br/> 
	<img src="image/demo9s.png"></img><br/>
-	</p>
-</div>
-<hr/>
-<div class="contenttitle">
-    <a name="codeintroduction">Code Introduction</a>
-</div>
-<div class="bodytext">
-    <p>
-	There code of this demo is very clear. First, we create a presentation document and load the data document. Second, we create cover page and set its content. Thirdly, we add charts to each slide. If you want to add chart to a slide, you must chose a layout which can hold chart. In Simple ODF 0.6, these layouts are "TITLE_PLUS_CHART", "TITLE_PLUS_2_CHART", "TITLE_LEFT_CHART_RIGHT_OUTLINE", "TITLE_PLUS_3_OBJECT", "TITLE_PLUS_4_OBJECT". Different layout can own different count of charts. Please be sure you know that, otherwise chart insert would be failed. For slide, you needn't set the chart size or position, Simple ODF will do it automatically. Finally, the data document is closed and the new created document is saved. <br/><br/>
-    <!--java code-->
-    <pre class="brush:java;">
-	private static void generatePresentationChart() {
		try {
			PresentationDocument presentationDoc = PresentationDocument.newPresentationDocument();
			SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.loadDocument("demo9_data.ods");

			// create cover page
			Slide slide = presentationDoc.newSlide(0, "Slide1",	SlideLayout.TITLE_SUBTITLE);
			setSlideTextContent(slide, "Simple Website Analytics Report", "2011-04-27~2011-05-27");

			// create visitors overview page 1
			slide = presentationDoc.newSlide(1, "Slide2", SlideLayout.TITLE_PLUS_3_OBJECT);
			setSlideTextContent(slide, "Visitors Overview");
			Table tableA = spreadsheetDoc.getTableByName("A");
			convertFromTableToList(tableA, slide.addList(), 4, 17, 5, 20);
			CellRangeAddressList cellRange = CellRangeAddressList.valueOf("A.A1:A.B3");
			Chart chart = slide.createChart("New Visitor VS. Returning Visitor", spreadsheetDoc, cellRange, true, true, false, null);
			chart.setChartType(ChartType.PIE);
			cellRange = CellRangeAddressList.valueOf("A.A6:A.B37");
			chart = slide.createChart("Daily Visit", spreadsheetDoc, cellRange,	true, true, false, null);
			chart.setChartType(ChartType.LINE);

			// create visitors overview page 2
			slide = presentationDoc.newSlide(2, "Slide3", SlideLayout.TITLE_PLUS_2_CHART);
			setSlideTextContent(slide, "Visitors Overview");
			cellRange = CellRangeAddressList.valueOf("A.E1:A.G14");
			chart = slide.createChart("Count of Visits", spreadsheetDoc, cellRange, true, true, false, null);
			chart.setChartType(ChartType.BAR);
			cellRange = CellRangeAddressList.valueOf("A.I1:A.K8");
			chart = slide.createChart("Visit Duration", spreadsheetDoc,	cellRange, true, true, false, null);

			// create traffic sources overview page
			slide = presentationDoc.newSlide(3, "Slide4", SlideLayout.TITLE_PLUS_4_OBJECT);
			setSlideTextContent(slide, "Traffic Sources Overview");
			Table tableB = spreadsheetDoc.getTableByName("B");
			convertFromTableToList(tableB, slide.addList(), 0, 2, 1, 4);
			cellRange = CellRangeAddressList.valueOf("B.A2:B.C5");
			chart = slide.createChart("Traffic Sources Type", spreadsheetDoc, cellRange, true, true, false, null);
			chart.setChartType(ChartType.PIE);
			cellRange = CellRangeAddressList.valueOf("B.A9:B.C19");
			chart = slide.createChart("Referral Traffic", spreadsheetDoc, cellRange, true, true, false, null);
			chart.setChartType(ChartType.PIE);
			cellRange = CellRangeAddressList.valueOf("B.E2:B.G8");
			chart = slide.createChart("Search Keyword", spreadsheetDoc,	cellRange, true, true, false, null);
			chart.setChartType(ChartType.PIE);

			// create content overview page
			slide = presentationDoc.newSlide(4, "Slide5", SlideLayout.TITLE_PLUS_CHART);
			setSlideTextContent(slide, "Content Overview");
			cellRange = CellRangeAddressList.valueOf("C.A1:C.C8");
			chart = slide.createChart("Page Visit", spreadsheetDoc, cellRange, true, true, false, null);
			chart.setChartType(ChartType.BAR);

			spreadsheetDoc.close();
			presentationDoc.save("demo9p.odp");
			presentationDoc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
-    </pre>
-</p>
<p>
	The following codes show how to generate the text document format report. Different from presentation, you need to set chart size before add it to the document.<br/><br/>
    <!--java code-->
    <pre class="brush:java;">
	private static void generateTextDocument() {
		try {
			TextDocument textDoc = TextDocument.newTextDocument();
			SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.loadDocument("demo9_data.ods");

			// create cover page
			textDoc.addParagraph("Simple Website Analytics Report(2011-04-27~2011-05-27)");
			textDoc.addParagraph("Visitors Overview");
			// create visitors overview page 1
			CellRangeAddressList cellRange = CellRangeAddressList.valueOf("A.A1:A.B3");
			Rectangle rect = new Rectangle();
			rect.width = 14000;
			rect.height = 8000;
			Chart chart = textDoc.createChart("New Visitor VS. Returning Visitor", spreadsheetDoc, cellRange, true, true, false, rect);
			chart.setChartType(ChartType.PIE);
			cellRange = CellRangeAddressList.valueOf("A.A6:A.B37");
			chart = textDoc.createChart("Daily Visit", spreadsheetDoc,cellRange, true, true, false, rect);
			chart.setChartType(ChartType.LINE);
			cellRange = CellRangeAddressList.valueOf("A.E1:A.G14");
			chart = textDoc.createChart("Count of Visits", spreadsheetDoc, cellRange, true, true, false, rect);
			chart.setChartType(ChartType.BAR);
			cellRange = CellRangeAddressList.valueOf("A.I1:A.K8");
			chart = textDoc.createChart("Visit Duration", spreadsheetDoc, cellRange, true, true, false, rect);

			// create traffic sources overview page
			textDoc.addParagraph("Traffic Sources Overview");
			cellRange = CellRangeAddressList.valueOf("B.A2:B.C5");
			chart = textDoc.createChart("Traffic Sources Type", spreadsheetDoc,	cellRange, true, true, false, rect);
			chart.setChartType(ChartType.PIE);
			cellRange = CellRangeAddressList.valueOf("B.A9:B.C19");
			chart = textDoc.createChart("Referral Traffic", spreadsheetDoc,	cellRange, true, true, false, rect);
			chart.setChartType(ChartType.PIE);
			cellRange = CellRangeAddressList.valueOf("B.E2:B.G8");
			chart = textDoc.createChart("Search Keyword", spreadsheetDoc, cellRange, true, true, false, rect);
			chart.setChartType(ChartType.PIE);

			// create content overview page
			textDoc.addParagraph("Content Overview");
			cellRange = CellRangeAddressList.valueOf("C.A1:C.C8");
			chart = textDoc.createChart("Page Visit", spreadsheetDoc, cellRange, true, true, false, rect);
			chart.setChartType(ChartType.BAR);
			
			spreadsheetDoc.close();
			textDoc.save("demo9t.odt");
			textDoc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
    </pre>
</p>
<p>
	Lastly, let's have a look at how to add chart to spreadsheet document. It's similar with text and presentation documents. On the other hand, it also has a special feature. You can specify a cell as the position where the chart should be located.<br/><br/>
    <!--java code-->
    <pre class="brush:java;">
	private static void generateSpreadsheetDocument() {
		try {
			SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.loadDocument("demo9_data.ods");
			// create visitors overview page 1
			CellRangeAddressList cellRange = CellRangeAddressList.valueOf("A.A1:A.B3");
			Rectangle rect = new Rectangle();
			rect.width = 15000;
			rect.height = 8000;
			Cell positionCell = spreadsheetDoc.getTableByName("B").getCellByPosition("E1");
			spreadsheetDoc.createChart("Page Visit", spreadsheetDoc, cellRange,	true, true, false, rect, positionCell);
			spreadsheetDoc.save("demo9s.ods");
			spreadsheetDoc.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
    </pre>
</p>
-</div>
-<hr/>
-<div class="contenttitle">
-    <a name="download">Download</a>
-</div>
-<div class="bodytext">
-  <p>
-    Powered by the Simple Java API for ODF version  <a target="_new" href="../downloads.html"><img src="../images/link.png"></img>0.6</a>.
-  </p>
-  <p>
-    You can download the code of this demo from <a href="demo9.zip"><img src="../images/link.png"></img>here</a>.
-  </p>
</div>
-<!---------------------------------------------------------------------------------------------------->		
-</div>
-<div id="footer" class="smallgraytext"> <a href="#">Home</a> | <a href="#">About Us</a> | <a href="#">Contact Us</a> </div>
-</div>
-</div>
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" href="../images/style.css" type="text/css" />
+<link type="text/css" rel="stylesheet" href="styles/shCoreEclipse.css"/>
+<title>Demos - SimpleODF</title>
+<style type="text/css">
+<!--
+
+.STYLE1 {
+
+color: #FFFFFF;
+
+font-size: 24px;
+
+}
+
+.STYLE2 {font-size: 32px}
+
+.STYLE3 {font-size: 16px}
+
+.STYLE4 {font-size: 36px}
+
+-->
+</style>
+<script type="text/javascript" src="scripts/shCore.js"></script>  
+<script type="text/javascript" src="scripts/shBrushJava.js"></script>  
+<script type="text/javascript"> SyntaxHighlighter.all();</script>
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+
+_gaq.push(['_setAccount', 'UA-22366020-1']);
+
+_gaq.push(['_trackPageview']);
+
+(function() {
+
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 
+})();
 
+</script>
+</head>
+<body>
+<div id="page" align="center">
+<div id="content" style="width:920px" class="contentpanel">
+<div id="topheader">
+    <div class="topright"> </div>
+</div>
+<div id="menu">
+<div align="left" class="smallwhitetext"> <a href="../index.html" class="home"> </a> <a href="../downloads.html" class="download"></a> <a href="../documents.html" class="document"></a> <a href="../demo/index.html" class="sample"> </a> </div>
+</div>
+<div id="subcontent" align ="left">
+        <div align="left" class="titletext"> <span>
+        <a href="index.html">Simple Demos<a> > 
+        <a href="demo9.html">Demo 8: Create Analysis Report with Charts<a>
+    </span> 
+</div>
+<!----------------------------------------------------------------------------------------------------> 
+<div class="contenttitle">
+    <a name="overview">Overview</a>
+</div>
+<div class="bodytext">
+    <p>
+    Simple ODF provides Chart API since version 0.6. Chart is a visualized way of data show in electronic document. For ODF document, text document, spreadsheet document and presentation document can embed charts to help describe content. This demo shows the power of chart support in Simple ODF.<br/><br/>
+    In this demo, a web traffic analytics report will be generated in presentation document and text document format. The initial data is stored in a spreadsheet document, which includes visitors, traffic sources and page visit information. These data will be used in charts. Each chart chooses a cell range and uses the values of these cells to draw picture. It's easy and convenient.<br/><br/>
+    No need predefined template, all of the document are generated by Simple ODF API. This demo not only tell you how to use Chart API, but also teach you ro use slide layout to improve presentation design.<br/><br/>
+    This picture shows the generated presentation document.<br/><br/>
+    <img src="image/demo9p.png"></img><br/><br/>
+    This picture shows the generated text document.<br/><br/>
+    <img src="image/demo9t.png"></img><br/><br/>
+    Besides, we also supply some codes to show how to create chart in a spreadsheet document. The following picture shows the generated document.<br/><br/> 
+    <img src="image/demo9s.png"></img><br/>
+    </p>
+</div>
+<hr/>
+<div class="contenttitle">
+    <a name="codeintroduction">Code Introduction</a>
+</div>
+<div class="bodytext">
+    <p>
+    There code of this demo is very clear. First, we create a presentation document and load the data document. Second, we create cover page and set its content. Thirdly, we add charts to each slide. If you want to add chart to a slide, you must chose a layout which can hold chart. In Simple ODF 0.6, these layouts are "TITLE_PLUS_CHART", "TITLE_PLUS_2_CHART", "TITLE_LEFT_CHART_RIGHT_OUTLINE", "TITLE_PLUS_3_OBJECT", "TITLE_PLUS_4_OBJECT". Different layout can own different count of charts. Please be sure you know that, otherwise chart insert would be failed. For slide, you needn't set the chart size or position, Simple ODF will do it automatically. Finally, the data document is closed and the new created document is saved. <br/><br/>
+    <!--java code-->
+    <pre class="brush:java;">
+    private static void generatePresentationChart() {
+        try {
+            PresentationDocument presentationDoc = PresentationDocument.newPresentationDocument();
+            SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.loadDocument("demo9_data.ods");
+
+<div class="codehilite"><pre>        <span class="sr">//</span> <span class="n">create</span> <span class="n">cover</span> <span class="n">page</span>
+        <span class="n">Slide</span> <span class="n">slide</span> <span class="o">=</span> <span class="n">presentationDoc</span><span class="o">.</span><span class="n">newSlide</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s">&quot;Slide1&quot;</span><span class="p">,</span> <span class="n">SlideLayout</span><span class="o">.</span><span class="n">TITLE_SUBTITLE</span><span class="p">);</span>
+        <span class="n">setSlideTextContent</span><span class="p">(</span><span class="n">slide</span><span class="p">,</span> <span class="s">&quot;Simple Website Analytics Report&quot;</span><span class="p">,</span> <span class="s">&quot;2011-04-27~2011-05-27&quot;</span><span class="p">);</span>
+
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">visitors</span> <span class="n">overview</span> <span class="n">page</span> <span class="mi">1</span>
+        <span class="n">slide</span> <span class="o">=</span> <span class="n">presentationDoc</span><span class="o">.</span><span class="n">newSlide</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s">&quot;Slide2&quot;</span><span class="p">,</span> <span class="n">SlideLayout</span><span class="o">.</span><span class="n">TITLE_PLUS_3_OBJECT</span><span class="p">);</span>
+        <span class="n">setSlideTextContent</span><span class="p">(</span><span class="n">slide</span><span class="p">,</span> <span class="s">&quot;Visitors Overview&quot;</span><span class="p">);</span>
+        <span class="n">Table</span> <span class="n">tableA</span> <span class="o">=</span> <span class="n">spreadsheetDoc</span><span class="o">.</span><span class="n">getTableByName</span><span class="p">(</span><span class="s">&quot;A&quot;</span><span class="p">);</span>
+        <span class="n">convertFromTableToList</span><span class="p">(</span><span class="n">tableA</span><span class="p">,</span> <span class="n">slide</span><span class="o">.</span><span class="n">addList</span><span class="p">(),</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">20</span><span class="p">);</span>
+        <span class="n">CellRangeAddressList</span> <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.A1:A.B3&quot;</span><span class="p">);</span>
+        <span class="n">Chart</span> <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;New Visitor VS. Returning Visitor&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.A6:A.B37&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Daily Visit&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">LINE</span><span class="p">);</span>
+
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">visitors</span> <span class="n">overview</span> <span class="n">page</span> <span class="mi">2</span>
+        <span class="n">slide</span> <span class="o">=</span> <span class="n">presentationDoc</span><span class="o">.</span><span class="n">newSlide</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="s">&quot;Slide3&quot;</span><span class="p">,</span> <span class="n">SlideLayout</span><span class="o">.</span><span class="n">TITLE_PLUS_2_CHART</span><span class="p">);</span>
+        <span class="n">setSlideTextContent</span><span class="p">(</span><span class="n">slide</span><span class="p">,</span> <span class="s">&quot;Visitors Overview&quot;</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.E1:A.G14&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Count of Visits&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">BAR</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.I1:A.K8&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Visit Duration&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">traffic</span> <span class="n">sources</span> <span class="n">overview</span> <span class="n">page</span>
+        <span class="n">slide</span> <span class="o">=</span> <span class="n">presentationDoc</span><span class="o">.</span><span class="n">newSlide</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="s">&quot;Slide4&quot;</span><span class="p">,</span> <span class="n">SlideLayout</span><span class="o">.</span><span class="n">TITLE_PLUS_4_OBJECT</span><span class="p">);</span>
+        <span class="n">setSlideTextContent</span><span class="p">(</span><span class="n">slide</span><span class="p">,</span> <span class="s">&quot;Traffic Sources Overview&quot;</span><span class="p">);</span>
+        <span class="n">Table</span> <span class="n">tableB</span> <span class="o">=</span> <span class="n">spreadsheetDoc</span><span class="o">.</span><span class="n">getTableByName</span><span class="p">(</span><span class="s">&quot;B&quot;</span><span class="p">);</span>
+        <span class="n">convertFromTableToList</span><span class="p">(</span><span class="n">tableB</span><span class="p">,</span> <span class="n">slide</span><span class="o">.</span><span class="n">addList</span><span class="p">(),</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;B.A2:B.C5&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Traffic Sources Type&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;B.A9:B.C19&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Referral Traffic&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;B.E2:B.G8&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Search Keyword&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">content</span> <span class="n">overview</span> <span class="n">page</span>
+        <span class="n">slide</span> <span class="o">=</span> <span class="n">presentationDoc</span><span class="o">.</span><span class="n">newSlide</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="s">&quot;Slide5&quot;</span><span class="p">,</span> <span class="n">SlideLayout</span><span class="o">.</span><span class="n">TITLE_PLUS_CHART</span><span class="p">);</span>
+        <span class="n">setSlideTextContent</span><span class="p">(</span><span class="n">slide</span><span class="p">,</span> <span class="s">&quot;Content Overview&quot;</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;C.A1:C.C8&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">slide</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Page Visit&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">BAR</span><span class="p">);</span>
+
+        <span class="n">spreadsheetDoc</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
+        <span class="n">presentationDoc</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="s">&quot;demo9p.odp&quot;</span><span class="p">);</span>
+        <span class="n">presentationDoc</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
+    <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">Exception</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">e</span><span class="o">.</span><span class="n">printStackTrace</span><span class="p">();</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+<span class="sr">&lt;/pre&gt;</span>
+</pre></div>
+
+
+<p></p>
+<p>
+    The following codes show how to generate the text document format report. Different from presentation, you need to set chart size before add it to the document.<br/><br/>
+    <!--java code-->
+    <pre class="brush:java;">
+    private static void generateTextDocument() {
+        try {
+            TextDocument textDoc = TextDocument.newTextDocument();
+            SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.loadDocument("demo9_data.ods");</p>
+<div class="codehilite"><pre>        <span class="sr">//</span> <span class="n">create</span> <span class="n">cover</span> <span class="n">page</span>
+        <span class="n">textDoc</span><span class="o">.</span><span class="n">addParagraph</span><span class="p">(</span><span class="s">&quot;Simple Website Analytics Report(2011-04-27~2011-05-27)&quot;</span><span class="p">);</span>
+        <span class="n">textDoc</span><span class="o">.</span><span class="n">addParagraph</span><span class="p">(</span><span class="s">&quot;Visitors Overview&quot;</span><span class="p">);</span>
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">visitors</span> <span class="n">overview</span> <span class="n">page</span> <span class="mi">1</span>
+        <span class="n">CellRangeAddressList</span> <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.A1:A.B3&quot;</span><span class="p">);</span>
+        <span class="n">Rectangle</span> <span class="n">rect</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Rectangle</span><span class="p">();</span>
+        <span class="n">rect</span><span class="o">.</span><span class="n">width</span> <span class="o">=</span> <span class="mi">14000</span><span class="p">;</span>
+        <span class="n">rect</span><span class="o">.</span><span class="n">height</span> <span class="o">=</span> <span class="mi">8000</span><span class="p">;</span>
+        <span class="n">Chart</span> <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;New Visitor VS. Returning Visitor&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.A6:A.B37&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Daily Visit&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span><span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">LINE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.E1:A.G14&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Count of Visits&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">BAR</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;A.I1:A.K8&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Visit Duration&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">traffic</span> <span class="n">sources</span> <span class="n">overview</span> <span class="n">page</span>
+        <span class="n">textDoc</span><span class="o">.</span><span class="n">addParagraph</span><span class="p">(</span><span class="s">&quot;Traffic Sources Overview&quot;</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;B.A2:B.C5&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Traffic Sources Type&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;B.A9:B.C19&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Referral Traffic&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;B.E2:B.G8&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Search Keyword&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">PIE</span><span class="p">);</span>
+
+        <span class="sr">//</span> <span class="n">create</span> <span class="n">content</span> <span class="n">overview</span> <span class="n">page</span>
+        <span class="n">textDoc</span><span class="o">.</span><span class="n">addParagraph</span><span class="p">(</span><span class="s">&quot;Content Overview&quot;</span><span class="p">);</span>
+        <span class="n">cellRange</span> <span class="o">=</span> <span class="n">CellRangeAddressList</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="s">&quot;C.A1:C.C8&quot;</span><span class="p">);</span>
+        <span class="n">chart</span> <span class="o">=</span> <span class="n">textDoc</span><span class="o">.</span><span class="n">createChart</span><span class="p">(</span><span class="s">&quot;Page Visit&quot;</span><span class="p">,</span> <span class="n">spreadsheetDoc</span><span class="p">,</span> <span class="n">cellRange</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">rect</span><span class="p">);</span>
+        <span class="n">chart</span><span class="o">.</span><span class="n">setChartType</span><span class="p">(</span><span class="n">ChartType</span><span class="o">.</span><span class="n">BAR</span><span class="p">);</span>
+
+        <span class="n">spreadsheetDoc</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
+        <span class="n">textDoc</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="s">&quot;demo9t.odt&quot;</span><span class="p">);</span>
+        <span class="n">textDoc</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
+    <span class="p">}</span> <span class="n">catch</span> <span class="p">(</span><span class="n">Exception</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">e</span><span class="o">.</span><span class="n">printStackTrace</span><span class="p">();</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+<span class="sr">&lt;/pre&gt;</span>
+</pre></div>
+
+
+<p></p>
+<p>
+    Lastly, let's have a look at how to add chart to spreadsheet document. It's similar with text and presentation documents. On the other hand, it also has a special feature. You can specify a cell as the position where the chart should be located.<br/><br/>
+    <!--java code-->
+    <pre class="brush:java;">
+    private static void generateSpreadsheetDocument() {
+        try {
+            SpreadsheetDocument spreadsheetDoc = SpreadsheetDocument.loadDocument("demo9_data.ods");
+            // create visitors overview page 1
+            CellRangeAddressList cellRange = CellRangeAddressList.valueOf("A.A1:A.B3");
+            Rectangle rect = new Rectangle();
+            rect.width = 15000;
+            rect.height = 8000;
+            Cell positionCell = spreadsheetDoc.getTableByName("B").getCellByPosition("E1");
+            spreadsheetDoc.createChart("Page Visit", spreadsheetDoc, cellRange, true, true, false, rect, positionCell);
+            spreadsheetDoc.save("demo9s.ods");
+            spreadsheetDoc.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+    </pre>
+</p>
+</div>
+<hr/>
+<div class="contenttitle">
+    <a name="download">Download</a>
+</div>
+<div class="bodytext">
+  <p>
+    Powered by the Simple Java API for ODF version  <a target="_new" href="../downloads.html"><img src="../images/link.png"></img>0.6</a>.
+  </p>
+  <p>
+    You can download the code of this demo from <a href="demo9.zip"><img src="../images/link.png"></img>here</a>.
+  </p>
+</div>
+<!---------------------------------------------------------------------------------------------------->   <br />
+</div>
+<div id="footer" class="smallgraytext"> <a href="#">Home</a> | <a href="#">About Us</a> | <a href="#">Contact Us</a> </div>
+</div>
+</div>
+</body>
+</html> </p>
   </div>
 
   <div id="footera">

Modified: websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo/index.html
==============================================================================
--- websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo/index.html (original)
+++ websites/staging/odftoolkit/trunk/content/odftoolkit/simple/demo/index.html Thu Sep  1 10:05:27 2011
@@ -21,10 +21,8 @@
 
 <link href="/odftoolkit/css/odf.css" rel="stylesheet" type="text/css">
 
-
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="../images/style.css" type="text/css" />
	<title>Samples - SimpleODF</title>
    <style type="text/css">
<!--
.STYLE1 {
-	color: #FFFFFF;
-	font-size: 24px;
-}
.STYLE2 {font-size: 32px}
.STYLE3 {font-size: 16px}
.STYLE4 {font-size: 36px}
-->
    </style>
	<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22366020-1']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
+<title></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
 </head>
 
@@ -38,92 +36,189 @@
   </div>
   <div id="clear"></div>
   
-  <div id="content">
+  <div id="sidenav">
+    <h1 id="general">General</h1>
+<ul>
+<li><a href="/odftoolkit/index.html">About</a></li>
+<li><a href="http://incubator.apache.org/projects/odftoolkit.html">Incubator page</a></li>
+<li><a href="/odftoolkit/license.html">License</a></li>
+</ul>
+<h1 id="components">Components</h1>
+<ul>
+<li><a href="/odftoolkit/odfdom/index.html">ODFDOM</a></li>
+<li><a href="/odftoolkit/simple/index.html">Simple API</a></li>
+<li><a href="/odftoolkit/conformance/ODFValidator.html">Conformance Tools</a></li>
+<li><a href="/odftoolkit/xsltrunner/ODFXSLTRunner.html">XSLT Runner</a></li>
+</ul>
+<h1 id="community">Community</h1>
+<ul>
+<li><a href="/odftoolkit/get-involved.html">Get Involved</a></li>
+<li><a href="/odftoolkit/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/odftoolkit/people.html">People</a></li>
+<li><a href="/odftoolkit/community-faqs.html">Community FAQs</a></li>
+</ul>
+<h1 id="development">Development</h1>
+<ul>
+<li><a href="/odftoolkit/source.html">Source Code</a></li>
+<li><a href="/odftoolkit/website-local.html">Website</a></li>
+<li><a href="/odftoolkit/developer-faqs.html">Developer FAQs</a></li>
+</ul>
+<h1 id="ppmc">PPMC</h1>
+<ul>
+<li><a href="/odftoolkit/ppmc-faqs.html">PPMC FAQs</a><br />
+</li>
+</ul>
+<h1 id="asf">ASF</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+</ul>
+  </div>
+  <div id="contenta">
   
     
-    
	<div id="page" align="center">
		<div id="content" style="width:920px" class="contentpanel">
			  <div id="topheader">
-				<div class="topright">
-				</div>	
-			</div>
-			<div id="menu">
-				<div align="left" class="smallwhitetext">
-					<a href="../index.html" class="home"> </a> 
-					<a href="../downloads.html" class="download"></a> 
-					<a href="../documents.html" class="document"></a> 
-					<a href="index.html" class="sample"> </a>
-					</div>
-			</div>
-		<div id="subcontent">
-				<div align="left" class="titletext">
-<span >
-<a href="index.html">Simple Demos</a>
-</span>
-			  	</div><br/>
				<div align="justify">
				 <div class="bodytext"><strong>The demos of simple java API for ODF project are shown here. Each demo contains the overview of the demo, the code introduction and the code downloading resource. </strong>
					</div><br/>
				  	<div class="bodytext">
<div id="mytable">
<ul>
-<li>
-<div id="demoth">9. Automatically Formatting a Document<a href="demo10.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo10_small.png"></img></div>
-<div>It's a commen scenario that we need apply some necessary styles for plain text to improve its appearance. In this demo, a text document is created using plain text from a text file. The new document looks orderly and beautiful than before. 
-</div>
-</div>
-<a href="demo10.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">8. Create Analysis Report with Charts<a href="demo9.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo9_small.png"></img></div>
-<div>In this demo, we will show how to create charts in presentation document, text document and spreadsheet document. Charts data is from a spreadsheet document. You can chose a cell range and using the values of these cells to generate a chart. It's easy and convenient. 
-</div>
-</div>
-<a href="demo9.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">7. Add 2D barcode image to a slide<a href="demo8.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo8_small.png"></img></div>
-<div>We get the author contact information from the metadata of a presentation document. With a RESTful web service, a 2D bar code image is generated based on these information. With image API, the bar code image will be added to the first slide of this presentation at last. 
-</div>
-</div>
-<a href="demo8.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">6. Offer Letter with Text Fields<a href="demo7.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo7_small.png"></img></div>
-<div>We have introduced several samples about how to use Simple ODF API to generate document from the predefined templete. But sounds like, we never talk about how to create a template document using Simple ODF API. Today, let's do it! 
-</div>
-</div>
-<a href="demo7.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">5. Booking Sheet with Text Box<a href="demo6.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo6-small.png"></img></div>
-<div>This demo is similar with Demo3: Navigation API in Hotel Receipt. The different is that text box is included in the document template, so that we can show the text box feature in Simple ODF. Besides, this demo also shows the collaboration method between spreadsheet and text document templete.
-</div>
-</div>
-<a href="demo6.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">4. Multiple Presentations Assembler<a href="demo5.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo5_doc small.jpg"></img></div>
-<div>If you make a lot of presentations in your daily work, you know that you don't always create a presentation from scratch. This demo shows how to assemble several different presentations together to make a new presentation using Simple ODF. 
-</div>
-</div>
-<a href="demo5.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">3. List and Table Conversion<a href="demo4.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/demo4_organization_list_small.png"></img></div>
-<div>Starting in version 0.4, we have added methods to support bullet, numbered and image lists. This includes frequently used features for processing lists and list item. This demo is designed to show the power of List API and help you learn how to use it. 
-</div>
-</div>
-<a href="demo4.html" class="smallgraytext">More...</a>
-</li>
-<li>
-<div id="demoth">2. Navigation API in Hotel Receipt<a href="demo3.html"><img src="../images/go.png" align="right"/></a></div>
-<div id="demotd"><div><img src="image/Generated ODT small.jpg"></img></div>
-<div>This demo is a simple template application about hotel receipt. By loading the configuration file and navigating the hotel receipt template, this demo could generate the ODF documents. 
-</div>
-</div>
-<a href="demo3.html" class="smallgraytext">More...</a>
-</li>
<li>
<div id="demoth">1. Persentation Extraction and Combination<a href="demo2.html"><img src="../images/go.png" align="right"/></a></div>
<div id="demotd"><div><img src="image/PresCombine.jpg"></img></div>
<div>To show the operation of Presentation in Simple API, the Presentation Codmbination demo is used which combine two independent presentation documents together and extract the notes of each slide out to a Text document.
</div>
</div> 
<a href="demo2.html" class="smallgraytext">More...</a>
</li>
</ul>
</div>
<br/>
<br/>		
</div>
</div>
		</div>
		<div id="footer" class="smallgraytext">
				<a href="index.html">Home</a> | <a href="#">About Us</a> | <a href="mailto:Devin@odftoolkit.org">Contact Us</a>
			</div>
	  </div>
	</div>
-
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <link rel="stylesheet" href="../images/style.css" type="text/css" />
+    <title>Samples - SimpleODF</title>
+    <style type="text/css">
+<!--
+.STYLE1 {
+    color: #FFFFFF;
+    font-size: 24px;
+}
+.STYLE2 {font-size: 32px}
+.STYLE3 {font-size: 16px}
+.STYLE4 {font-size: 36px}
+-->
+    </style>
+    <script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-22366020-1']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+</script>
+</head>
+<body>
+    <div id="page" align="center">
+        <div id="content" style="width:920px" class="contentpanel">
+              <div id="topheader">
+                <div class="topright">
+                </div>  
+            </div>
+            <div id="menu">
+                <div align="left" class="smallwhitetext">
+                    <a href="../index.html" class="home"> </a> 
+                    <a href="../downloads.html" class="download"></a> 
+                    <a href="../documents.html" class="document"></a> 
+                    <a href="index.html" class="sample"> </a>
+                    </div>
+            </div>
+        <div id="subcontent">
+                <div align="left" class="titletext">
+<span >
+<a href="index.html">Simple Demos</a>
+</span>
+                </div><br/>
+                <div align="justify">
+                 <div class="bodytext"><strong>The demos of simple java API for ODF project are shown here. Each demo contains the overview of the demo, the code introduction and the code downloading resource. </strong>
+                    </div><br/>
+                    <div class="bodytext">
+<div id="mytable">
+<ul>
+<li>
+<div id="demoth">9. Automatically Formatting a Document<a href="demo10.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo10_small.png"></img></div>
+<div>It's a commen scenario that we need apply some necessary styles for plain text to improve its appearance. In this demo, a text document is created using plain text from a text file. The new document looks orderly and beautiful than before. 
+</div>
+</div>
+<a href="demo10.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">8. Create Analysis Report with Charts<a href="demo9.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo9_small.png"></img></div>
+<div>In this demo, we will show how to create charts in presentation document, text document and spreadsheet document. Charts data is from a spreadsheet document. You can chose a cell range and using the values of these cells to generate a chart. It's easy and convenient. 
+</div>
+</div>
+<a href="demo9.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">7. Add 2D barcode image to a slide<a href="demo8.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo8_small.png"></img></div>
+<div>We get the author contact information from the metadata of a presentation document. With a RESTful web service, a 2D bar code image is generated based on these information. With image API, the bar code image will be added to the first slide of this presentation at last. 
+</div>
+</div>
+<a href="demo8.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">6. Offer Letter with Text Fields<a href="demo7.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo7_small.png"></img></div>
+<div>We have introduced several samples about how to use Simple ODF API to generate document from the predefined templete. But sounds like, we never talk about how to create a template document using Simple ODF API. Today, let's do it! 
+</div>
+</div>
+<a href="demo7.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">5. Booking Sheet with Text Box<a href="demo6.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo6-small.png"></img></div>
+<div>This demo is similar with Demo3: Navigation API in Hotel Receipt. The different is that text box is included in the document template, so that we can show the text box feature in Simple ODF. Besides, this demo also shows the collaboration method between spreadsheet and text document templete.
+</div>
+</div>
+<a href="demo6.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">4. Multiple Presentations Assembler<a href="demo5.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo5_doc small.jpg"></img></div>
+<div>If you make a lot of presentations in your daily work, you know that you don't always create a presentation from scratch. This demo shows how to assemble several different presentations together to make a new presentation using Simple ODF. 
+</div>
+</div>
+<a href="demo5.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">3. List and Table Conversion<a href="demo4.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/demo4_organization_list_small.png"></img></div>
+<div>Starting in version 0.4, we have added methods to support bullet, numbered and image lists. This includes frequently used features for processing lists and list item. This demo is designed to show the power of List API and help you learn how to use it. 
+</div>
+</div>
+<a href="demo4.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">2. Navigation API in Hotel Receipt<a href="demo3.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/Generated ODT small.jpg"></img></div>
+<div>This demo is a simple template application about hotel receipt. By loading the configuration file and navigating the hotel receipt template, this demo could generate the ODF documents. 
+</div>
+</div>
+<a href="demo3.html" class="smallgraytext">More...</a>
+</li>
+<li>
+<div id="demoth">1. Persentation Extraction and Combination<a href="demo2.html"><img src="../images/go.png" align="right"/></a></div>
+<div id="demotd"><div><img src="image/PresCombine.jpg"></img></div>
+<div>To show the operation of Presentation in Simple API, the Presentation Codmbination demo is used which combine two independent presentation documents together and extract the notes of each slide out to a Text document.
+</div>
+</div> 
+<a href="demo2.html" class="smallgraytext">More...</a>
+</li>
+</ul>
+</div>
+<br/>
+<br/>       
+</div>
+</div>
+        </div>
+        <div id="footer" class="smallgraytext">
+                <a href="index.html">Home</a> | <a href="#">About Us</a> | <a href="mailto:Devin@odftoolkit.org">Contact Us</a>
+            </div>
+      </div>
+    </div>
+</body>
+</html>
   </div>
 
   <div id="footera">



Mime
View raw message