All Packages Class Hierarchy This Package Previous Next Index
Class edu.wpi.mqp.graphics.jviz.JViz
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----com.sun.java.swing.JFrame
|
+----edu.wpi.mqp.graphics.jviz.JViz
- public class JViz
- extends JFrame
- implements Runnable
-
JViz()
-
Constructor.
-
main(String[])
-
This is the main method for JViz.
-
menuAbout()
-
This function pops up an "About JViz" dialog box
-
menuActivateDimensions(int)
-
This method is called from within a thread and will deactive
the specified dimension if it is active or activate it if it's
deactivated.
-
menuChangeUI()
-
This method is called when the user has selected to change the Look and
Feel of JViz.
-
menuClose()
-
This method will close an open data file by setting data, brush, jvi, and
colorManager all equal to null.
-
menuColorSelector()
-
This method will display the colorManager
-
menuDeselectAll()
-
This method is called in a separate thread when the Deselect All
Dimensions option is chosen from the Dimension menu.
-
menuExport()
-
-
menuGlyph()
-
This method is started as a separate thread and is responsible for adding
a Glyph Graph to the JScrollPane.
-
menuGlyphBrushTool()
-
This method will invoke the glyph brush tool.
-
menuOpen()
-
This method can be called to work in a separate thread.
-
menuParallel()
-
This method is started as a separate thread and is responsible for adding
a parallel Coordinates Graph to the JScrollPane.
-
menuPrint()
-
-
menuScatter()
-
This method is started as a separate thread and is responsible for adding
a Scatter Plot Graph to the JScrollPane.
-
menuSelectAll()
-
This method is called in a separate thread when the Select All Dimensions
option is chosen from the Dimensions menu.
-
menuTopics()
-
This method invokes the built-in help system.
-
run()
-
This method is called when a new thread is started.
-
startAction(String)
-
This method is used to start a method in a separate thread in an attempt
to separate the GUI thread from heavy processing.
-
updateMenu()
-
This method is called to update the menu choices.
JViz
public JViz()
- Constructor. This is where the menus, popup menues, and the components
which are to be on the screen are created and initialized.
main
public static void main(String args[])
- This is the main method for JViz. It first checks to see what version
of the JRE is being used. We are using the Swing package and it
requires version 1.1.2 or higher to work, so we must require this
in order to run as well.
startAction
public void startAction(String action)
- This method is used to start a method in a separate thread in an attempt
to separate the GUI thread from heavy processing. This is to increase
the responsiveness of the GUI. Unfortunately, this does not make a
difference on Solaris, but it makes things work correctly in Windows. We
do not know the cause of this difference. Hopefully, future versions will
be able to overcome this obstacle. The method we use to start a method in
a separate thread does not guarantee that GUI actions will not be lost if
they happen very closely together, but this is unlikely to happen and will
never cause deadlock if it does. A better method would be to implement
a thread-safe queue to handle GUI requests.
- Parameters:
- action - This is a text string informing the thread method which
method to call and optionally which arguments to call it
with.
run
public void run()
- This method is called when a new thread is started. It checks the
GUIAction string to determine which function to call. As mentioned
in the startAction() method, this procedure is not a thead-safe method
and there is the potential that a GUI action could be dropped.
menuChangeUI
public void menuChangeUI()
- This method is called when the user has selected to change the Look and
Feel of JViz. This method can not be called in a separate thread becase
it does not make sense to do so since we are changing the entire look
of the applcation.
menuOpen
public void menuOpen()
- This method can be called to work in a separate thread. Its purpose is to
prompt the user for a new data file to load and then load that file into
memory. If the file was read in correctly, the data will be displayed
in a Parallel Coordinates Graph. This method uses the only AWT component
that JViz contains. It uses a FileDialog instead of a JFileChooser. The
interface to the FileDialog we felt was cleaner and the component worked
more smoothly that the JFileChooser. Maybe it would be wise to implement
the JFileChooser in the next version so there would be a consistent
GUI for the components between platforms.
menuClose
public void menuClose()
- This method will close an open data file by setting data, brush, jvi, and
colorManager all equal to null. Then it removes the graph from the
scrollPane and repaints the screen.
menuExport
public void menuExport()
menuPrint
public void menuPrint()
menuSelectAll
public void menuSelectAll()
- This method is called in a separate thread when the Select All Dimensions
option is chosen from the Dimensions menu. This will force all of the
dimensions to be marked active. Then the graph is redrawn.
menuDeselectAll
public void menuDeselectAll()
- This method is called in a separate thread when the Deselect All
Dimensions option is chosen from the Dimension menu. This will
all of the dimensions to be marked as inactive. Then the graph
is redrawn.
menuActivateDimensions
public void menuActivateDimensions(int dimension)
- This method is called from within a thread and will deactive
the specified dimension if it is active or activate it if it's
deactivated. Then it resets the zoom factor to 1, and updates the menu
- Parameters:
- dimension - index of the dimension to activate or deactivate.
menuColorSelector
public void menuColorSelector()
- This method will display the colorManager
menuParallel
public void menuParallel()
- This method is started as a separate thread and is responsible for adding
a parallel Coordinates Graph to the JScrollPane. It sets the status
bar, instatiates a new ParallelCoordinatesGraph, sets the jvi object,
updates the menu and draws the graph.
menuScatter
public void menuScatter()
- This method is started as a separate thread and is responsible for adding
a Scatter Plot Graph to the JScrollPane. It sets the status bar,
instatiates a new ScatterPlotGraph, sets the jvi object updates the menu
and draws the graph.
menuGlyph
public void menuGlyph()
- This method is started as a separate thread and is responsible for adding
a Glyph Graph to the JScrollPane. It sets the status bar, instatiates a
new ScatterPlotGraph, sets the jvi object updates the menu and draws the
glyphs.
menuAbout
public void menuAbout()
- This function pops up an "About JViz" dialog box
menuTopics
public void menuTopics()
- This method invokes the built-in help system. The help system is
rather primitive and should be reworked in later versions of JViz.
menuGlyphBrushTool
public void menuGlyphBrushTool()
- This method will invoke the glyph brush tool. It currently can be
invoked even when the Glyph Graph is not the current graph. This could
be changed in future versions, but we did not see any harm in using it
with outher graphing techniques. The user may be able to draw some
interesting conclusions with this feature.
updateMenu
public JMenuBar updateMenu()
- This method is called to update the menu choices. When data is null, then
users should not be able to select certain menu options, so the effected
menu options are either hidden or deactivated. The menuItems in this
method are declared consistently, but the form is cumbersome. It could
use some cleaning up.
All Packages Class Hierarchy This Package Previous Next Index