edu.swri.swiftvis
Class SWIFTVis
java.lang.Object
edu.swri.swiftvis.SWIFTVis
public class SWIFTVis
- extends java.lang.Object
This is the main class for the SWIFT visualization tool. The objective of
this tool is to give users a faster and more convenient way to look through the
large amounts of data that SWIFT can produce for a large simulation. It should
also help them sort through and cut down the data in ways that will help them
see trends.
It is not clear yet if we will try to make this program produce high quality
plots that could be submitted to journals. Instead it might just provide
facilities to output information to text files that people can plot up using
the tools that they are used to working with for producing final plots. In
that case the primary objective of this tool is to help them to isolate the
things of interest quickly and see things that they couldn't see without it.
The real question for this is design and what I want this to focus on. It could
focus on simulations/data sets or it could focus on plots. The former might be
more intuitive, but the latter would allow for better comparison between
different simulations which can be very helpful at times. The real design
goal is that they should be able to easily look at the data they get from a
simulation in a lot of different ways quickly. We also want this to be extensible
so that people can easily create new plots to look at data in new ways.
One possible design is to have it so that people can load in datasets or
even complete simulations and they will get a little icon that shows that
of maybe a tree. The main display is broken into two parts. One part is the
tree of simulations, datasets, and possibly filters. The other part is the plots
part. People should be able to choose to view one or more plots at a time and
they should be able to add various nodes from the tree into the plots. Different
plot types will require different data types to be added to them.
Specific data idea: This type of design would basically make the basic assumption
that we are only going to work with the types of datasets that are part of
SWIFT. This is probably a fairly good assumption and it will produce faster
code. However, it limits flexibility a bit. This type of plot would only accept
a dataset input from the known datasets.
Plot & Filter idea: This is a more flexible way of doing the plotting. To each
dataset we could apply a filter. The filter extracts a sequence of 2 or 3 vectors
from the dataset. A simple filter might just return the eccentricities as a function
of time or just x vs. y. These could also be restricted by certain restrictions
on what particles or certain times. One could also apply things like Fourier
analysis to the data series as other filters. In some ways, what I see this
being is something like the wrapping of streams in java.io.
The real question becomes how to associate the data sets with plots and how to
do it in a way such that multiple data sets can easily be put in a single plots
and also so that certain settings can easily be carried across from one plot to
another. That last point is a big problem with Excel, if you don't want their
normal defaults you have to work hard to reset them on everything.
A possible solution would be to not use a standard JTree. Instead, I would use
a graph that is drawn with a custom tool. Each dataset, filter, and plot would
be on the drawing and a node represented by a box with some type of label in
it telling you what it was. The edges would connect things. Some parts would
have rules like filters might have a limit on the number of edges that you could
put into them. The datasets would be on the left and the plots would be on the
right. The filters would go between them as needed.
The user needs to be able to select boxes or lines. When a box is selected,
the user should see a panel for it that shows the properties (both editable
and non-editable) for that dataset or filter. They can also be removed or
copied. The reason the edges need to be selectable is that if someone selects
an edge they should be able to add a new filter on it or paste a copied filter
onto it. When a plot is copied and pasted you get a new plot with the same
settings as the original, but now it doesn't have any data coming into it. The
user will need to draw lines that connect the end filters to the new plot.
I can give the user shortcuts for commonly used options so that they can select
a dataset and then say that they want to create a certain type of plot for it
and the proper filters will be automatically added in between.
The elements on the graph should all be selectable as groups by dragging a box
and they should be movable if people want to move then around.
The question of how to display the plots is a bit different. Currently I'm
leaning towards having a separate window that can pop up for each plot instead
of having them appear in a side panel. This gives the user more flexibility
without putting a large burden on me to create nice ways of viewing and
selecting different plots. Each different plot might also want to have its
onw menus or whatever and that is also easier of they are in a separate
window.
I should consider making it so that all of this is savable in some nice way.
Without that people won't like using the application because they won't be
able to go back to old things. It would also be nice if they could cut and
paste between "documents".
Constructor Summary |
SWIFTVis(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mainFrame
private javax.swing.JFrame mainFrame
graphPanel
private GraphPanel graphPanel
propPanel
private javax.swing.JPanel propPanel
SWIFTVis
public SWIFTVis(java.lang.String[] args)
main
public static void main(java.lang.String[] args)
selectionMade
public void selectionMade(GraphElement pe)
setupGUI
private void setupGUI()
exitProgram
private void exitProgram()
openFile
private void openFile()
saveFile
private void saveFile()
saveTemplate
private void saveTemplate()
addDataset
private void addDataset()
addFilter
private void addFilter()
addPlot
private void addPlot()
addPlotTemplate
private void addPlotTemplate()