The Source for Java Technology Collaboration
User: Password:



Greg Brown's Blog

Greg Brown Greg Brown is a senior member of the technical staff at VMware. He has been working with and evangelizing rich client-enabling technologies for over 10 years, including Java, Flash, Flex, and AJAX. He is the architect and lead developer of Pivot, a Java-based rich client platform. He holds a bachelor's degree in Computer Systems Engineering from the University of Massachusetts Amherst.



What is new with Apache Pivot?

Posted by gkbrown on July 01, 2009 at 12:21 PM | Permalink | Comments (1)

It has been a while since I have written about Pivot, so I thought I would put together a quick entry to highlight a few of the things we have been working on recently (Apache Pivot is a platform for building rich internet applications in Java. It is currently undergoing incubation at the Apache Software Foundation).

CardPane Transitions

One of the new features added in Pivot 1.2 was support for selection change transitions in the CardPane class. These allow developers to easily add some visual interest to an application's navigation. Pivot 1.2 includes support for crossfade and horizontal/vertical slide transitions, and Pivot 1.3 adds the flip transition initially implemented for the table row editor demo. This demo (from the Pivot tutorial) shows what each of the new transitions looks like (Java 6 required):

http://ixnay.biz/card_panes.html

Cool, huh? If anyone has any suggestions for other transitions you might like to see, please let us know.

Scripting

We have made some significant enhancements to WTKX scripting support for Pivot 1.3. Script code can now be embedded inline in a WTKX document (previously, it had to be stored in an external file). More importantly, it is now much simpler to declare event handlers in WTKX. It is no longer necessary to implement a listener interface and programmatically add the listener to a component's listener list - this can now be done entirely in markup. For example, the following WTKX creates a PushButton and attaches two button press listeners to it, one written in JavaScript and the other in Groovy:

<PushButton wtkx:id="pushButton" buttonData="Click Me!">
    <buttonPressListeners>
        <wtkx:script language="javascript">
        importPackage(org.apache.pivot.wtk);
        function buttonPressed(button) {
            Alert.alert("Hello from JavaScript!", button.getWindow());
        }
        </wtkx:script>

        <wtkx:script language="groovy">
        buttonPressed = {
            out.println("Hello from Groovy!")
        }
        </wtkx:script>
    </buttonPressListeners>
</PushButton>

You probably wouldn't want to code the logic for your entire application this way, but it does make declaring simple event handlers a lot easier.

Charting

The JFreeChart provider for Pivot has been updated to work with the latest release of JFreeChart. A demo is here:

http://ixnay.biz/charts.html

UI Scaling

Pivot was designed from the ground up to be resolution independent; all components are rendered using Java2D graphics primitives. However, it wasn't until Pivot 1.2 that this support became accessible to the user. Pivot 1.2 and later allows the user to interactively zoom the display scale in and out by either pressing Shift-Control and scrolling the mouse wheel or pressing the + or - keys. You can try it yourself in the Kitchen Sink demo (or any other Pivot app). While Pivot still can't claim full accessibility support, this feature should go a long way towards helping us get there.

JSON Viewer

Last week I had occasion to debug some code that relied on some rather complex JSON data. The data had been stripped of whitespace and line feeds for efficiency, which made it pretty difficult to read. I put this application together to help me navigate the data more efficiently. It allows the user to either paste JSON data from the clipboard or drag JSON files into a TreeView component:

http://ixnay.biz/json_viewer.html

Thanks to Pivot's built-in JSON support, the application was almost trivial to write. Here's the source code:

http://svn.apache.org/repos/asf/incubator/pivot/trunk/tools/src/org/apache/pivot/tools/json/

Note that the application takes advantage of Pivot's newly-added scripting features. Most of the app's code is defined in JSONViewer.java, but the drop handler is defined in json_viewer.js, and, of course, the UI structure is defined in json_viewer.wtkx. I think it's a pretty handy tool - hopefully other developers will find some value in it as well.

Logo

Finally, we're trying really hard to come up with a logo for Pivot, but thus far our efforts have been somewhat lackluster (we're software engineers, not graphic designers, after all). If anyone is artistically inclined and would like to help, we would love to hear from you! Please drop us a note on our developer mailing list.

That's all for now. I will be posting more soon as we get closer to the release of Pivot 1.3.



Exploring Apache Pivot 1.1, Part 1

Posted by gkbrown on April 27, 2009 at 07:35 AM | Permalink | Comments (4)

The first of three articles exploring some of the new features in Pivot 1.1 has just been posted over at InsideRIA. Check it out:

http://www.insideria.com/2009/04/exploring-apache-pivot-11-part.html



Announcing Pivot 1.1

Posted by gkbrown on April 20, 2009 at 04:50 AM | Permalink | Comments (4)

The Pivot development team is happy to announce the release of Apache Pivot version 1.1! Pivot is an open-source platform for building rich internet applications in Java. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the industry-standard Java platform.

This is the first official release since Pivot 1.0 was announced last fall, and is also the first release since Pivot joined the Apache Software Foundation as an incubator project this past February.

Major enhancements in Pivot 1.1 include:

  • New/updated components:

    • Accordion - provides navigation capabilities similar to a tab pane, but arranged vertically

    • Calendar - basic date picker; both standalone and drop-down versions are supported

    • Slider - allows a user to select one of a range of values by moving a draggable "thumb"

    • Color Picker - presents a list of selectable color swatches to the user

    • Support for checkboxes in tree and list views, including mixed state checkboxes in tree view

    • Framework support for list, table, and tree view editors

  • Improved drag/drop and clipboard support. Pivot applications can now interact with the desktop just like native apps, with full access to the system clipboard and drag/drop facilities.

  • File browser support. Pivot now provides out-of-the-box support for browsing the local file system. Combined with the new drag/drop support, this makes Pivot an ideal choice for web-based file management applications.

  • Input validation framework. Pivot 1.1 includes an extensible framework for validating user input, allowing applications to provide instant and obvious feedback when invalid data has been entered.

  • Support for scripting languages in WTKX. In addition to Java, the new <wtkx:script> tag allows developers to easily create Pivot applications using a variety of JVM languages including JavaScript, Groovy, and others.

  • Enhanced support for DOM interaction. Pivot now supports bi-directional communication between an application and the web page that contains it. Multiple applications on the same page can also communicate with each other.

  • Additional effects and more pervasive animations. All of Pivot's navigation components now use animated transitions; menus, list button popups, and sheets use a translucent background; and menus and list buttons fade when closed, providing a more enriching user experience.

  • Improved font rendering. Pivot now uses the default system setting for font smoothing, producing more natural-looking user interfaces.

  • Numerous bug fixes and performance improvements.

More information is available on the Pivot home page, http://incubator.apache.org/pivot. Hope to see you there!

-The Pivot Development Team



July 2009
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  


Search this blog:
  

Categories
Community: JavaDesktop
J2SE
Open Source
Programming
Web Applications
Web Services and XML
Archives

July 2009
April 2009
November 2008
October 2008
August 2008
June 2008
March 2007

Recent Entries

What is new with Apache Pivot?

Exploring Apache Pivot 1.1, Part 1

Announcing Pivot 1.1



Powered by
Movable Type 3.01D


 Feed java.net RSS Feeds