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

Constructor Index

 o JViz()
Constructor.

Method Index

 o main(String[])
This is the main method for JViz.
 o menuAbout()
This function pops up an "About JViz" dialog box
 o 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.
 o menuChangeUI()
This method is called when the user has selected to change the Look and Feel of JViz.
 o menuClose()
This method will close an open data file by setting data, brush, jvi, and colorManager all equal to null.
 o menuColorSelector()
This method will display the colorManager
 o menuDeselectAll()
This method is called in a separate thread when the Deselect All Dimensions option is chosen from the Dimension menu.
 o menuExport()
 o menuGlyph()
This method is started as a separate thread and is responsible for adding a Glyph Graph to the JScrollPane.
 o menuGlyphBrushTool()
This method will invoke the glyph brush tool.
 o menuOpen()
This method can be called to work in a separate thread.
 o menuParallel()
This method is started as a separate thread and is responsible for adding a parallel Coordinates Graph to the JScrollPane.
 o menuPrint()
 o menuScatter()
This method is started as a separate thread and is responsible for adding a Scatter Plot Graph to the JScrollPane.
 o menuSelectAll()
This method is called in a separate thread when the Select All Dimensions option is chosen from the Dimensions menu.
 o menuTopics()
This method invokes the built-in help system.
 o run()
This method is called when a new thread is started.
 o 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.
 o updateMenu()
This method is called to update the menu choices.

Constructors

 o 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.

Methods

 o 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.

 o 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.
 o 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.

 o 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.

 o 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.

 o 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.

 o menuExport
 public void menuExport()
 o menuPrint
 public void menuPrint()
 o 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.

 o 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.

 o 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.
 o menuColorSelector
 public void menuColorSelector()
This method will display the colorManager

 o 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.

 o 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.

 o 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.

 o menuAbout
 public void menuAbout()
This function pops up an "About JViz" dialog box

 o 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.

 o 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.

 o 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