Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


JViews by ILOG, Inc
JViews by ILOG, Inc

Once upon a time, it looked as though I was set for a while on software. I had L-View, the new picture editing shareware everyone was talking about. I had Microsoft Paint, a pretty good graphics creation program (if you didn't mind your graphics looking like a child in first grade had drawn them). I had HTML Notepad and a full head of hair. What more could a budding young Web developer ask for to guarantee success in this brand new industry?

As we all know, a lot has changed since then. The passing of time, as well as the dawning of new technologies, has led to the obsolescence of all of the aforementioned. (It's my hair I miss the most!) By the time the Java revolution exploded, the deck had been re-shuffled and graphics development was no exception to this rule. I've always tried to keep up with the latest developments in graphics, so I was anxious to try JViews, a new Java graphics development class library from ILOG.

I've seen Java graphics packages before, many of which were not very impressive. They offered nothing more than a sparse menu of simple shapes, forms and limited choices of ways the graphics can interact with objects. JViews is different, however.

Installation
Your system must be enabled with JDK 1.1 or better. A classpath variable has to be set to the directory the install program resides in. Open a command prompt and type: java JViews. Installation is automatic from there.

It Inherits its Power from C++ ILOG took what they had learned from developing their C++ graphics library and applied it to Java. The result is a library of Java classes that can be used in the development of high performance graphics displays. It is especially useful for network layout displays, map displays (even if the end user wants to overlay these maps with their own customized objects) and customized editors. The displays that can be built with JViews can contain a very large number of graphics, upwards of tens of thousands of objects. This allows JViews to shine for those industrial-strength apps. Another benefit is the separation of presentation from behavior. While one set of pre-defined objects are graphics that know how to draw themselves, another set represents behaviors, such as selection, drag/drop and resizing. This separation has a few big advantages. Developers can assign any behavior to a graphic object to change its function. Pre-defined behavior objects can be subclassed so end users can fine-tune it to their exact needs.

Although JViews is based on C++, it has the completely open architecture that is the cornerstone of Java development. Any Java lightweight component can be taken and used as a node on a network. Some of the JViews classes can even be wrapped as beans and placed on a GUI builder palette alongside other beans. JViews is built in two levels: The 2D graphics level, and the manager level.

Create Basic or Complex Graphics with JViews' Huge Library
The 2D graphics level provides graphic objects to control appearance, and interaction objects to control behavior. Provided also are the basic tools needed to combine graphic and interaction objects to form a complete application.

The manager level of JViews organizes sets of graphic objects into multiple views and layers with higher order interactions. All of these aspects are grouped together by an object called a manager. The grapher, a class that organizes certain objects into nodes and links, is included among the manager class hierarchy.

JViews comes equipped with IlvEdit, a handy editor that is provided with source code. It allows you to easily create and edit graphic objects. The starting point for these objects is the class IlvGraphic. This class allows the graphic object to draw itself at any given destination port. If necessary, an associated object of the IlvTransformer class may be used to change the coordinates of the graphic object. IlvGraphic also has member functions that allow you to set and change geometric dimensions. Various member functions are provided to implement user properties that can be associated with an object for application-specific purposes.

It Doesn't Just Create Graphics - It Interfaces them as Well
I remember when I knew of only one way to interface graphics with some sort of function or application, and that was through HTML. The HREF tag was used to create a simple link to another Web page or an application from the server that could run through the browser. Today's fast-paced, competitive environment does not allow us to get off so easily, however. There is a very real and immediate need to create GUI interfaced applications that function both on and off the Web. JViews provides us with just the tool we need to create these applications.

An application-programming interface (API)--a library of Java classes which contains pre-defined graphic objects and various behaviors which can be applied to these objects--is also included. The result is an easy, no-nonsense approach to interfacing graphic objects to applications. A friend of mine who is in the process of interfacing all of his household lighting through his computer was so impressed with this software that he wants to try to use it to make a GUI interface for his system. Turning on a light or the stereo was never this exciting!

A Basic Example
Let¹s take a quick look at a simple example of how JViews is used. First, we¹ll make a simple map. The first example shows the creation of a manager and how to load a graphic objects file into this manager. The example given shows a scrolling window of a map of the USA.

Here¹s some of the code used to create this applet:

First, the library must be imported:

import ilog.views.*;

The applet and AWT packages must also be imported:

import java.applet.*;
import java.awt.*;

If the file is going to be loaded through a URL, the java.net package must be used:

import java.net.*;

The applet class named sample1 is now created. This applet has two fields: The manager (class IlvManager) that stores the objects and the viewer (class IlvManagerView), which displays the content of the manager.

public class Sample1 extends Applet {
IlvManager manager;
IlvManagerView mgrview;
....
}

For the initialization of the applet, the manager is created:

public void init() {
manager = new IlvManager();
IlvReliefLabel obj = new
IlvReliefLabel(newIlvRect(580, 160,50, 30),
³One²;manager.addObject(obj, 1, false);
obj = new IlvReliefLabel(new IlvRect(530,
330, 50, 30) ³Two²
manager.addObject(obj, 1, false);
...
}

The second example provided, sample2.java, shows the use of selection interactor. In this example, a button has been added to the applet. Once the button has been clicked on, graphic objects can be selected, moved and it is even possible to modify their shape.

A field named selectInteractor has been added in the class:

void createInteractorButtons()
{
Button button;
button = new Button("Select");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
if (selectInteractor == null)
selectInteractor = new IlvSelectInteractor();
if (mgrview.getInteractor() != selectInteractor)
mgrview.pushInteractor(selectInteractor);
}
});
add("South", button);
}

It might be worth noting that the SelectInteractor is a pre-defined behavior that controls the selection of an object, the ³resize handles² that indicate that an object is selected, moved and resized, etc. Developers can choose to use this behavior ³as is², or subclass to modify just those parts of it that they want to tailor.

Other Features

  • Compatibility: JViews works with all AWT (abstract window toolkit), JFC (Java foundation classes) and JavaBean components. Other Java GUI builders such as Symantec¹s Visual Café and Sun¹s Java Workshop can encapsulate JViews classes as JavaBeans to place on the palette and use like other components.
  • Browser support: JViews can be used on any browser that supports the latest JDK. This includes Netscape Communicator, Sun¹s HotJava and, of course, Microsoft Internet Explorer.
  • Importation of external formats: JViews is equipped with file reformatters to import existing 2D graphics data files. The DXF file reader imports AutoCAD files.

    All in all, JViews is an excellent library from which really cool apps can be built. It enables developers to quickly and easily produce clean, crisp graphics that can be used for demonstration purposes or to be interfaced with more complex applications. It offers compatibility with other applications and, best of all, it¹s Pure Java, which means total platform independence. If you are in a position where you need a no-nonsense, hard hitting application to develop GUI interfaced graphics, give it a try. I did, and I loved it. Now if I could just find a way to get it to grow hair!

    About Ed Zebrowski
    Edward Zebrowski is a technical writer based in the Orlando, Florida, area. Ed runs his own Web development company, ZebraWeb

  • In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Enterprise Open Source Magazine Latest Stories . . .
    Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
    With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
    AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
    During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
    Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
    A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


    SYS-CON Featured Whitepapers
    ADS BY GOOGLE