You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2011/02/07 03:36:18 UTC
svn commit: r1067847 [24/27] - in /pivot/site/trunk/deploy: ./ assets/
demos/ images/ lib/ styles/ tutorials/ tutorials/component_and_container/
tutorials/platform_overview/ tutorials/windows/
Added: pivot/site/trunk/deploy/tutorials/summary.html
URL: http://svn.apache.org/viewvc/pivot/site/trunk/deploy/tutorials/summary.html?rev=1067847&view=auto
==============================================================================
--- pivot/site/trunk/deploy/tutorials/summary.html (added)
+++ pivot/site/trunk/deploy/tutorials/summary.html Mon Feb 7 02:36:04 2011
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+--><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><title>Summary | Apache Pivot</title><link xmlns="" type="text/css" rel="stylesheet" href="/styles/pivot.css"><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script><script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-7977275-3");
+ pageTracker._trackPageview();
+ } catch(err) {}</script></head><body><div xmlns="" id="wrapper"><div id="main"><div id="header"><div class="logo"><a href="/index.html"><img title="Apache Pivot Homepage" alt="Apache Pivot" src="/images/logo.png"></a></div><div class="tagline"><img style="visibility:hidden" alt="Rich Internet Applications in Java" src="/images/tagline.png"></div><ul class="navi"><li><a href="/demos/">Demos</a></li><li><a href="/download.cgi#2.0">Download</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/get-involved.html">Get Involved</a></li><li><a href="/about.html">About</a></li></ul></div><div class="group" id="contentBase"><h1>Summary</h1><ul class="naviLeft"><li><a href="/tutorials/sample-application.html">Sample Application</a></li><li><a href="/tutorials/platform-overview.html">Platform Overview</a></li><li><a href="/tutorials/hello-world.html">Hello, World!</a></li><li><a href="/tutorials/hello-bxml.html">Hello, BXML!</a></li><li><a href="/tutorials/co
mponent-and-container.html">Component & Container</a></li><li><a href="/tutorials/labels-and-image-views.html">Labels & Image Views</a></li><li><a href="/tutorials/svg-images.html">SVG Images</a></li><li><a href="/tutorials/buttons.html">Buttons</a></li><li><a href="/tutorials/push-buttons.html">Push Buttons</a></li><li><a href="/tutorials/toggle-buttons.html">Toggle Buttons</a></li><li><a href="/tutorials/radio-buttons.html">Radio Buttons</a></li><li><a href="/tutorials/checkboxes.html">Checkboxes</a></li><li><a href="/tutorials/link-buttons.html">Link Buttons</a></li><li><a href="/tutorials/lists.html">Lists</a></li><li><a href="/tutorials/list-buttons.html">List Buttons</a></li><li><a href="/tutorials/repeatable-list-buttons.html">Repeatable List Buttons</a></li><li><a href="/tutorials/text.html">Text</a></li><li><a href="/tutorials/suggestion-popups.html">Suggestion Popups</a></li><li><a href="/tutorials/text-areas.html">Text Areas</a></li><li><a href="/tutorials
/separators.html">Separators</a></li><li><a href="/tutorials/layout-containers.html">Layout Containers</a></li><li><a href="/tutorials/flow-panes.html">Flow Panes</a></li><li><a href="/tutorials/box-panes.html">Box Panes</a></li><li><a href="/tutorials/grid-panes.html">Grid Panes</a></li><li><a href="/tutorials/table-panes.html">Table Panes</a></li><li><a href="/tutorials/borders.html">Borders</a></li><li><a href="/tutorials/stack-panes.html">Stack Panes</a></li><li><a href="/tutorials/split-panes.html">Split Panes</a></li><li><a href="/tutorials/forms.html">Forms</a></li><li><a href="/tutorials/panels.html">Panels</a></li><li><a href="/tutorials/navigation-containers.html">Navigation Containers</a></li><li><a href="/tutorials/card-panes.html">Card Panes</a></li><li><a href="/tutorials/tab-panes.html">Tab Panes</a></li><li><a href="/tutorials/accordions.html">Accordions</a></li><li><a href="/tutorials/expanders.html">Expanders</a></li><li><a href="/tutorials/rollups.html">Ro
llups</a></li><li><a href="/tutorials/viewports.html">Viewports</a></li><li><a href="/tutorials/scroll-panes.html">Scroll Panes</a></li><li><a href="/tutorials/panoramas.html">Panoramas</a></li><li><a href="/tutorials/progress-indicators.html">Progress Indicators</a></li><li><a href="/tutorials/meters.html">Meters</a></li><li><a href="/tutorials/activity-indicators.html">Activity Indicators</a></li><li><a href="/tutorials/bounded-range-components.html">Bounded Range Components</a></li><li><a href="/tutorials/sliders.html">Sliders</a></li><li><a href="/tutorials/scroll-bars.html">Scroll Bars</a></li><li><a href="/tutorials/spinners.html">Spinners</a></li><li><a href="/tutorials/calendars.html">Calendars</a></li><li><a href="/tutorials/menus.html">Menus</a></li><li><a href="/tutorials/context-menus.html">Context Menus</a></li><li><a href="/tutorials/menu-bars.html">Menu Bars</a></li><li><a href="/tutorials/menu-buttons.html">Menu Buttons</a></li><li><a href="/tutorials/color-c
hoosers.html">Color Choosers</a></li><li><a href="/tutorials/table-views.html">Table Views</a></li><li><a href="/tutorials/table-views.json.html">JSON-based TableView</a></li><li><a href="/tutorials/table-views.custom.html">Custom TableView</a></li><li><a href="/tutorials/tree-views.html">Tree Views</a></li><li><a href="/tutorials/file-browsing.html">File Browsing</a></li><li><a href="/tutorials/windows.html">Windows</a></li><li><a href="/tutorials/clipboard.html">Clipboard</a></li><li><a href="/tutorials/drag-and-drop.html">Drag and Drop</a></li><li><a href="/tutorials/effects.html">Effects</a></li><li><a href="/tutorials/effects.transitions.html">Transitions</a></li><li><a href="/tutorials/data-binding.html">Data Binding</a></li><li><a href="/tutorials/property-binding.html">Property Binding</a></li><li><a href="/tutorials/localization.html">Localization</a></li><li><a href="/tutorials/background-tasks.html">Background Tasks</a></li><li><a href="/tutorials/web-queries.html
">Web Queries</a></li><li><a href="/tutorials/query-servlet.html">QueryServlet</a></li><li><a href="/tutorials/scripting.html">Scripting</a></li><li><a href="/tutorials/summary.html">Summary</a></li><li><a href="/tutorials/stock-tracker.html">The "Stock Tracker" Application</a></li><li><a href="/tutorials/stock-tracker.ui.html">UI Markup Using BXML</a></li><li><a href="/tutorials/stock-tracker.events.html">Event Handling</a></li><li><a href="/tutorials/stock-tracker.web-queries.html">Web Queries</a></li><li><a href="/tutorials/stock-tracker.data-binding.html">Data Binding</a></li><li><a href="/tutorials/stock-tracker.localization.html">Localization</a></li><li><a href="/tutorials/bxml-primer.html">BXML Primer</a></li></ul><div class="content"><style type="text/css">
+ applet {
+ border: 1px solid #999999;
+ }
+ </style><!--NOTE: Syntax highlighting script is LGPL--><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript"></script><link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"><link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"><script type="text/javascript">
+ SyntaxHighlighter.all();
+ </script><div class="section">
+ <p>
+ This tutorial provided an introduction to all of the major features provided by the
+ Pivot platform. Though it did not delve into great detail on any particular feature,
+ the examples should have established a strong foundation upon which further skills can
+ be built.
+ </p>
+
+ <p>
+ The next section contains a complete example that incorporates many of the features
+ introduces in the previous sections. Though it does not introduce any new material,
+ readers may find it valuable to see these features in action in a practical,
+ "real-world" example.
+ </p>
+ </div><p>Next: <a href="stock-tracker.html">The "Stock Tracker" Application</a></p></div></div></div><div class="group" id="footer"><div class="footerLogo">Copyright (c) 1999-2011<br>The Apache Software Foundation.</div><div class="footerLinks"><ul class="footerMenuGr"><li><strong>Demos</strong><ul><li><a href="/demos/kitchen-sink.html" target="_new">"Kitchen Sink"</a></li><li><a href="/demos/component-explorer.html" target="_new">Component Explorer</a></li><li><a href="http://ixnay.biz/pivot-jfree-demos/charts_demo.html" target="_new">Charting</a></li><li><a href="/demos/">More Demos</a></li></ul></li><li><strong>Documentation</strong><ul><li><a href="/getting-started.html">Getting Started</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/faq.html">FAQ</a></li><li><a href="/2.0/docs/api/">Javadoc (2.0)</a></li></ul></li><li><strong>Get Involved</strong><ul><li><a href="/svn.html">SVN Repositories</a></li><li><a href="/lists.html">Mailing Lists</a></li><li
><a href="http://issues.apache.org/jira/browse/PIVOT">Bug Database</a></li><li><a href="http://cwiki.apache.org/PIVOT/">Wiki</a></li></ul></li><li><strong>Related</strong><ul><li><a href="http://code.google.com/p/pivot-jfree/">JFreeChart Provider</a></li></ul></li><li><strong>About</strong><ul><li><a href="/who-we-are.html">Who We Are</a></li><li><a href="/contact.html">Contact</a></li><li><a href="/news.html">News</a></li><li><a href="/legal.html">Legal/License</a></li></ul></li></ul></div></div></div></body></html>
\ No newline at end of file
Added: pivot/site/trunk/deploy/tutorials/svg-images.html
URL: http://svn.apache.org/viewvc/pivot/site/trunk/deploy/tutorials/svg-images.html?rev=1067847&view=auto
==============================================================================
--- pivot/site/trunk/deploy/tutorials/svg-images.html (added)
+++ pivot/site/trunk/deploy/tutorials/svg-images.html Mon Feb 7 02:36:04 2011
@@ -0,0 +1,125 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+--><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><title>SVG Images | Apache Pivot</title><link xmlns="" type="text/css" rel="stylesheet" href="/styles/pivot.css"><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script><script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-7977275-3");
+ pageTracker._trackPageview();
+ } catch(err) {}</script></head><body><div xmlns="" id="wrapper"><div id="main"><div id="header"><div class="logo"><a href="/index.html"><img title="Apache Pivot Homepage" alt="Apache Pivot" src="/images/logo.png"></a></div><div class="tagline"><img style="visibility:hidden" alt="Rich Internet Applications in Java" src="/images/tagline.png"></div><ul class="navi"><li><a href="/demos/">Demos</a></li><li><a href="/download.cgi#2.0">Download</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/get-involved.html">Get Involved</a></li><li><a href="/about.html">About</a></li></ul></div><div class="group" id="contentBase"><h1>SVG Images</h1><ul class="naviLeft"><li><a href="/tutorials/sample-application.html">Sample Application</a></li><li><a href="/tutorials/platform-overview.html">Platform Overview</a></li><li><a href="/tutorials/hello-world.html">Hello, World!</a></li><li><a href="/tutorials/hello-bxml.html">Hello, BXML!</a></li><li><a href="/tutorials
/component-and-container.html">Component & Container</a></li><li><a href="/tutorials/labels-and-image-views.html">Labels & Image Views</a></li><li><a href="/tutorials/svg-images.html">SVG Images</a></li><li><a href="/tutorials/buttons.html">Buttons</a></li><li><a href="/tutorials/push-buttons.html">Push Buttons</a></li><li><a href="/tutorials/toggle-buttons.html">Toggle Buttons</a></li><li><a href="/tutorials/radio-buttons.html">Radio Buttons</a></li><li><a href="/tutorials/checkboxes.html">Checkboxes</a></li><li><a href="/tutorials/link-buttons.html">Link Buttons</a></li><li><a href="/tutorials/lists.html">Lists</a></li><li><a href="/tutorials/list-buttons.html">List Buttons</a></li><li><a href="/tutorials/repeatable-list-buttons.html">Repeatable List Buttons</a></li><li><a href="/tutorials/text.html">Text</a></li><li><a href="/tutorials/suggestion-popups.html">Suggestion Popups</a></li><li><a href="/tutorials/text-areas.html">Text Areas</a></li><li><a href="/tutori
als/separators.html">Separators</a></li><li><a href="/tutorials/layout-containers.html">Layout Containers</a></li><li><a href="/tutorials/flow-panes.html">Flow Panes</a></li><li><a href="/tutorials/box-panes.html">Box Panes</a></li><li><a href="/tutorials/grid-panes.html">Grid Panes</a></li><li><a href="/tutorials/table-panes.html">Table Panes</a></li><li><a href="/tutorials/borders.html">Borders</a></li><li><a href="/tutorials/stack-panes.html">Stack Panes</a></li><li><a href="/tutorials/split-panes.html">Split Panes</a></li><li><a href="/tutorials/forms.html">Forms</a></li><li><a href="/tutorials/panels.html">Panels</a></li><li><a href="/tutorials/navigation-containers.html">Navigation Containers</a></li><li><a href="/tutorials/card-panes.html">Card Panes</a></li><li><a href="/tutorials/tab-panes.html">Tab Panes</a></li><li><a href="/tutorials/accordions.html">Accordions</a></li><li><a href="/tutorials/expanders.html">Expanders</a></li><li><a href="/tutorials/rollups.html"
>Rollups</a></li><li><a href="/tutorials/viewports.html">Viewports</a></li><li><a href="/tutorials/scroll-panes.html">Scroll Panes</a></li><li><a href="/tutorials/panoramas.html">Panoramas</a></li><li><a href="/tutorials/progress-indicators.html">Progress Indicators</a></li><li><a href="/tutorials/meters.html">Meters</a></li><li><a href="/tutorials/activity-indicators.html">Activity Indicators</a></li><li><a href="/tutorials/bounded-range-components.html">Bounded Range Components</a></li><li><a href="/tutorials/sliders.html">Sliders</a></li><li><a href="/tutorials/scroll-bars.html">Scroll Bars</a></li><li><a href="/tutorials/spinners.html">Spinners</a></li><li><a href="/tutorials/calendars.html">Calendars</a></li><li><a href="/tutorials/menus.html">Menus</a></li><li><a href="/tutorials/context-menus.html">Context Menus</a></li><li><a href="/tutorials/menu-bars.html">Menu Bars</a></li><li><a href="/tutorials/menu-buttons.html">Menu Buttons</a></li><li><a href="/tutorials/colo
r-choosers.html">Color Choosers</a></li><li><a href="/tutorials/table-views.html">Table Views</a></li><li><a href="/tutorials/table-views.json.html">JSON-based TableView</a></li><li><a href="/tutorials/table-views.custom.html">Custom TableView</a></li><li><a href="/tutorials/tree-views.html">Tree Views</a></li><li><a href="/tutorials/file-browsing.html">File Browsing</a></li><li><a href="/tutorials/windows.html">Windows</a></li><li><a href="/tutorials/clipboard.html">Clipboard</a></li><li><a href="/tutorials/drag-and-drop.html">Drag and Drop</a></li><li><a href="/tutorials/effects.html">Effects</a></li><li><a href="/tutorials/effects.transitions.html">Transitions</a></li><li><a href="/tutorials/data-binding.html">Data Binding</a></li><li><a href="/tutorials/property-binding.html">Property Binding</a></li><li><a href="/tutorials/localization.html">Localization</a></li><li><a href="/tutorials/background-tasks.html">Background Tasks</a></li><li><a href="/tutorials/web-queries.h
tml">Web Queries</a></li><li><a href="/tutorials/query-servlet.html">QueryServlet</a></li><li><a href="/tutorials/scripting.html">Scripting</a></li><li><a href="/tutorials/summary.html">Summary</a></li><li><a href="/tutorials/stock-tracker.html">The "Stock Tracker" Application</a></li><li><a href="/tutorials/stock-tracker.ui.html">UI Markup Using BXML</a></li><li><a href="/tutorials/stock-tracker.events.html">Event Handling</a></li><li><a href="/tutorials/stock-tracker.web-queries.html">Web Queries</a></li><li><a href="/tutorials/stock-tracker.data-binding.html">Data Binding</a></li><li><a href="/tutorials/stock-tracker.localization.html">Localization</a></li><li><a href="/tutorials/bxml-primer.html">BXML Primer</a></li></ul><div class="content"><style type="text/css">
+ applet {
+ border: 1px solid #999999;
+ }
+ </style><!--NOTE: Syntax highlighting script is LGPL--><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript"></script><link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"><link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"><script type="text/javascript">
+ SyntaxHighlighter.all();
+ </script><div class="section">
+ <p>
+ In addition to common bitmapped image formats such as PNG and JPEG, Pivot also supports
+ Scalable Vector Graphic (SVG) images. For example, the following application displays
+ an SVG image containing the Pivot logo, alongside a PNG equivalent:
+ </p>
+
+ <script src="http://java.com/js/deployJava.js" type="text/javascript"></script><script type="text/javascript">
+
+ var attributes = {
+ code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
+ width:"640",
+ height:"480"
+ };
+
+
+
+
+
+ var libraries = [];
+ libraries.push("/lib/pivot-core-2.0.jar");
+ libraries.push("/lib/pivot-wtk-2.0.jar");
+ libraries.push("/lib/pivot-wtk-terra-2.0.jar");
+ libraries.push("/lib/pivot-tutorials-2.0.jar");
+
+ libraries.push("/lib/svgSalamander-tiny.jar");
+
+
+ attributes.archive = libraries.join(",");
+
+
+ var parameters = {
+ codebase_lookup:false,
+ application_class_name:'org.apache.pivot.wtk.ScriptApplication'
+ };
+
+
+ var javaArguments = ["-Dsun.awt.noerasebackground=true",
+ "-Dsun.awt.erasebackgroundonresize=true"];
+
+
+
+ parameters.java_arguments = javaArguments.join(" ");
+
+
+
+ var startupProperties = [];
+
+ startupProperties.push("src=/org/apache/pivot/tutorials/labels/svg.bxml");
+
+ parameters.startup_properties = startupProperties.join("&");
+
+
+ deployJava.runApplet(attributes, parameters, "1.6");
+ </script>
+
+ <p>
+ The primary advantage of using SVG images rather than bitmapped images in an application
+ is scalability (i.e. resolution independence). When a bitmapped image is scaled, it
+ becomes pixelated and grainy, whereas a vector image does not.
+ </p>
+
+ <p>
+ To see an example, try scaling the Pivot display by clicking on the application and
+ using the mouse wheel or pressing the +/- keys while holding down Control-Shift. The
+ SVG image and text scale smoothly, while the PNG image quickly becomes unreadable.
+ </p>
+
+ <p>
+ Below is the BXML source for the application:
+ </p>
+
+ <pre class="brush:xml">
+
+ <Window title="SVG Images" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns="org.apache.pivot.wtk">
+ <Border>
+ <ScrollPane horizontalScrollBarPolicy="fill_to_capacity" verticalScrollBarPolicy="fill_to_capacity">
+ <BoxPane styles="{horizontalAlignment:'center', verticalAlignment:'center'}">
+ <BoxPane orientation="vertical" styles="{horizontalAlignment:'center', spacing:10}">
+ <ImageView image="@logo.svg" preferredWidth="64" preferredHeight="64" styles="{fill:true}"/>
+ <Label text="SVG"/>
+ </BoxPane>
+
+ <BoxPane orientation="vertical" styles="{horizontalAlignment:'center', spacing:10}">
+ <ImageView image="@logo-64x64.png"/>
+ <Label text="PNG"/>
+ </BoxPane>
+ </BoxPane>
+ </ScrollPane>
+ </Border>
+ </Window>
+
+ </pre>
+ </div><p>Next: <a href="buttons.html">Buttons</a></p></div></div></div><div class="group" id="footer"><div class="footerLogo">Copyright (c) 1999-2011<br>The Apache Software Foundation.</div><div class="footerLinks"><ul class="footerMenuGr"><li><strong>Demos</strong><ul><li><a href="/demos/kitchen-sink.html" target="_new">"Kitchen Sink"</a></li><li><a href="/demos/component-explorer.html" target="_new">Component Explorer</a></li><li><a href="http://ixnay.biz/pivot-jfree-demos/charts_demo.html" target="_new">Charting</a></li><li><a href="/demos/">More Demos</a></li></ul></li><li><strong>Documentation</strong><ul><li><a href="/getting-started.html">Getting Started</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/faq.html">FAQ</a></li><li><a href="/2.0/docs/api/">Javadoc (2.0)</a></li></ul></li><li><strong>Get Involved</strong><ul><li><a href="/svn.html">SVN Repositories</a></li><li><a href="/lists.html">Mailing Lists</a></li><li><a href="http://issues.apache
.org/jira/browse/PIVOT">Bug Database</a></li><li><a href="http://cwiki.apache.org/PIVOT/">Wiki</a></li></ul></li><li><strong>Related</strong><ul><li><a href="http://code.google.com/p/pivot-jfree/">JFreeChart Provider</a></li></ul></li><li><strong>About</strong><ul><li><a href="/who-we-are.html">Who We Are</a></li><li><a href="/contact.html">Contact</a></li><li><a href="/news.html">News</a></li><li><a href="/legal.html">Legal/License</a></li></ul></li></ul></div></div></div></body></html>
\ No newline at end of file
Added: pivot/site/trunk/deploy/tutorials/tab-panes.html
URL: http://svn.apache.org/viewvc/pivot/site/trunk/deploy/tutorials/tab-panes.html?rev=1067847&view=auto
==============================================================================
--- pivot/site/trunk/deploy/tutorials/tab-panes.html (added)
+++ pivot/site/trunk/deploy/tutorials/tab-panes.html Mon Feb 7 02:36:04 2011
@@ -0,0 +1,353 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+--><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><title>Tab Panes | Apache Pivot</title><link xmlns="" type="text/css" rel="stylesheet" href="/styles/pivot.css"><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script><script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-7977275-3");
+ pageTracker._trackPageview();
+ } catch(err) {}</script></head><body><div xmlns="" id="wrapper"><div id="main"><div id="header"><div class="logo"><a href="/index.html"><img title="Apache Pivot Homepage" alt="Apache Pivot" src="/images/logo.png"></a></div><div class="tagline"><img style="visibility:hidden" alt="Rich Internet Applications in Java" src="/images/tagline.png"></div><ul class="navi"><li><a href="/demos/">Demos</a></li><li><a href="/download.cgi#2.0">Download</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/get-involved.html">Get Involved</a></li><li><a href="/about.html">About</a></li></ul></div><div class="group" id="contentBase"><h1>Tab Panes</h1><ul class="naviLeft"><li><a href="/tutorials/sample-application.html">Sample Application</a></li><li><a href="/tutorials/platform-overview.html">Platform Overview</a></li><li><a href="/tutorials/hello-world.html">Hello, World!</a></li><li><a href="/tutorials/hello-bxml.html">Hello, BXML!</a></li><li><a href="/tutorials/
component-and-container.html">Component & Container</a></li><li><a href="/tutorials/labels-and-image-views.html">Labels & Image Views</a></li><li><a href="/tutorials/svg-images.html">SVG Images</a></li><li><a href="/tutorials/buttons.html">Buttons</a></li><li><a href="/tutorials/push-buttons.html">Push Buttons</a></li><li><a href="/tutorials/toggle-buttons.html">Toggle Buttons</a></li><li><a href="/tutorials/radio-buttons.html">Radio Buttons</a></li><li><a href="/tutorials/checkboxes.html">Checkboxes</a></li><li><a href="/tutorials/link-buttons.html">Link Buttons</a></li><li><a href="/tutorials/lists.html">Lists</a></li><li><a href="/tutorials/list-buttons.html">List Buttons</a></li><li><a href="/tutorials/repeatable-list-buttons.html">Repeatable List Buttons</a></li><li><a href="/tutorials/text.html">Text</a></li><li><a href="/tutorials/suggestion-popups.html">Suggestion Popups</a></li><li><a href="/tutorials/text-areas.html">Text Areas</a></li><li><a href="/tutoria
ls/separators.html">Separators</a></li><li><a href="/tutorials/layout-containers.html">Layout Containers</a></li><li><a href="/tutorials/flow-panes.html">Flow Panes</a></li><li><a href="/tutorials/box-panes.html">Box Panes</a></li><li><a href="/tutorials/grid-panes.html">Grid Panes</a></li><li><a href="/tutorials/table-panes.html">Table Panes</a></li><li><a href="/tutorials/borders.html">Borders</a></li><li><a href="/tutorials/stack-panes.html">Stack Panes</a></li><li><a href="/tutorials/split-panes.html">Split Panes</a></li><li><a href="/tutorials/forms.html">Forms</a></li><li><a href="/tutorials/panels.html">Panels</a></li><li><a href="/tutorials/navigation-containers.html">Navigation Containers</a></li><li><a href="/tutorials/card-panes.html">Card Panes</a></li><li><a href="/tutorials/tab-panes.html">Tab Panes</a></li><li><a href="/tutorials/accordions.html">Accordions</a></li><li><a href="/tutorials/expanders.html">Expanders</a></li><li><a href="/tutorials/rollups.html">
Rollups</a></li><li><a href="/tutorials/viewports.html">Viewports</a></li><li><a href="/tutorials/scroll-panes.html">Scroll Panes</a></li><li><a href="/tutorials/panoramas.html">Panoramas</a></li><li><a href="/tutorials/progress-indicators.html">Progress Indicators</a></li><li><a href="/tutorials/meters.html">Meters</a></li><li><a href="/tutorials/activity-indicators.html">Activity Indicators</a></li><li><a href="/tutorials/bounded-range-components.html">Bounded Range Components</a></li><li><a href="/tutorials/sliders.html">Sliders</a></li><li><a href="/tutorials/scroll-bars.html">Scroll Bars</a></li><li><a href="/tutorials/spinners.html">Spinners</a></li><li><a href="/tutorials/calendars.html">Calendars</a></li><li><a href="/tutorials/menus.html">Menus</a></li><li><a href="/tutorials/context-menus.html">Context Menus</a></li><li><a href="/tutorials/menu-bars.html">Menu Bars</a></li><li><a href="/tutorials/menu-buttons.html">Menu Buttons</a></li><li><a href="/tutorials/color
-choosers.html">Color Choosers</a></li><li><a href="/tutorials/table-views.html">Table Views</a></li><li><a href="/tutorials/table-views.json.html">JSON-based TableView</a></li><li><a href="/tutorials/table-views.custom.html">Custom TableView</a></li><li><a href="/tutorials/tree-views.html">Tree Views</a></li><li><a href="/tutorials/file-browsing.html">File Browsing</a></li><li><a href="/tutorials/windows.html">Windows</a></li><li><a href="/tutorials/clipboard.html">Clipboard</a></li><li><a href="/tutorials/drag-and-drop.html">Drag and Drop</a></li><li><a href="/tutorials/effects.html">Effects</a></li><li><a href="/tutorials/effects.transitions.html">Transitions</a></li><li><a href="/tutorials/data-binding.html">Data Binding</a></li><li><a href="/tutorials/property-binding.html">Property Binding</a></li><li><a href="/tutorials/localization.html">Localization</a></li><li><a href="/tutorials/background-tasks.html">Background Tasks</a></li><li><a href="/tutorials/web-queries.ht
ml">Web Queries</a></li><li><a href="/tutorials/query-servlet.html">QueryServlet</a></li><li><a href="/tutorials/scripting.html">Scripting</a></li><li><a href="/tutorials/summary.html">Summary</a></li><li><a href="/tutorials/stock-tracker.html">The "Stock Tracker" Application</a></li><li><a href="/tutorials/stock-tracker.ui.html">UI Markup Using BXML</a></li><li><a href="/tutorials/stock-tracker.events.html">Event Handling</a></li><li><a href="/tutorials/stock-tracker.web-queries.html">Web Queries</a></li><li><a href="/tutorials/stock-tracker.data-binding.html">Data Binding</a></li><li><a href="/tutorials/stock-tracker.localization.html">Localization</a></li><li><a href="/tutorials/bxml-primer.html">BXML Primer</a></li></ul><div class="content"><style type="text/css">
+ applet {
+ border: 1px solid #999999;
+ }
+ </style><!--NOTE: Syntax highlighting script is LGPL--><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript"></script><link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"><link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"><script type="text/javascript">
+ SyntaxHighlighter.all();
+ </script><div class="section">
+ <p>
+ Functionally, tab panes are similar to card panes in that they show only one of a
+ collection of components at a time. Unlike card panes, tab panes include built-in
+ support for navigating between the components, which are called "tabs". The following
+ example demonstrates the use of the <tt>TabPane</tt> component:
+ </p>
+
+ <script src="http://java.com/js/deployJava.js" type="text/javascript"></script><script type="text/javascript">
+
+ var attributes = {
+ code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
+ width:"680",
+ height:"480"
+ };
+
+
+
+
+
+ var libraries = [];
+ libraries.push("/lib/pivot-core-2.0.jar");
+ libraries.push("/lib/pivot-wtk-2.0.jar");
+ libraries.push("/lib/pivot-wtk-terra-2.0.jar");
+ libraries.push("/lib/pivot-tutorials-2.0.jar");
+
+ libraries.push("/lib/svgSalamander-tiny.jar");
+
+
+ attributes.archive = libraries.join(",");
+
+
+ var parameters = {
+ codebase_lookup:false,
+ application_class_name:'org.apache.pivot.wtk.ScriptApplication'
+ };
+
+
+ var javaArguments = ["-Dsun.awt.noerasebackground=true",
+ "-Dsun.awt.erasebackgroundonresize=true"];
+
+
+
+ parameters.java_arguments = javaArguments.join(" ");
+
+
+
+ var startupProperties = [];
+
+ startupProperties.push("src=/org/apache/pivot/tutorials/navigation/tab_panes.bxml");
+
+ parameters.startup_properties = startupProperties.join("&");
+
+
+ deployJava.runApplet(attributes, parameters, "1.6");
+ </script>
+
+ <p>
+ The BXML source that produces this example is as follows. The tab pane contains three
+ tabs, each of which are flow panes containing bordered labels at different sizes. Like
+ <tt>CardPane</tt>, the preferred size of a tab pane is the maximum of the preferred
+ widths and heights of the tabs, plus the size of the area allocated to the tab
+ navigation, and each tab is sized to fill the entire space allocated to the tabs. The
+ tab pane itself is contained in a flow pane so that changes to its preferred size are
+ easily visible.
+ </p>
+
+ <p>
+ Note that, like the <a href="forms.html">Form</a> container, <tt>TabPane</tt> defines
+ attributes that a caller can set to customize the appearance of the tab.
+ <tt>TabPane</tt> currently defines two attributes: "label" and "icon" (additional
+ attributes may be added in the future to support closeable tabs or other such features).
+ Also note that disabling a tab component also disables its corresponding tab button,
+ preventing the user from navigating to that tab:
+ </p>
+
+ <pre class="brush:xml">
+
+ <navigation:TabPanes title="Tab Panes" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:content="org.apache.pivot.wtk.content"
+ xmlns:navigation="org.apache.pivot.tutorials.navigation"
+ xmlns="org.apache.pivot.wtk">
+ <bxml:define>
+ <Prompt bxml:id="confirmCloseTabPrompt" title="Confirm Close Tab"
+ message="Really close this tab?"
+ options="['Cancel', 'OK']" selectedOptionIndex="1"/>
+ </bxml:define>
+
+ <TablePane styles="{padding:8, horizontalSpacing:6}">
+ <columns>
+ <TablePane.Column width="1*"/>
+ <TablePane.Column/>
+ </columns>
+
+ <TablePane.Row height="1*">
+ <Border styles="{padding:12}">
+ <BoxPane>
+ <TabPane bxml:id="tabPane">
+ <corner>
+ <BoxPane bxml:id="cornerBoxPane" styles="{horizontalAlignment:'right'}">
+ <TextInput textSize="10"/>
+ </BoxPane>
+ </corner>
+
+ <BoxPane styles="{horizontalAlignment:'center', verticalAlignment:'center'}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/org/apache/pivot/tutorials/bell.png"
+ text="Bell"/>
+ </TabPane.tabData>
+ <Border styles="{padding:2}">
+ <Label text="240x180" preferredWidth="240" preferredHeight="180"
+ styles="{horizontalAlignment:'center', verticalAlignment:'center'}"/>
+ </Border>
+ </BoxPane>
+
+ <BoxPane styles="{horizontalAlignment:'center', verticalAlignment:'center'}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/org/apache/pivot/tutorials/clock.png"
+ text="Clock"/>
+ </TabPane.tabData>
+ <Border styles="{padding:2}">
+ <Label text="320x240" preferredWidth="320" preferredHeight="240"
+ styles="{horizontalAlignment:'center', verticalAlignment:'center'}"/>
+ </Border>
+ </BoxPane>
+
+ <BoxPane styles="{horizontalAlignment:'center', verticalAlignment:'center'}">
+ <TabPane.tabData>
+ <content:ButtonData icon="/org/apache/pivot/tutorials/house.png"
+ text="House"/>
+ </TabPane.tabData>
+ <Border styles="{padding:2}">
+ <Label text="480x360" preferredWidth="480" preferredHeight="360"
+ styles="{horizontalAlignment:'center', verticalAlignment:'center'}"/>
+ </Border>
+ </BoxPane>
+
+ <BoxPane enabled="false">
+ <TabPane.tabData>
+ <content:ButtonData icon="/org/apache/pivot/tutorials/star.png"
+ text="Star"/>
+ </TabPane.tabData>
+
+ <Border styles="{padding:2}">
+ <Label text="480x360 (disabled)" preferredWidth="480" preferredHeight="360"
+ styles="{horizontalAlignment:'center', verticalAlignment:'center'}"/>
+ </Border>
+ </BoxPane>
+ </TabPane>
+ </BoxPane>
+ </Border>
+
+ <Border styles="{padding:2}">
+ <BoxPane orientation="vertical" styles="{padding:4, spacing:6}">
+ <Checkbox bxml:id="closeableCheckbox" buttonData="Closeable"/>
+ <Checkbox bxml:id="collapsibleCheckbox" buttonData="Collapsible"/>
+
+ <Label text="Tab orientation:"/>
+ <bxml:define>
+ <ButtonGroup bxml:id="tabOrientation"/>
+ </bxml:define>
+ <RadioButton bxml:id="horizontalRadioButton" buttonData="Horizontal" selected="true"
+ buttonGroup="$tabOrientation"/>
+ <RadioButton bxml:id="verticalRadioButton" buttonData="Vertical"
+ buttonGroup="$tabOrientation"/>
+ </BoxPane>
+ </Border>
+ </TablePane.Row>
+ </TablePane>
+ </navigation:TabPanes>
+
+ </pre>
+
+ <p>
+ The default tab pane skin provides some styles for customizing the appearance and
+ behavior of the tab pane: "collapsible" and "tabOrientation". The "collapsible" style
+ is a boolean that controls how the tab pane responds to clicks on the tab buttons. When
+ set to <tt>true</tt>, clicking on the selected tab causes the tab pane to "collapse"
+ such that only the tab buttons remain visible. This is handy in situations where screen
+ real estate is at a premium, or when the content of the tab pane may be only
+ periodically relevant to the user but should still be conveniently accessible. The
+ "tabOrientation" style controls how the buttons themselves are laid out - either
+ horizontally or vertically.
+ </p>
+
+ <p>
+ The Java source for this example is as follows. It is fairly simple, consisting mostly
+ of event handling code for the radio buttons and checkbox:
+ </p>
+
+ <pre class="brush:java">
+
+ package org.apache.pivot.tutorials.navigation;
+
+ import java.net.URL;
+
+ import org.apache.pivot.beans.Bindable;
+ import org.apache.pivot.collections.Map;
+ import org.apache.pivot.util.Resources;
+ import org.apache.pivot.util.Vote;
+ import org.apache.pivot.wtk.Button;
+ import org.apache.pivot.wtk.ButtonStateListener;
+ import org.apache.pivot.wtk.Checkbox;
+ import org.apache.pivot.wtk.BoxPane;
+ import org.apache.pivot.wtk.Orientation;
+ import org.apache.pivot.wtk.Prompt;
+ import org.apache.pivot.wtk.RadioButton;
+ import org.apache.pivot.wtk.Sheet;
+ import org.apache.pivot.wtk.SheetCloseListener;
+ import org.apache.pivot.wtk.TabPane;
+ import org.apache.pivot.wtk.TabPaneListener;
+ import org.apache.pivot.wtk.Window;
+
+ public class TabPanes extends Window implements Bindable {
+ private Prompt confirmCloseTabPrompt = null;
+ private TabPane tabPane = null;
+ private Checkbox closeableCheckbox = null;
+ private Checkbox collapsibleCheckbox = null;
+ private RadioButton horizontalRadioButton = null;
+ private RadioButton verticalRadioButton = null;
+ private BoxPane cornerBoxPane = null;
+
+ private boolean confirmCloseTab = true;
+
+ @Override
+ public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+ confirmCloseTabPrompt = (Prompt)namespace.get("confirmCloseTabPrompt");
+ tabPane = (TabPane)namespace.get("tabPane");
+ closeableCheckbox = (Checkbox)namespace.get("closeableCheckbox");
+ collapsibleCheckbox = (Checkbox)namespace.get("collapsibleCheckbox");
+ horizontalRadioButton = (RadioButton)namespace.get("horizontalRadioButton");
+ verticalRadioButton = (RadioButton)namespace.get("verticalRadioButton");
+ cornerBoxPane = (BoxPane)namespace.get("cornerBoxPane");
+
+ tabPane.getTabPaneListeners().add(new TabPaneListener.Adapter() {
+ @Override
+ public Vote previewRemoveTabs(final TabPane tabPane, final int index, final int count) {
+ Vote vote;
+ if (confirmCloseTab) {
+ confirmCloseTabPrompt.open(TabPanes.this, new SheetCloseListener() {
+ @Override
+ public void sheetClosed(Sheet sheet) {
+ if (confirmCloseTabPrompt.getResult()
+ && confirmCloseTabPrompt.getSelectedOptionIndex() == 1) {
+ confirmCloseTab = false;
+
+ int n = tabPane.getTabs().getLength();
+ if (index < n - 1) {
+ tabPane.setSelectedIndex(index + 1);
+ } else {
+ tabPane.setSelectedIndex(index - 1);
+ }
+
+ tabPane.getTabs().remove(index, count);
+
+ confirmCloseTab = true;
+ }
+ }
+ });
+
+ vote = Vote.DENY;
+ } else {
+ vote = Vote.APPROVE;
+ }
+
+ return vote;
+ }
+ });
+
+ ButtonStateListener checkboxStateListener = new ButtonStateListener() {
+ @Override
+ public void stateChanged(Button button, Button.State previousState) {
+ updateTabPane();
+ }
+ };
+
+ closeableCheckbox.getButtonStateListeners().add(checkboxStateListener);
+ collapsibleCheckbox.getButtonStateListeners().add(checkboxStateListener);
+
+ ButtonStateListener radioButtonStateListener = new ButtonStateListener() {
+ @Override
+ public void stateChanged(Button button, Button.State previousState) {
+ if (button.isSelected()) {
+ updateTabPane();
+ }
+ }
+ };
+
+ horizontalRadioButton.getButtonStateListeners().add(radioButtonStateListener);
+ verticalRadioButton.getButtonStateListeners().add(radioButtonStateListener);
+
+ updateTabPane();
+ }
+
+ private void updateTabPane() {
+ tabPane.setCloseable(closeableCheckbox.isSelected());
+ tabPane.setCollapsible(collapsibleCheckbox.isSelected());
+
+ if (horizontalRadioButton.isSelected()) {
+ tabPane.getStyles().put("tabOrientation", Orientation.HORIZONTAL);
+ if (tabPane.getCorner() == null) {
+ tabPane.setCorner(cornerBoxPane);
+ }
+ } else {
+ tabPane.getStyles().put("tabOrientation", Orientation.VERTICAL);
+ if (tabPane.getCorner() == cornerBoxPane) {
+ tabPane.setCorner(null);
+ }
+ }
+ }
+ }
+
+ </pre>
+
+ <p>
+ Note that this example also demonstrates the use of the tab pane corner component. For
+ horizontally oriented tabs, this component appears in the upper right corner; for
+ vertical tabs, it appears in the lower left. The corner component in this example is a
+ flow pane containing a text input; it is hidden when the orientation is changed to
+ vertical because the corner component itself is not rotated and would cause the button
+ area to grow horizontally.
+ </p>
+ </div><p>Next: <a href="accordions.html">Accordions</a></p></div></div></div><div class="group" id="footer"><div class="footerLogo">Copyright (c) 1999-2011<br>The Apache Software Foundation.</div><div class="footerLinks"><ul class="footerMenuGr"><li><strong>Demos</strong><ul><li><a href="/demos/kitchen-sink.html" target="_new">"Kitchen Sink"</a></li><li><a href="/demos/component-explorer.html" target="_new">Component Explorer</a></li><li><a href="http://ixnay.biz/pivot-jfree-demos/charts_demo.html" target="_new">Charting</a></li><li><a href="/demos/">More Demos</a></li></ul></li><li><strong>Documentation</strong><ul><li><a href="/getting-started.html">Getting Started</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/faq.html">FAQ</a></li><li><a href="/2.0/docs/api/">Javadoc (2.0)</a></li></ul></li><li><strong>Get Involved</strong><ul><li><a href="/svn.html">SVN Repositories</a></li><li><a href="/lists.html">Mailing Lists</a></li><li><a href="http://issues.
apache.org/jira/browse/PIVOT">Bug Database</a></li><li><a href="http://cwiki.apache.org/PIVOT/">Wiki</a></li></ul></li><li><strong>Related</strong><ul><li><a href="http://code.google.com/p/pivot-jfree/">JFreeChart Provider</a></li></ul></li><li><strong>About</strong><ul><li><a href="/who-we-are.html">Who We Are</a></li><li><a href="/contact.html">Contact</a></li><li><a href="/news.html">News</a></li><li><a href="/legal.html">Legal/License</a></li></ul></li></ul></div></div></div></body></html>
\ No newline at end of file
Added: pivot/site/trunk/deploy/tutorials/table-panes.html
URL: http://svn.apache.org/viewvc/pivot/site/trunk/deploy/tutorials/table-panes.html?rev=1067847&view=auto
==============================================================================
--- pivot/site/trunk/deploy/tutorials/table-panes.html (added)
+++ pivot/site/trunk/deploy/tutorials/table-panes.html Mon Feb 7 02:36:04 2011
@@ -0,0 +1,304 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+--><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /><title>Table Panes | Apache Pivot</title><link xmlns="" type="text/css" rel="stylesheet" href="/styles/pivot.css"><script xmlns="http://www.w3.org/1999/xhtml" type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script><script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-7977275-3");
+ pageTracker._trackPageview();
+ } catch(err) {}</script></head><body><div xmlns="" id="wrapper"><div id="main"><div id="header"><div class="logo"><a href="/index.html"><img title="Apache Pivot Homepage" alt="Apache Pivot" src="/images/logo.png"></a></div><div class="tagline"><img style="visibility:hidden" alt="Rich Internet Applications in Java" src="/images/tagline.png"></div><ul class="navi"><li><a href="/demos/">Demos</a></li><li><a href="/download.cgi#2.0">Download</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/get-involved.html">Get Involved</a></li><li><a href="/about.html">About</a></li></ul></div><div class="group" id="contentBase"><h1>Table Panes</h1><ul class="naviLeft"><li><a href="/tutorials/sample-application.html">Sample Application</a></li><li><a href="/tutorials/platform-overview.html">Platform Overview</a></li><li><a href="/tutorials/hello-world.html">Hello, World!</a></li><li><a href="/tutorials/hello-bxml.html">Hello, BXML!</a></li><li><a href="/tutorial
s/component-and-container.html">Component & Container</a></li><li><a href="/tutorials/labels-and-image-views.html">Labels & Image Views</a></li><li><a href="/tutorials/svg-images.html">SVG Images</a></li><li><a href="/tutorials/buttons.html">Buttons</a></li><li><a href="/tutorials/push-buttons.html">Push Buttons</a></li><li><a href="/tutorials/toggle-buttons.html">Toggle Buttons</a></li><li><a href="/tutorials/radio-buttons.html">Radio Buttons</a></li><li><a href="/tutorials/checkboxes.html">Checkboxes</a></li><li><a href="/tutorials/link-buttons.html">Link Buttons</a></li><li><a href="/tutorials/lists.html">Lists</a></li><li><a href="/tutorials/list-buttons.html">List Buttons</a></li><li><a href="/tutorials/repeatable-list-buttons.html">Repeatable List Buttons</a></li><li><a href="/tutorials/text.html">Text</a></li><li><a href="/tutorials/suggestion-popups.html">Suggestion Popups</a></li><li><a href="/tutorials/text-areas.html">Text Areas</a></li><li><a href="/tutor
ials/separators.html">Separators</a></li><li><a href="/tutorials/layout-containers.html">Layout Containers</a></li><li><a href="/tutorials/flow-panes.html">Flow Panes</a></li><li><a href="/tutorials/box-panes.html">Box Panes</a></li><li><a href="/tutorials/grid-panes.html">Grid Panes</a></li><li><a href="/tutorials/table-panes.html">Table Panes</a></li><li><a href="/tutorials/borders.html">Borders</a></li><li><a href="/tutorials/stack-panes.html">Stack Panes</a></li><li><a href="/tutorials/split-panes.html">Split Panes</a></li><li><a href="/tutorials/forms.html">Forms</a></li><li><a href="/tutorials/panels.html">Panels</a></li><li><a href="/tutorials/navigation-containers.html">Navigation Containers</a></li><li><a href="/tutorials/card-panes.html">Card Panes</a></li><li><a href="/tutorials/tab-panes.html">Tab Panes</a></li><li><a href="/tutorials/accordions.html">Accordions</a></li><li><a href="/tutorials/expanders.html">Expanders</a></li><li><a href="/tutorials/rollups.html
">Rollups</a></li><li><a href="/tutorials/viewports.html">Viewports</a></li><li><a href="/tutorials/scroll-panes.html">Scroll Panes</a></li><li><a href="/tutorials/panoramas.html">Panoramas</a></li><li><a href="/tutorials/progress-indicators.html">Progress Indicators</a></li><li><a href="/tutorials/meters.html">Meters</a></li><li><a href="/tutorials/activity-indicators.html">Activity Indicators</a></li><li><a href="/tutorials/bounded-range-components.html">Bounded Range Components</a></li><li><a href="/tutorials/sliders.html">Sliders</a></li><li><a href="/tutorials/scroll-bars.html">Scroll Bars</a></li><li><a href="/tutorials/spinners.html">Spinners</a></li><li><a href="/tutorials/calendars.html">Calendars</a></li><li><a href="/tutorials/menus.html">Menus</a></li><li><a href="/tutorials/context-menus.html">Context Menus</a></li><li><a href="/tutorials/menu-bars.html">Menu Bars</a></li><li><a href="/tutorials/menu-buttons.html">Menu Buttons</a></li><li><a href="/tutorials/col
or-choosers.html">Color Choosers</a></li><li><a href="/tutorials/table-views.html">Table Views</a></li><li><a href="/tutorials/table-views.json.html">JSON-based TableView</a></li><li><a href="/tutorials/table-views.custom.html">Custom TableView</a></li><li><a href="/tutorials/tree-views.html">Tree Views</a></li><li><a href="/tutorials/file-browsing.html">File Browsing</a></li><li><a href="/tutorials/windows.html">Windows</a></li><li><a href="/tutorials/clipboard.html">Clipboard</a></li><li><a href="/tutorials/drag-and-drop.html">Drag and Drop</a></li><li><a href="/tutorials/effects.html">Effects</a></li><li><a href="/tutorials/effects.transitions.html">Transitions</a></li><li><a href="/tutorials/data-binding.html">Data Binding</a></li><li><a href="/tutorials/property-binding.html">Property Binding</a></li><li><a href="/tutorials/localization.html">Localization</a></li><li><a href="/tutorials/background-tasks.html">Background Tasks</a></li><li><a href="/tutorials/web-queries.
html">Web Queries</a></li><li><a href="/tutorials/query-servlet.html">QueryServlet</a></li><li><a href="/tutorials/scripting.html">Scripting</a></li><li><a href="/tutorials/summary.html">Summary</a></li><li><a href="/tutorials/stock-tracker.html">The "Stock Tracker" Application</a></li><li><a href="/tutorials/stock-tracker.ui.html">UI Markup Using BXML</a></li><li><a href="/tutorials/stock-tracker.events.html">Event Handling</a></li><li><a href="/tutorials/stock-tracker.web-queries.html">Web Queries</a></li><li><a href="/tutorials/stock-tracker.data-binding.html">Data Binding</a></li><li><a href="/tutorials/stock-tracker.localization.html">Localization</a></li><li><a href="/tutorials/bxml-primer.html">BXML Primer</a></li></ul><div class="content"><style type="text/css">
+ applet {
+ border: 1px solid #999999;
+ }
+ </style><!--NOTE: Syntax highlighting script is LGPL--><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript"></script><link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"><link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"><script type="text/javascript">
+ SyntaxHighlighter.all();
+ </script><div class="section">
+ <p>
+ Table panes are used to arrange components in a variable 2-dimensional grid, much like
+ an HTML table. Table panes have a "columns" collection that defines the column
+ structure of the table and a "rows" collection that defines both the row structure of
+ the table and the contents of each row.
+ </p>
+
+ <p>
+ Table panes support a number of styles that allow a caller to customize the arrangement
+ of child components:
+ </p>
+
+ <ul>
+ <li>
+ "padding" - the amount of space the table pane reserves around the perimeter of the
+ container.
+ </li>
+ <li>
+ "horizontalSpacing" - the amount of space the table pane inserts between columns.
+ </li>
+ <li>
+ "verticalSpacing" - the amount of space the table pane inserts between rows.
+ </li>
+ <li>
+ "showHorizontalGridLines" - whether horizontal grid lines will be painted in the
+ space between rows. Note that this will be ignored if "verticalSpacing" is zero, as
+ there would be no space in which to paint the grid lines.
+ </li>
+ <li>
+ "showVerticalGridLines" - whether vertical grid lines will be painted in the space
+ between columns. Note that this will be ignored if "horizontalSpacing" is zero, as
+ there would be no space in which to paint the grid lines.
+ </li>
+ <li>
+ "horizontalGridColor" - the color of the horizontal grid lines.
+ </li>
+ <li>
+ "verticalGridColor" - the color of the vertical grid lines.
+ </li>
+ <li>
+ "highlightBackgroundColor" - the background color of rows and columns whose
+ "highlighted" flag is set to <tt>true</tt>.
+ </li>
+ </ul>
+
+ <p>
+ Below is a sample application that demonstrates a basic table pane structure and
+ responds to mouse clicks with information about where the user clicked:
+ </p>
+
+ <script src="http://java.com/js/deployJava.js" type="text/javascript"></script><script type="text/javascript">
+
+ var attributes = {
+ code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
+ width:"560",
+ height:"340"
+ };
+
+
+
+
+
+ var libraries = [];
+ libraries.push("/lib/pivot-core-2.0.jar");
+ libraries.push("/lib/pivot-wtk-2.0.jar");
+ libraries.push("/lib/pivot-wtk-terra-2.0.jar");
+ libraries.push("/lib/pivot-tutorials-2.0.jar");
+
+ libraries.push("/lib/svgSalamander-tiny.jar");
+
+
+ attributes.archive = libraries.join(",");
+
+
+ var parameters = {
+ codebase_lookup:false,
+ application_class_name:'org.apache.pivot.wtk.ScriptApplication'
+ };
+
+
+ var javaArguments = ["-Dsun.awt.noerasebackground=true",
+ "-Dsun.awt.erasebackgroundonresize=true"];
+
+
+
+ parameters.java_arguments = javaArguments.join(" ");
+
+
+
+ var startupProperties = [];
+
+ startupProperties.push("src=/org/apache/pivot/tutorials/layout/simple_table_panes.bxml");
+
+ parameters.startup_properties = startupProperties.join("&");
+
+
+ deployJava.runApplet(attributes, parameters, "1.6");
+ </script>
+
+ <p>The BXML source for the application is shown below:</p>
+
+ <pre class="brush:xml">
+
+ <layout:SimpleTablePanes bxml:id="window" title="Table Panes" maximized="true"
+ xmlns:bxml="http://pivot.apache.org/bxml"
+ xmlns:layout="org.apache.pivot.tutorials.layout"
+ xmlns="org.apache.pivot.wtk">
+ <Border>
+ <TablePane bxml:id="tablePane" styles="{verticalSpacing:1, showHorizontalGridLines:true,
+ horizontalSpacing:1, showVerticalGridLines:true}">
+ <columns>
+ <TablePane.Column width="-1"/>
+ <TablePane.Column width="50"/>
+ <TablePane.Column width="-1"/>
+ <TablePane.Column width="1*"/>
+ <TablePane.Column width="2*"/>
+ </columns>
+
+ <TablePane.Row height="-1">
+ <TablePane.Filler/>
+ <Label text="50" styles="{horizontalAlignment:'center'}"/>
+ <Label text="-1" styles="{horizontalAlignment:'center'}"/>
+ <Label text="1*" styles="{horizontalAlignment:'center'}"/>
+ <Label text="2*" styles="{horizontalAlignment:'center'}"/>
+ </TablePane.Row>
+
+ <TablePane.Row height="50">
+ <Label text="50" styles="{verticalAlignment:'center'}"/>
+ </TablePane.Row>
+
+ <TablePane.Row height="-1">
+ <Label text="-1" styles="{verticalAlignment:'center'}"/>
+ </TablePane.Row>
+
+ <TablePane.Row height="1*">
+ <Label text="1*" styles="{verticalAlignment:'center'}"/>
+ </TablePane.Row>
+
+ <TablePane.Row height="2*">
+ <Label text="2*" styles="{verticalAlignment:'center'}"/>
+ </TablePane.Row>
+ </TablePane>
+ </Border>
+ </layout:SimpleTablePanes>
+
+ </pre>
+
+ <p>
+ The Java source is as follows. Most of the code is simply event handling logic that
+ responds to mouse clicks:
+ </p>
+
+ <pre class="brush:java">
+
+ package org.apache.pivot.tutorials.layout;
+
+ import java.net.URL;
+
+ import org.apache.pivot.beans.Bindable;
+ import org.apache.pivot.collections.Map;
+ import org.apache.pivot.util.Resources;
+ import org.apache.pivot.wtk.BoxPane;
+ import org.apache.pivot.wtk.Component;
+ import org.apache.pivot.wtk.ComponentMouseButtonListener;
+ import org.apache.pivot.wtk.Label;
+ import org.apache.pivot.wtk.MessageType;
+ import org.apache.pivot.wtk.Mouse;
+ import org.apache.pivot.wtk.Orientation;
+ import org.apache.pivot.wtk.Prompt;
+ import org.apache.pivot.wtk.TablePane;
+ import org.apache.pivot.wtk.Window;
+
+ public class SimpleTablePanes extends Window implements Bindable {
+ private TablePane tablePane = null;
+
+ @Override
+ public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
+ tablePane = (TablePane)namespace.get("tablePane");
+
+ tablePane.getComponentMouseButtonListeners().add(new ComponentMouseButtonListener.Adapter() {
+ @Override
+ public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
+ int rowIndex = tablePane.getRowAt(y);
+ int columnIndex = tablePane.getColumnAt(x);
+
+ if (rowIndex >= 0
+ && columnIndex >= 0) {
+ TablePane.Row row = tablePane.getRows().get(rowIndex);
+ TablePane.Column column = tablePane.getColumns().get(columnIndex);
+
+ int rowHeight = row.getHeight();
+ int columnWidth = column.getWidth();
+
+ String message = "Registered Click At " + rowIndex + "," + columnIndex;
+
+ Label heightLabel = new Label(String.format("The row's height is %d (%s)",
+ rowHeight,
+ rowHeight == -1 ? "default" : (row.isRelative() ? "relative" : "absolute")));
+ Label widthLabel = new Label(String.format("The column's width is %d (%s)",
+ columnWidth,
+ columnWidth == -1 ? "default" : (column.isRelative() ? "relative" : "absolute")));
+
+ BoxPane body = new BoxPane(Orientation.VERTICAL);
+ body.add(heightLabel);
+ body.add(widthLabel);
+
+ Prompt.prompt(MessageType.INFO, message, body, SimpleTablePanes.this);
+ }
+
+ return false;
+ }
+ });
+ }
+ }
+
+ </pre>
+
+ <p>
+ The following is a more involved application that allows the user to interact with the
+ table pane and get a feel for how the different settings affect layout. The
+ application manages the table pane's styles via the controls on the left and responds
+ to right-clicks over the table pane itself. The user can also drag the splitter to see
+ the effect it has on the relative columns in the grid pane.
+ </p>
+
+ <script src="http://java.com/js/deployJava.js" type="text/javascript"></script><script type="text/javascript">
+
+ var attributes = {
+ code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
+ width:"560",
+ height:"340"
+ };
+
+
+
+
+
+ var libraries = [];
+ libraries.push("/lib/pivot-core-2.0.jar");
+ libraries.push("/lib/pivot-wtk-2.0.jar");
+ libraries.push("/lib/pivot-wtk-terra-2.0.jar");
+ libraries.push("/lib/pivot-tutorials-2.0.jar");
+
+ libraries.push("/lib/svgSalamander-tiny.jar");
+
+
+ attributes.archive = libraries.join(",");
+
+
+ var parameters = {
+ codebase_lookup:false,
+ application_class_name:'org.apache.pivot.wtk.ScriptApplication'
+ };
+
+
+ var javaArguments = ["-Dsun.awt.noerasebackground=true",
+ "-Dsun.awt.erasebackgroundonresize=true"];
+
+
+
+ parameters.java_arguments = javaArguments.join(" ");
+
+
+
+ var startupProperties = [];
+
+ startupProperties.push("src=/org/apache/pivot/tutorials/layout/table_panes.bxml");
+
+ parameters.startup_properties = startupProperties.join("&");
+
+
+ deployJava.runApplet(attributes, parameters, "1.6");
+ </script>
+ </div><p>Next: <a href="borders.html">Borders</a></p></div></div></div><div class="group" id="footer"><div class="footerLogo">Copyright (c) 1999-2011<br>The Apache Software Foundation.</div><div class="footerLinks"><ul class="footerMenuGr"><li><strong>Demos</strong><ul><li><a href="/demos/kitchen-sink.html" target="_new">"Kitchen Sink"</a></li><li><a href="/demos/component-explorer.html" target="_new">Component Explorer</a></li><li><a href="http://ixnay.biz/pivot-jfree-demos/charts_demo.html" target="_new">Charting</a></li><li><a href="/demos/">More Demos</a></li></ul></li><li><strong>Documentation</strong><ul><li><a href="/getting-started.html">Getting Started</a></li><li><a href="/tutorials/">Tutorial</a></li><li><a href="/faq.html">FAQ</a></li><li><a href="/2.0/docs/api/">Javadoc (2.0)</a></li></ul></li><li><strong>Get Involved</strong><ul><li><a href="/svn.html">SVN Repositories</a></li><li><a href="/lists.html">Mailing Lists</a></li><li><a href="http://issues.apache
.org/jira/browse/PIVOT">Bug Database</a></li><li><a href="http://cwiki.apache.org/PIVOT/">Wiki</a></li></ul></li><li><strong>Related</strong><ul><li><a href="http://code.google.com/p/pivot-jfree/">JFreeChart Provider</a></li></ul></li><li><strong>About</strong><ul><li><a href="/who-we-are.html">Who We Are</a></li><li><a href="/contact.html">Contact</a></li><li><a href="/news.html">News</a></li><li><a href="/legal.html">Legal/License</a></li></ul></li></ul></div></div></div></body></html>
\ No newline at end of file