edu.upenn.crimson.gui
Class Root

java.lang.Object
  extended by edu.upenn.crimson.gui.Root

public class Root
extends java.lang.Object

Base window for GUI.

Version:
$Id: Root.java,v 1.46 2007/10/09 20:14:16 fisher Exp $

Nested Class Summary
private static class Root.RootFrame
           
 
Field Summary
static javax.swing.JTextArea history
          This will contain all commands that the GUI generates and sends to the console to be run.
static javax.swing.JTextArea messages
          This will contain all error and warning messages.
static javax.swing.JProgressBar progressBar
          This will be used to display the progress during importing and exporting of trees.
private static Root.RootFrame rootFrame
           
static boolean showMessages
          Flag whether to display messages in the 'messages' panel.
static javax.swing.JLabel statusBar
           
 
Constructor Summary
Root()
           
 
Method Summary
static boolean isVisible()
           
static void runCommand(java.lang.String msg)
          This will add the String to the history and then run the command through the console.
static void runCommand(java.lang.String msg, boolean toConsole)
          This will add the String to the history and if 'toConsole', then run the command through the console.
static javax.swing.JFrame show()
           
static void startProgressBar(java.lang.String msg)
          This will turn on the progress bar.
static void stopProgressBar()
          This will turn off the progress bar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootFrame

private static Root.RootFrame rootFrame

messages

public static javax.swing.JTextArea messages
This will contain all error and warning messages. This output panel can be disabled by setting the 'showMessages' flag to false. When disabled, all messages printed will be displayed in the console.


progressBar

public static javax.swing.JProgressBar progressBar
This will be used to display the progress during importing and exporting of trees.


showMessages

public static boolean showMessages
Flag whether to display messages in the 'messages' panel. If false, then print the messages in the console. If true, then messages will only go to the messages panel and not the console.


history

public static javax.swing.JTextArea history
This will contain all commands that the GUI generates and sends to the console to be run. The text in this panel can be copied and pasted into a python file to run directly in the console.


statusBar

public static javax.swing.JLabel statusBar
Constructor Detail

Root

public Root()
Method Detail

show

public static javax.swing.JFrame show()

runCommand

public static void runCommand(java.lang.String msg)
This will add the String to the history and then run the command through the console.


runCommand

public static void runCommand(java.lang.String msg,
                              boolean toConsole)
This will add the String to the history and if 'toConsole', then run the command through the console.


startProgressBar

public static void startProgressBar(java.lang.String msg)
This will turn on the progress bar.

Notes:
For some reason this doesn't work. I think 'exec()' is blocking the gui.

stopProgressBar

public static void stopProgressBar()
This will turn off the progress bar.


isVisible

public static boolean isVisible()



Copyright 2006 Stephen Fisher, Susan Davidson, and Junhyong Kim, University of Pennsylvania.