![]() |
![]() ![]() |
Welcome!
|
This is the home page for JavaFIG, a graphics/diagram editor
written in Java and based upon xfig, the de-facto standard
graphics editor for the X11 window system.
It tries to mimic as much of the functionality and user interface
of xfig as possible with Java release 1.1.
|
New
|
JavaFIG now supports the xfig 'Symbol' font by emulation with the
corresponding Unicode characters from the Java AWT fonts.
All greek and most Math symbols are available.
Also, the FIG 3.2 'special' text flag for mixed LaTeX/Postscript export is now supported. If you experience deadlocks when running JavaFIG with JDK 1.2 on Windows-95/98: Please install the latest version (JDK 1.2.2 or higher) from Javasoft, which fixes an important Java security bug and also several JIT-compiler bugs. On some systems, JavaFIG seems to deadlock even with JDK 1.2.2 installed. In this case use JDK 1.1.7/1.1.8 or the Microsoft VM instead. Also, check out the presentation viewer for your standalone (application) or WWW-enabled (applet) presentations - integrate your FIG files easily into presentations with full navigation: See the examples below. |
Overview
|
JavaFIG is intended for the creation and editing of technical diagrams
and drawings in a Java environment and on all Java platforms.
Key points of the JavaFIG and xfig editing functions and user
interface are the support of hierarchical objects (called compounds)
to arbitrary depth, several styles of arrows, easy attribute updates,
and smart object copy and move functions.
Please read the tutorial if you are not familiar with the concepts of xfig or JavaFIG. While JavaFIG provides a presentation viewer, it is no substitute for typical "presentation graphics" programs like Microsoft Powerpoint, and it provides much less features and effects than a state-of-the-art drawing program like Corel Draw. Also, its user interface differs somewhat from these drawing programs. JavaFIG promises to be as portable as possible to xfig. Unfortunately, there is a trade-off between what I want to do and what I could do with the current Java release, that is, Java 1.1. Therefore, some features of xfig version 3.1.4 and 3.2 are not supported by JavaFIG. A list of missing or differing functions and bugs can be found here. Running JavaFIG with acceptable performance will require a Pentium-166 system (or equivalent) with at least 32 MBytes of RAM, but a Pentium-II with 64 MByte is certainly better. |
xfig
|
For more information about xfig contact Brian Smith, Lawrence Berkeley Laboratory, bvsmith@lbl.gov. |
At the moment, JavaFIG consists of four Java packages with
about 150 Java classes. The first package, javafig.objects,
contains the graphical objects defined by the FIG format,
e.g. rectangles, polylines, bezier splines, and text,
and also some utility classes like the FIG file parser and writer.
The second package, javafig.canvas, provides classes
that interface to the Java abstract window toolkit (AWT), in order
to display the graphical objects, including rubberbanding and
efficient redraw buffering.
The third package, javafig.gui, has all the user interface
components needed by the JavaFIG editor, viewer, and presentation
viewer. Currently, the user interface is based on the Java AWT,
with a Swing (JFC) version planned.
A fourth package, javafig.commands, contains the
command objects that implement the individual drawing operations
in the editor. JavaFIG can be extended by just adding new
command operations.
At the moment, we provide three main applications built from the above class libraries. Also, there is an additional applet version of each of this programs:
|
Editor
|
The JavaFIG editor is currently the main application built
from the four JavaFIG class libraries (Java packages).
It supports drawings from all FIG object types and most object
attributes, and it reads and writes FIG 2.1, 3.1, and 3.2 format.
Internally, the JavaFIG editor is constructed quite modular, and can be extended easily. See the file "javafig/gui/UserEditor.java" in the javafig class or source archive files for an example which extends the ModularEditor with additional user-defined functions.
Many properties of the editor can be specified via configuration files.
On startup, the editor will first load a global configuration from
the file
To start the editor as an application, use the following command:
|
Viewer
|
The JavaFIG viewer is a simple program to load and display
single FIG files. It supports zooming, panning, and maintains
a history list of files, but has no editor functions.
Its main purpose is to be used as a small applet to view FIG files. For presentations built from multiple FIG files, use the presentation viewer instead (see below).
To start the viewer as an application, use the following command:
|
Presentation viewer
|
The JavaFIG presentation viewer and applet allow to build simple
Powerpoint-like presentations (slide-shows) from individual
FIG files.
Currently, it uses a simple text-format file which specifies the
names and ordering of the external FIG files. The viewer loads
this file and accesses the FIG files as needed.
The default extension for the index file is .jpt
for "Javafig Presentation".
To keep the viewer applet as small as possible for use in WWW-based presentation (minimize applet startup time), the viewer has a very simple user interface and supports navigation (first slide, next slide, next chapter) and the standard panning/zooming operations only. It has no editor functions, however.
To start the viewer as an application, use the following command:
For a demonstration of the PresentationViewerApplet click here (some slides about our Java based simulation framework, HADES). The applet understands the following parameters:
|
JavaFIG applets
|
While JavaFIG is best used as a standalone Java application,
the editor and viewer can be started as an applet
within a Java 1.1 compatible WWW-browser or Suns appletviewer.
Depending on your browser's security settings, however, the JavaFIG applet may not be able to access files on your local system. In this case, it can access input files via the HTTP-protocol from the applet WWW-server only. Note that both the Netscape Navigator (including versions 4.08 and 4.5) and the Microsoft Internet Explorer (4.1) still are not fully Java 1.1 compatible. In general, it should be possible to start JavaFIG as an applet, but you may experience several annoying problems. For example, Netscape does not allow to access Java 1.1 resource files, and therefore won't load the JavaFIG icon and button icons... Also, note that you cannot run the JavaFIG 1.x on older browsers like Netscape 3.x and Internet Explorer 3.x. |
Security and problems
|
Note the two following frequent problems when running the JavaFIG
viewer or presentation viewer as an applet inside a browser.
Both Netscape and Internet Explorer react to your CLASSPATH settings when searching for Java classes. Therefore, if you include JavaFIG in your CLASSPATH, the browser will find the viewer classes on your local disk. Due to Java applet security restrictions, it will not be able to load some resources (like icons, images, and presentations) from the network afterwards. Workaround: Don't put JavaFIG in your CLASSPATH when running JavaFIG as an applet. In Internet Explorer, you may also try the "low" security settings.
|
Download area
|
The JavaFIG download area: class archives, documentation, examples,
fig2dev sources and binaries.
Note: most of the following files are archives in compressed ZIP-format (extension ".zip"). Please make sure to download these files in binary mode, e.g. in Netscape use right-click, select "save link as". To unpack the archives below, use the Java archive tool (JAR) or a current version of pkzip or WinZip. If you experience problems after unpacking, check the directory and file permissions on Unix/Linux systems, then unpack again. On Windows, don't use WinZip 6.2 or older.
|
fig2dev
|
While JavaFIG supports printing via the Java 1.1 native printing
mechanism, you may want to download the transfig package
with the fig2dev utility.
This allows to export your JavaFIG drawings
to several ouput formats, including Postscript, IBM/HP GL, and LaTeX.
To get the latest version of fig2dev, check any Linux ftp server near you. The following links contain an older version of the source archive, a precompiled version for Windows (32 bit) and some hints. The standard makefiles included with transfig require imake and will work fine under Unix (Solaris, Linux, AIX, ...). On the other hand, building transfig on other platforms is not as easy. You will need a C-Compiler and a custom makefile to build transfig and fig2dev. I have compiled the fig2dev program for Windows'95, using the EMX/RSX DOS-extender. With the appropriate version of EMX/RSX, fig2dev should compile and run under Windows 95/98/NT, and OS/2.
|
JavaFIG 0.99
(old version) |
The following links contain the older, Java 1.0 compatible, version 0.99 of JavaFIG. Despite many editor bugs, the software may be useful to display FIG 3.1 files on older (Java 1.0) browsers: |
Documentation
|
JavaFIG online-documentation on this server:
|
WWW-based
presentations |
Check the following links for a demonstration
of the JavaFIG presentation viewer applet.
The applets require a Java 1.1 browser, but will also run
in Netscape 4.08, 4.5 (or higher) and Internet Explorer 4.x:
|
08.12.99
Impressum
|
http://tech-www.informatik.uni-hamburg.de/applets/javafig/ |