|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Product Reviews HIP 1.0 PJ and J2
HIP 1.0 PJ and J2
By: Matthew Dodd
Oct. 1, 2002 12:00 AM
Interacting with software can be extremely annoying or incredibly exciting depending on the user interface. While one GUI can leave you hopelessly confused and deny the execution of simple tasks because you can't find the right button, another GUI can draw you in with its appealing and conclusive features, making the implementation of even complex procedures a walk in the park. For a long time, the development of graphically advanced user interfaces was something only desktop software developers could do, as Java simply lacked the respective toolsets. AWT and later Swing have tried to fill the gap, but are still greatly limited compared to Microsoft's Windows OS or Apple's Mac OS X. With the growing range of end-user devices that directly support Java, it's increasingly becoming the one true platform-independent environment every developer has been waiting for if only the graphical user interface frameworks could compete with their native counterparts on Windows or Mac OS. This is where Our World Live's (OWL) Human Interface Package (HIP) comes in. HIP 1.0 for PersonalJava and HIP 1.0 for Java 2 (J2SE and J2EE) are two user-interface frameworks that provide a complete set of out-of-the-box APIs and, according to OWL, "transcend the limitations of AWT and Swing and revolutionize the development of Java GUIs in 100% Pure Java."
HIP 1.0 PJ
HIP 1.0 J2
Installing and Using HIP
When a compiled project is run the first time, HIP asks for a license key and creates a license file that has to be stored beside the HIP JAR or in the system classpath. As long as HIP finds the license file in one of those two places, no further haggling with licenses is necessary. The license key mechanism is network-aware and will detect if the same key is used twice. The included Read Me provides some basic information and pointers to the extensive API documentation on OWL's Web site. The documentation lives up to its task and provides a fully indexed and cross-linked Javadoc manual. If you have experience with AWT or Swing, soon you'll be using HIP like an expert. Starting with HIP, you'll notice that replacing Swing classes with their HIP counterparts usually works, speeding up your development time. It would have been easier if OWL had included a default skin and some examples on how to use it to develop your own. Sample Program Let's take a simple example and do some programming. The goal is to create a free-form crosshair that floats over the background (see Figure 1). The task is simple. All you need are two graphics (JPEG or GIF), the picture of the crosshair (see Figure 2), a simple mask (see Figure 3), and some code for instantiation. Convenient multiparameter constructors or single methods for each representation can be used in both HIP frameworks. An example of the crosshair instantiation:
// HIP PJ code This is much easier than creating an optically similar result in Swing, and it would be a development project of its own in AWT. In HIP, everything is at your fingertips. As the mask can also contain gradients, any user interface design idea can be realized. The HIP classes are accompanied by a rich set of methods and properties, making GUI development a lot easier. Next to the makeDraggable method are float value and percent setters for the transparency. In Figure 4, I've set the transparency value of an OWLJPanel to 40%, causing it (and all its children) to be rendered with a 40% transparency, so the parent component shines through the panel. The code is simple:
panel.setTransparency HIP J2 is worth using since transparencies and free-form shapes are a no-go in Swing; however, HIP PJ can bring these features even to PersonalJava. With HIP PJ you can develop advanced GUIs for communicators and handheld devices like a Compaq iPaq. One thing that would make it even easier to start with HIP: additional ready-to-use code snippets. On the other hand, you can always go to OWL's online discussion boards for tips, tricks, and (free) support.
Summary
In addition to offering a whole new world of possibilities for GUI development, HIP can also reduce the time and cost for traditional user interface developments due to its rich set of methods and properties.
JDJ Product Snapshot
Our World Live, Inc.
Specifications
Test Platforms
Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||