THE GREAT IDE ROUNDUP
Visaj
Teams Up with Swing
Imperial
Software Technology (IST) doesn't make IDEs; it makes IDEs better.
Consider IST's newest product, Visaj. With Visaj, you can use
point-and-click editing to design the user interface for any application
or applet written in the JavaTM programming language.
But Visaj is not an IDE.
As you work with Visaj, it generates all the Java source
code that is needed to implement the user-interface part of the
program you are creating. But Visaj doesn't compile your program,
and it doesn't provide an inline debugger or a code editor. So you
can't use Visaj to add application-specific functionality to the
user interface that it generates.
To do that, you must provide a separate source-code editor or text
editor, as well as a separate compiler.
How Visaj works
Visaj is designed
to speed up developer productivity by providing a point-and-click
environment for building 100% Pure JavaTM GUIs, reducing
the amount of time spent on hand-coding. Because Visaj is not coupled
with any particular IDE, it can be used IDE. IST claims that Visaj
can enhance the capabilities of any IDE because it offers visual
building capabilities that are not provided in most development
environments.
Visaj is available in both a boxed version and an electronic version
that can be downloaded from the IST
Web site. You can try out Visaj at no cost by downloading a
free trial trial version.
Visaj works particularly well with Sun's owon Java Workshop IDE.
When you install Visaj, you can also install a small program (downloadable
at no cost from IST) that interfaces Visaj with Java Workshop. Then
the Visaj icon appears on the Java Workshop toolbar -- and, because
Visaj has Swing compatibility built in, that adds full Swing compatibility
to Java Workshop.
You can also use Visaj with other kinds of IDEs, or with a plain-vanilla
text editor such as emacs or vi. You can even use Visaj with the
raw text-based JDK (Java Development Kit) that's downloadable at
no charge from Sun.
About Visaj
As
the following screen shot illustrates, Visaj is built around a visual
class editor that contains three panels: a component palette
(left), a design tree (center), and a class browser
(right).
The Visaj component palette
You can load the full Swing component
set into the class editor window's component palette by choosing
a Merge Palette File item from the class editor's Palette
menu.
When
you load the Swing component set into the component palette, Swing
components appear under three headings: JFC Basic, JFC
Menus, and JFC Containers (shown in the picture).
The class hierarchy pane
Once you have loaded the Swing component
set into Visaj's component palette, you can easily create a Swing
applet by choosing a menu item and then clicking a sequence of controls
in a dialog box. When you have created a JApplet object, Visaj automatically
creates a class hierarchy that is appropriate for a Swing applet
and displays that hierarchy in the class editor window's design-tree
panel, as shown in the center pane of the preceding screen shot.
Visaj's layout editors
To help you lay out the components
you have placed on a form, Visaj provides a full complement of graphically
based layout editors. There's even a box layout editor for Swing
components. Visaj automatically assigns a BoxLayout to Swing components
that use BoxLayout by default, such as JToolBar. You can use the
BoxLayout manager with other Swing components by choosing the BoxLayout
manager from the JFC Basic component palette.
Visaj understands how components and containers
are used together in Swing applications, and can automatically created
properly designed component-container hierarchies in Swing applets
and applications, as shown in the preceding illustration. (To learn
how components and containers must be laid out in Swing programs,
see the :article titled "Understanding Containers"
in this issue.)
Adding components
When you have started creating an
applet or an application, and Swing has displayed your program's
initial design tree in the class editor window, you can start adding
components to your application by placing them in their appropriate
locations in the class hierarchy tree that Visaj as created. As
you add components you are designing, Visaj automatically generates
whatever code will be needed to display and implement your application's
interface at runtime..
Visaj is also equipped with an event editor
for managing events and event listeners, and an image editor for
creating images and placing them in applets and applications. The
Visaj image editor provides a standard set of drawing tools for
drawing original images, as well as a mechanism for loading an existing
images and applying special filters to modify your images in accordance
with the particular needs of the program you are designing.
Generating code
When you have finished designing
a GUI for your application, Visaj generates whatever code is needed
to create the GUI you have designed at runtime. You can then use
the source-code editor of your choice to add whatever functionality
your application requires, and to modify the code generated by Visaj
in any way you like.
Visaj and Swing
IST released Visaj
2.0 -- a brand-new version of Visaj -- just a couple of days before
this issue of The Swing Connection went online. Considering the
limited amount of time Swing 1.0 has been available, a remarkable
amount of support for Swing is built into Visaj 2.0.
You have seen how Visaj can create design forms that subclass Swing
containers such as JApplet, JFrame, JDialog, and JWindow. Visaj
also lets you Swing menus and menu items to Swing programs, and
it even includes a Box layout editor that you can use to create
Box layouts for Swing programs.
Visaj also comes with a resource bundle
editor that supports internationalization. With the resource
bundle editor, you can enter words written in various languages
into a table. Visaj can then generate all the Java files that are
needed to international your program
How we tested Visaj
Although Visaj is
not a a full-fledged IDE, we used roughly the same strategy to try
out Visaj that we had used to examine the three integrated IDEs
that are also examined in this report. We created a GUI using the
Visaj class editor, and added a toggle button and an event listener
using the Visaj event editor. Finally, we added our Swinging Duke
images using using handwritten code to load and display a Swing
ImageIcon.
Because Visaj doesn't come with a source editor or a compiler,
we had to make the final tweaks in our source code using a text
editor supplied by a another manufacturer. (In this case, we chose
the KAWA editor and compiler from Tek-Tools, which will be featured
in next month's issue of The Swing Connection.) We also had to use
another product to compile our program. (We used KAWA for this purpose
also.) The result was an applet that looked and behaved exactly
like the the original handwritten Swinging Duke applet that we had
used as a model (see picture, below.)
Our conclusion: Visaj is a sophisticated product that can
significantly simplify and speed up the development of graphical
user interfaces for applets and applications. But it is designed
for professional programmers who are willing to write their own
source code when that's necessary, and don't mind switching from
one development tool to another when that's what the situation requires.
It saved us time and effort when we used it to create a little applet
-- namely, a clone of our Swinging Duke applet -- and it could probably
save much more time and effort if we decided to use it to develop
a large, complicated project.
Visaj is not your average software-development product. But if
you need a development tool with the special kinds of capabilities
it offers, Visaj may be just the GUI design package that you've
been looking for.
|