FlowVis Source Code Documentation

The program is designed to consist of a master part written in python and a slave part written in java. This is because of following reasons:

* it is easy to import, execute and subclass java classes in jython.

* it is absolutely necessary to write the eventhandling and behavior in a straight forward and interactive language. no need to compile. no need to find a hundred little syntax errors. no need to declare all the dozends of variables that are needed for behavior modelling. in java the gui would make at least the double of source lines.

* on the other hand it is necessary to write the time critical algorithms in a low level compiled language.

Some files or classes have been omitted, for they are only small helper classes or not originally written by the authors and of no important functionality.


Arrowplot.java: class Arrowplot (the arrow plot algorithms)


Background.java: class Background (the background color coding routine)


Builder.py: class Builder
(a general purpose Java Swing GUI creator class. input is a dictionary structure that describes the placement and properties of the components on a container. creates a xylayouted container, places the components and assigns values and action listeners automatically. the input structures for the flowvis gui are located in GUI.py)


ColorPanel.py:
class ColorPanel (a mouse sensitive panel that displays a color. on click the color can be changed)
class CPMouseSpy (the colorpanels own mouselistener class. launches a colorchooser dialog)


Event.py:

(this file contains all of the guis event handling routines. the applications behavior is recorded here.)

class LoadSpy (updates the progressbar while the FlowData thread is loading)
class ResamplerSpy (updates the progressbar while the Resampler thread is working)
class ImageClickSpy (draws a single streamline at the mouseposition)
class ImageMouseSpy (updates the inspector controls on mouse over the image)
class GeneralChangeSpy
(this changelistener is registered with all sliders. a component that is able to fire change events can register this listener. in order to assign behavior to such components, they must also be registered here with a unique name)
class windowSpy (listens for exit commands)
class menuSpy (maintains the menu action commands)
class PropsDlgSpy (the behavior of the data properties dialog)
class ColorDlgSpy (the behavior of the color dialog. the changes of colors are maintained in the GeneralChangeSpy)
class InspectorSpy (the behavior of the inspector tab)
class NavigatorSpy (the behavior of the navigator tab)
class ArrSetDlgSpy (the behavior of the arrow plot settings dialog)
class StrmLnSetDlgSpy: (the behavior of the streamlines settings dlg)
class ScrollSpy (used to update the navigator on scrolling)
class AutoResizer (used to resize the scrollpane and the tabbed pane accordingly if the mainframe is resized)

FlowData.java: class FlowData (loads the grid and datafile and provides methods for data access)

FlowVis.py (the main script. the mainframe is constructed here)

Global.java: class Global (a global static namespace for our application global variables and references. this type of design frees us from passing references an responsibilities down the object hierarchy and keeps the number of method parameters small)

GUI.py (the whole Java Swing gui of the application including the menu is described in here in form of python dictionarys and lists !! in a Java-independent way !!. the classes Builder and Menu are responsible for interpreting these and constructing the java)

ImagePanel.java: class ImagePanel (the panel that displays the image for rendering)

Menu.py: class Menu (a general purpose menu creation class. same as Builder just for menu structures.)

ProgressSpy.java: class ProgressSpy (a progress listener with no functionality (assigned to flowdata and resampler) for the purpose of being overwritten by a python progress spy. this dirty hack lets us call python methods from java classes which is not possible directly )

Resampler.java: class Resampler (implements the conversion from rectilinear grid to cartesian grid and provides methods to access the data.)

Streamline.java: class Streamline (the streamline algorthms)