You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2014/04/24 15:03:02 UTC
svn commit: r1589706 - in /pivot/site/trunk/deploy/tests:
hello-world-unsigned.html hello-world.html
Author: smartini
Date: Thu Apr 24 13:03:02 2014
New Revision: 1589706
URL: http://svn.apache.org/r1589706
Log:
PIVOT-920, updating sample page (new, with name -unsigned, and copy a saved version of the old one with original name)
Added:
pivot/site/trunk/deploy/tests/hello-world-unsigned.html
Modified:
pivot/site/trunk/deploy/tests/hello-world.html
Added: pivot/site/trunk/deploy/tests/hello-world-unsigned.html
URL: http://svn.apache.org/viewvc/pivot/site/trunk/deploy/tests/hello-world-unsigned.html?rev=1589706&view=auto
==============================================================================
--- pivot/site/trunk/deploy/tests/hello-world-unsigned.html (added)
+++ pivot/site/trunk/deploy/tests/hello-world-unsigned.html Thu Apr 24 13:03:02 2014
@@ -0,0 +1,326 @@
+<!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 http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Hello, World! | Apache Pivot</title>
+ <link href="/styles/pivot.css" rel="stylesheet" type="text/css">
+ <link href="/styles/pivot_print.css" rel="stylesheet" type="text/css" media="print">
+
+ <script 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 id="wrapper">
+
+ <div id="main">
+ <div id="header">
+ <div xmlns="" class="logo">
+ <a href="/index.html"><img src="/images/logo.png" alt="Apache Pivot" title="Apache Pivot Homepage"></a>
+ </div>
+ <div class="logoASF">
+ <a href="http://www.apache.org/"><img src="/images/asf_logo_wide_transp.png" alt="Apache" title="Apache Homepage"></a>
+ </div>
+ <div class="tagline"><img src="/images/tagline.png" alt="Rich Internet Applications in Java" style="visibility:hidden">
+ </div>
+
+ <ul class="navi"><li><a href="/demos/">Demos</a></li><li><a href="/download.cgi#2.0.3">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 id="contentBase" class="group"><h1>Hello, World!</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-butt
ons.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/fill-panes.html">Fill Panes</a></li><li><a href="/tutorials/grid-panes.html">Grid Panes</a></li><li><a href="/tutori
als/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="/tu
torials/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 type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js"></script><script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js"></script><script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js"></script><script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js"></script><link type="text/css" rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css"><link type="text/css" rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css"><script type="text/javascript">
+ SyntaxHighlighter.all();
+ </script>
+ <div class="section">
+ <p>
+ Below is the output of the traditional "hello world" application written in Pivot:
+ </p>
+
+ <script type="text/javascript" src="http://java.com/js/deployJava.js"></script><script type="text/javascript">
+
+ var attributes = {
+ code:"org.apache.pivot.wtk.BrowserApplicationContext$HostApplet",
+ width:"240",
+ height:"80"
+ };
+
+
+ var libraries = [];
+ libraries.push("/lib/pivot-core-2.0.3.jar");
+ libraries.push("/lib/pivot-wtk-2.0.3.jar");
+ libraries.push("/lib/pivot-wtk-terra-2.0.3.jar");
+ libraries.push("/lib/pivot-tutorials-2.0.3.jar");
+ libraries.push("/lib/svgSalamander-tiny.jar");
+
+ attributes.archive = libraries.join(",");
+
+
+ var parameters = {
+ codebase_lookup:false,
+ application_class_name:'org.apache.pivot.tutorials.HelloJava'
+ };
+
+
+ var javaArguments = ["-Dsun.awt.noerasebackground=true",
+ "-Dsun.awt.erasebackgroundonresize=true"];
+
+
+ parameters.java_arguments = javaArguments.join(" ");
+ parameters.permissions = "sandbox";
+
+
+ deployJava.runApplet(attributes, parameters, "1.6");
+ </script>
+
+ <p>
+ This version of the application was written entirely in Java and is shown below; a BXML
+ example is shown in the next section:
+ </p>
+
+ <pre class="brush:java">
+
+ package org.apache.pivot.tutorials;
+
+ import java.awt.Color;
+ import java.awt.Font;
+
+ import org.apache.pivot.collections.Map;
+ import org.apache.pivot.wtk.Application;
+ import org.apache.pivot.wtk.Display;
+ import org.apache.pivot.wtk.HorizontalAlignment;
+ import org.apache.pivot.wtk.Label;
+ import org.apache.pivot.wtk.VerticalAlignment;
+ import org.apache.pivot.wtk.Window;
+
+ public class HelloJava implements Application {
+ private Window window = null;
+
+ @Override
+ public void startup(Display display, Map<String, String> properties) {
+ window = new Window();
+
+ Label label = new Label();
+ label.setText("Hello World!");
+ label.getStyles().put("font", new Font("Arial", Font.BOLD, 24));
+ label.getStyles().put("color", Color.RED);
+ label.getStyles().put("horizontalAlignment",
+ HorizontalAlignment.CENTER);
+ label.getStyles().put("verticalAlignment",
+ VerticalAlignment.CENTER);
+
+ window.setContent(label);
+ window.setTitle("Hello World!");
+ window.setMaximized(true);
+
+ window.open(display);
+ }
+
+ @Override
+ public boolean shutdown(boolean optional) {
+ if (window != null) {
+ window.close();
+ }
+
+ return false;
+ }
+
+ @Override
+ public void suspend() {
+ }
+
+ @Override
+ public void resume() {
+ }
+ }
+
+ </pre>
+
+ <p>
+ The program demonstrates some of the fundamental features of the Pivot platform: the
+ <tt>Application</tt> interface, the <tt>Window</tt> class, and styles.
+ </p>
+
+ <h3>The Application Interface</h3>
+ <p>
+ The Application interface is the entry point into a Pivot application. It is similar to
+ the <tt>main()</tt> method used in C and Java programming or the lifecycle methods used
+ in traditional Java applet development. It defines the following four methods:
+ </p>
+
+ <ul>
+ <li>
+ <tt>startup()</tt> - called when an application is starting up
+ </li>
+ <li>
+ <tt>shutdown()</tt> - called when a running application is shutting down
+ </li>
+ <li>
+ <tt>suspend()</tt> - called when an application is temporarily deactivated
+ </li>
+ <li>
+ <tt>resume()</tt> - called when a suspended application is resumed
+ </li>
+ </ul>
+
+ <p>
+ However, unlike <tt>main()</tt> or the applet lifecycle methods, which require a
+ separate code base for each environment, <tt>Application</tt> defines a single
+ interface that is used for both web deployment or desktop execution, allowing the same
+ program to run unmodified in either environment.
+ </p>
+
+ <p>
+ A Pivot application can be run in the browser using the <tt><applet></tt> tag, as
+ shown below; the class name of the Pivot application is specified by the
+ "application_class_name" applet parameter (see
+ <a href="http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit">this article</a>
+ for more information on how to deploy Java applets):
+ </p>
+
+ <pre class="brush:html">
+
+ <applet code="org.apache.pivot.wtk.BrowserApplicationContext$HostApplet"
+ archive="lib/pivot-core-[version].jar,lib/pivot-wtk-[version].jar,lib/pivot-wtk-terra-[version].jar,lib/pivot-tutorials-[version].jar"
+ width="160" height="80">
+ <param name="application_class_name" value="org.apache.pivot.tutorials.HelloJava">
+ </applet>
+
+ </pre>
+
+ <p>
+ The same application can be run from the command line using the following syntax (minus
+ the line breaks) on UNIX-based systems:
+ </p>
+
+ <p>
+ <tt>java -cp pivot-core-<i>[version]</i>.jar:pivot-wtk-<i>[version]</i>.jar:
+ pivot-wtk-terra-<i>[version]</i>.jar:pivot-tutorials-<i>[version]</i>.jar
+ org.apache.pivot.wtk.DesktopApplicationContext org.apache.pivot.tutorials.HelloJava</tt>
+ </p>
+
+ <p>
+ and the following on Windows systems:
+ </p>
+
+ <p>
+ <tt>java -cp pivot-core-<i>[version]</i>.jar;pivot-wtk-<i>[version]</i>.jar;
+ pivot-wtk-terra-<i>[version]</i>.jar;pivot-tutorials-<i>[version]</i>.jar
+ org.apache.pivot.wtk.DesktopApplicationContext org.apache.pivot.tutorials.HelloJava</tt>
+ </p>
+
+ <p>
+ Note that (for offline testing purposes) <tt>pivot-tutorials-<i>[version]</i>.jar</tt>
+ is not provided directly in binary distribution, but it's inside generated war files
+ (under the lib folder). Otherwise, you can build it from sources.
+ </p>
+
+ <p>
+ The application class name is specified as the first argument to the
+ <tt>DesktopApplicationContext</tt> loader application.
+ </p>
+
+ <p>
+ Note that you can even add the main() method to be able to run the class as
+ Standard Java Application in the usual way.
+ </p>
+ <pre class="brush:java">
+
+ public static void main(String[] args) {
+ DesktopApplicationContext.main(HelloJava.class, args);
+ }
+
+ </pre>
+
+
+ <br>
+ <h3>The Window Class</h3>
+ <p>
+ A window is the top-level entry point into an application's user interface. Almost all
+ Pivot applications will use at least one window.
+ </p>
+
+ <p>
+ The window in the sample application is an instance of <tt>Window</tt>, the most basic
+ window type. It is simply an undecorated area of the screen into which other components
+ may be placed. Other window types, such as <tt>Dialog</tt> and <tt>Frame</tt>, add
+ additional features and behaviors such as title bars and modality.
+ </p>
+
+ <p>
+ The window used by "Hello World" is "maximized": it automatically fills the entire area
+ of the display. A maximized, decorationless window is commonly used as a top-level
+ application window, particularly for applications that will be primarily run in a web
+ browser. However, windows can also be given an explicit size, can be resized by the
+ user, or can take on the default size of their content. Windows are discussed in more
+ detail in the <a href="windows.html">Windows</a> section.
+ </p>
+
+ <br>
+ <h3>Styles</h3>
+ <p>
+ Styles are a means of customizing a component's appearance. Style properties are
+ defined by a component's skin and are accessed via a component's styles collection. For
+ example, the example application sets the font, color, and alignment styles on the
+ "Hello World" label. Though skins are not required to provide styling support, most
+ will provide similar capabilities.
+ </p>
+
+ <br>
+
+ </div>
+
+ <p>Next: <a href="hello-bxml.html">Hello, BXML!</a></p>
+ </div></div>
+ </div>
+
+ <div id="footer" class="group"><div class="footerLogo">Copyright (c) 1999-2013<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://cwiki.apache.org/confluence/display/PIVOT/Other+Demos" 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.3/docs/api/">Javadoc (2.0.3)</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/a/apache-extras.org/p/pivot-jfree/">JFreeChart Provider</a></li><li><a href="http://code.google.com/a/apache-extras.org/p/pivot-common/">Pivot-Common</a></li><li><a href="http://code.google.com/a/apache-extras.org/p/pivot-contrib/">Pivot-Contrib</a></li><li><a href="http://code.google.com/a/apache-extras.org/p/pivot-multilang/">Pivot-Multilang</a></li><li><a href="http://code.google.com/a/apache-ext
ras.org/p/pivot-stuff/">Pivot-Stuff</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="http://www.apache.org/">Apache Home</a></li><li><a href="/legal.html">Legal/License</a></li><li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+ <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></li>
+ </ul>
+ </div>
+ <div class="footerLinks">
+ Apache Pivot, Pivot, Apache, and the Apache Pivot project logo are trademarks of The Apache Software Foundation.
+ </div>
+ </div>
+
+ </div>
+</body>
+</html>
Modified: pivot/site/trunk/deploy/tests/hello-world.html
URL: http://svn.apache.org/viewvc/pivot/site/trunk/deploy/tests/hello-world.html?rev=1589706&r1=1589705&r2=1589706&view=diff
==============================================================================
--- pivot/site/trunk/deploy/tests/hello-world.html (original)
+++ pivot/site/trunk/deploy/tests/hello-world.html Thu Apr 24 13:03:02 2014
@@ -1,19 +1,19 @@
<!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.
+<!--
+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>
@@ -96,7 +96,6 @@ limitations under the License.
parameters.java_arguments = javaArguments.join(" ");
- parameters.permissions = "sandbox";
deployJava.runApplet(attributes, parameters, "1.6");