SpaceTree
SpaceTree is a novel tree browser that builds on the conventional layout node link diagrams along a single preferred direction. It adds dynamic rescaling of branches of the tree to best fit the available screen space, optimized camera movement, and the use of preview icons summarizing the topology of the branches that cannot be expanded. In addition, it includes integrated search and filter functions.
Getting Started
SpaceTree requires that Java 1.4 is installed on your computer. Once you have
Java installed double-click on the /spacetree/spacetree.jar file. SpaceTree will
start and present you with an open file dialogue box. Open one of the samples
files in /spacetree/data/, such as orgchart.xml, to get started. SpaceTree can
open any valid XML file, to open a new file choose File->Open from the file
menu.
Once your file has been loaded try clicking on some of the nodes in the tree. When you click
on a node it becomes the focus node and it and its ancestors are colored blue.
SpaceTree will change the tree layout based on the focus node that you have set
and the amount of screen space that is available.
Searching
SpaceTree supports searching and pruning of the tree. As you type your search matching nodes in the tree will be highlighted. If a matching node is not
visible the thumbnail of its visible ancestor will be highlighted.
When you press the Go button SpaceTree will change the layout so that only
nodes that match the search and their ancestors are shown. Also all children of
the current focus node will be shown. Press the Reset button to change back to
the normal layout.
Preferences
SpaceTree comes with many preferences allowing you to configure the display
and browsing interaction. To view the preferences panel choose
File->Preferences. Note that you may save a particular set of preferences for
a given XML data file. To do this choose File->Save Preferences and the
current set of preferences will be saved for the current open XML file.
Preferences are stored as a separate XML file in spacetree-prefs.
Here is a short description of the available preferences:
- Root Orientation - Lets you specify the layout direction of the
tree.
- Label Justification - Lets you specify how sibling nodes are
aligned relative to each other.
- Sibling Separation - Lets you specify the spacing distance between
sibling nodes.
- Subtree Separation - Lets you specify the spacing distance between
subtrees in the tree layout.
- Level Separation - Lets you specify the separation between children
and parent nodes.
- Node Type - Lets you specify the type of node that should be used
in your layout. The Single Line type will display the text content of your
XML file's elements in a single line. The Multi-Line type will display the
text content in multiple lines if it finds any return characters. The Manual
Close type is similar to the Multi-Line type except it adds a different
layout behavior. Instead of having the tree automatically do space filling
layout from the focus node the Manual Close nodes works more like a standard
tree widget. Click on a node to open its children, click on the node again
to close its children. Finally the Node With Attachments type allows you to
attach windows files to a node. This is done by right-clicking on the node
and then typing in the names of the files to attach.
- Animation Duration - Lets you specify (in ms) the amount of time
that the focus change animation should take.
- Key Focus Change Delay - Lets you specify (in ms) the amount of
time that SpaceTree will wait before changing the focus when you are
navigating with the keyboard.
- Mouse Focus Change Delay - Lets you specify (in my) the amount of
that that SpaceTree will wait before changing the focus when you are
navigating with the mouse.
- Thumbnail Style - SpaceTree replaces the parts of the tree that
cannot be displayed because of space constraints with thumbnail icons. A
number of different icons are supplied. The Arrow displays a simple one size
arrow to indicate hidden parts of the tree. The Triangle displays a triangle
to indicate hidden parts of the tree. The size and color of the triangle
vary to encode the size (number of nodes represented) and depth (number of
tree levels represented) of the subtree represented by that triangle. The Triangle and Miniature Tree
shows a triangle icon, or if the hidden tree is small enough it will show an
icon representation of each node in that entire hidden tree. The Numeric
Label shows a single number showing the total number of nodes represented.
The Numeric Label and Miniature Tree combines the Numeric Label and
Miniature Tree icons.
- Numeric Scale - Some thumbnails (most notably the triangle
thumbnail) encode attributes of the subtree that they represent (such as
tree size and tree depth) into visual attributes such as size and color. To
do this they need to calculate there attributes against some base set, such
as the total size of the tree. The numeric scale lets you specify the scale upon
which this relationship is calculated.
- Relative to Root - Used to determine how the triangle icon
calculates its size. If relative to root is checked then the size will be
calculated relative to all nodes in the tree, else the size will be
calculated relative to its parents subtree.
- Code size by color - If checked the triangle icon will encode the
size of the subtree that it represents to determine the color that it is
drawn with.
- Width Height by Size - If checked the triangle will encode its
width and height by the size of the subtree that it represents.
- Draw Border - Used to determine is thumbnail nodes should draw a
black border.
- Thumbnail Maxwidth - The maximum width that a thumbnail should ever
be.
- Thumbnail Maxheight - The maximum height that a thumbnail should
ever be.
Command Line Options
SpaceTree may be run with a number of command line options.
- To launch SpaceTree from the command line use: java
-jar spacetree.jar
- To specify a file to open use: java -jar
spacetree.jar filename
- To specify a initial node to focus on use: java -jar
spacetree.jar filename nodename
- To specify an initial search use: java -jar
spacetree.jar filename nodename searchstring
- To specify IVContest format user: java -jar spacetree.jar filename
nodename searchstring ivcontestdisplayattribute
For example, with the orgchart.xml file in the same directory as
spacetree.jar you could type:
- java -jar spacetree.jar orgchart.xml focus ventures
Java Web Start
SpaceTree may be run as a stand alone application, or it can be run as a Java
Web Start application. To run it as a Java Web Start application you need to:
- Have Java Web Start installed on your client computer, download
it here
- Copy spacetree.jar, spacetree.jnlp, and the spacetree/lib folder to your web server.
- Modify the spacetree.jnlp file with your web server's information (codebase
will need to be changed for example)
- Now access http://www.yourdomain.com/spacetreedirectory/spacetree.jnlp
and that will launch the spacetree application.
OutOfMemoryException
When opening very large tree's SpaceTree may need more then the default 64mb
of memory that is available to Java. If you get an OutOfMemoryException while
loading a tree you need to.
- Quit SpaceTree.
- Create a run.bat file with the following line: java
-Xmx256m -jar spacetree.jar
- Then launch SpaceTree by double clicking on the run.bat file instead of on
the spacetree.jar file. This will give Java a maximum of 256 mb of memory to
use before it runs out.
IVContest Format
SpaceTree can import files that conform to the IVContest format (XML tree
format validated with the included tree.dtd). To import such a file:
- Launch SpaceTree from the command line or by using a .bat file so that the
dos console is available.
- Choose import IVContest Format from the File menu
- Choose an IVContest formatted xml file. Note that if that file refers to
the tree.dtd then the tree.dtd needs to be available. This may means
putting the tree.dtd file in the same directory as the file you are opening.
- Once you have chosen a file you will be prompted in the dos console for the attribute to
display. The IVContest format allows for multiple attributes, but SpaceTree
only displays one (in a tree nodes text area), so you need to tell it which
attribute to display.
- NOTE: If you launch spacetree so that no console is available (for
examples you just double click on the spacetree.jar file) then when
importing the IVContest format it will default to choosing the
"name" attribute from that file.