UTJML

edu.utep.cs.utjml.gui
Class Main

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by edu.utep.cs.utjml.gui.Main
All Implemented Interfaces:
Mainable, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class Main
extends JFrame
implements Mainable

A graphics user interface to the JML-based unit testing tool for Java. The GUI consists of three main panes, the explorer pane, the editor pane, and the output pane. The explorer pane allows one to browse directories and files, the editor pane allows one to edit Java/JML source programs, and the output pane displays messages from the GUI. The status bar at the bottom of the GUI shows various status information.

Author:
Yoonsik Cheon
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String BLANK_ICON
          Blank space to align menu items.
static String CLASS_EXTENSION
          The extension of Java class files.
static String CLASSPATH
          The class path of this program.
static Color COLOR_EXPLORER
           
static Color COLOR_OUTPUT
           
static String COPYRIGHT
          The copyright notice.
static boolean DEBUG
           
static String EDIT_MENU_NAME
          The name of edit menu.
static char EXPLORER_DIR
          The indentification character of the directory browser.
static String EXPLORER_ROOT
          The default root directory of the directory browser.
static String FILE_MENU_NAME
          The name of file menu.
static String HELP_MENU_NAME
          The name of help menu.
static ImageIcon ICON_ABOUT
          The image icon for the tool information.
static ImageIcon ICON_BROWSER
           
static ImageIcon ICON_DELETE
          The image icon for deleting a file or a selected text.
static ImageIcon ICON_ERROR
          The image icon for an error situation.
static ImageIcon ICON_FILE
           
static ImageIcon ICON_FOLDER
           
static ImageIcon ICON_GEN_APP
          The image icon for compilation.
static ImageIcon ICON_HOME
          The image icon for JML.
static ImageIcon ICON_INFORM
          The image icon for information messages.
static ImageIcon ICON_JAVA_FILE
           
static ImageIcon ICON_JML_LOGO
          The image icon for JML.
static ImageIcon ICON_NEW
          The image icon for creating a new file.
static ImageIcon ICON_NEWTESTSUITE
           
static ImageIcon ICON_NOTE
          The image icon for notes.
static ImageIcon ICON_OPEN
          The image icon for opening a file.
static ImageIcon ICON_PREFERENCES
          The image icon for preferences.
static ImageIcon ICON_QUESTION
          The image icon for questions.
static ImageIcon ICON_REDO
          The image icon for redoing an edit action.
static ImageIcon ICON_TEST_FILE
          The image icon for JML.
static ImageIcon ICON_UNDO
          The image icon for undoing an edit action.
static ImageIcon ICON_UNKOWN
          The image icon for unknown.
static ImageIcon ICON_WARN
          The image icon for warning messages.
static String JAVA
           
static String JAVA_EXTENSION
          The extension of Java source files.
static String JAVAC
           
static String JUNIT_SWINGGUI_TESTRUNNER
           
static String NEWLINE
          The system-dependent newline character.
static String OPTION_MENU_NAME
          The name of option menu.
static String TEST_MENU_NAME
          The name of test menu.
static String TOOL_MENU_NAME
          The name of tool menu.
static String VERSION
          The version number.
static String WEB_PAGE_LOCATION
          The URL address of the web page.
static String WEB_PAGE_NAME
          The name of web page.
static int WINDOW_HEIGHT
          The initial height of the window.
static int WINDOW_MIN_HEIGHT
          The minimum height of the window.
static int WINDOW_MIN_WIDTH
          The minimum width of the window.
static int WINDOW_WIDTH
          The initial width of the window.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Main(String name)
          Creates a new instance.
 
Method Summary
 Editorable editor()
          Returns the editor of this GUI.
 Explorable explorer()
          Returns the explorer of this GUI.
 JFrame frame()
          Returns the frame of this GUI.
static void main(String[] args)
          The main entry point of this GUI.
 OutputPaneable outputPane()
          Returns the output pane of this GUI.
 StatusBarable statusBar()
          Returns the status bar of this GUI.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

CLASSPATH

public static final String CLASSPATH
The class path of this program. If this program is started as an executable jar, then append the current working directory to the front.


VERSION

public static final String VERSION
The version number.

See Also:
Constant Field Values

COPYRIGHT

public static final String COPYRIGHT
The copyright notice.

See Also:
Constant Field Values

JAVA_EXTENSION

public static final String JAVA_EXTENSION
The extension of Java source files.

See Also:
Constant Field Values

CLASS_EXTENSION

public static final String CLASS_EXTENSION
The extension of Java class files.

See Also:
Constant Field Values

EXPLORER_DIR

public static final char EXPLORER_DIR
The indentification character of the directory browser.

See Also:
Constant Field Values

EXPLORER_ROOT

public static final String EXPLORER_ROOT
The default root directory of the directory browser.


NEWLINE

public static final String NEWLINE
The system-dependent newline character.


DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

WINDOW_WIDTH

public static final int WINDOW_WIDTH
The initial width of the window.

See Also:
Constant Field Values

WINDOW_HEIGHT

public static final int WINDOW_HEIGHT
The initial height of the window.

See Also:
Constant Field Values

WINDOW_MIN_WIDTH

public static final int WINDOW_MIN_WIDTH
The minimum width of the window.

See Also:
Constant Field Values

WINDOW_MIN_HEIGHT

public static final int WINDOW_MIN_HEIGHT
The minimum height of the window.

See Also:
Constant Field Values

HELP_MENU_NAME

public static final String HELP_MENU_NAME
The name of help menu.

See Also:
Constant Field Values

FILE_MENU_NAME

public static final String FILE_MENU_NAME
The name of file menu.

See Also:
Constant Field Values

EDIT_MENU_NAME

public static final String EDIT_MENU_NAME
The name of edit menu.

See Also:
Constant Field Values

TEST_MENU_NAME

public static final String TEST_MENU_NAME
The name of test menu.

See Also:
Constant Field Values

TOOL_MENU_NAME

public static final String TOOL_MENU_NAME
The name of tool menu.

See Also:
Constant Field Values

OPTION_MENU_NAME

public static final String OPTION_MENU_NAME
The name of option menu.

See Also:
Constant Field Values

WEB_PAGE_NAME

public static final String WEB_PAGE_NAME
The name of web page.

See Also:
Constant Field Values

WEB_PAGE_LOCATION

public static final String WEB_PAGE_LOCATION
The URL address of the web page.

See Also:
Constant Field Values

BLANK_ICON

public static final String BLANK_ICON
Blank space to align menu items.

See Also:
Constant Field Values

ICON_UNKOWN

public static final ImageIcon ICON_UNKOWN
The image icon for unknown.


ICON_NOTE

public static final ImageIcon ICON_NOTE
The image icon for notes.


ICON_ABOUT

public static final ImageIcon ICON_ABOUT
The image icon for the tool information.


ICON_GEN_APP

public static final ImageIcon ICON_GEN_APP
The image icon for compilation.


ICON_NEW

public static final ImageIcon ICON_NEW
The image icon for creating a new file.


ICON_REDO

public static final ImageIcon ICON_REDO
The image icon for redoing an edit action.


ICON_UNDO

public static final ImageIcon ICON_UNDO
The image icon for undoing an edit action.


ICON_ERROR

public static final ImageIcon ICON_ERROR
The image icon for an error situation.


ICON_INFORM

public static final ImageIcon ICON_INFORM
The image icon for information messages.


ICON_PREFERENCES

public static final ImageIcon ICON_PREFERENCES
The image icon for preferences.


ICON_QUESTION

public static final ImageIcon ICON_QUESTION
The image icon for questions.


ICON_WARN

public static final ImageIcon ICON_WARN
The image icon for warning messages.


ICON_OPEN

public static final ImageIcon ICON_OPEN
The image icon for opening a file.


ICON_DELETE

public static final ImageIcon ICON_DELETE
The image icon for deleting a file or a selected text.


ICON_JML_LOGO

public static final ImageIcon ICON_JML_LOGO
The image icon for JML.


ICON_TEST_FILE

public static final ImageIcon ICON_TEST_FILE
The image icon for JML.


ICON_HOME

public static final ImageIcon ICON_HOME
The image icon for JML.


ICON_BROWSER

public static final ImageIcon ICON_BROWSER

ICON_NEWTESTSUITE

public static final ImageIcon ICON_NEWTESTSUITE

ICON_FOLDER

public static final ImageIcon ICON_FOLDER

ICON_FILE

public static final ImageIcon ICON_FILE

ICON_JAVA_FILE

public static final ImageIcon ICON_JAVA_FILE

JAVA

public static final String JAVA
See Also:
Constant Field Values

JAVAC

public static final String JAVAC
See Also:
Constant Field Values

JUNIT_SWINGGUI_TESTRUNNER

public static final String JUNIT_SWINGGUI_TESTRUNNER
See Also:
Constant Field Values

COLOR_EXPLORER

public static final Color COLOR_EXPLORER

COLOR_OUTPUT

public static final Color COLOR_OUTPUT
Constructor Detail

Main

public Main(String name)
Creates a new instance.

Method Detail

frame

public JFrame frame()
Returns the frame of this GUI.

Specified by:
frame in interface Mainable

statusBar

public StatusBarable statusBar()
Returns the status bar of this GUI.

Specified by:
statusBar in interface Mainable

outputPane

public OutputPaneable outputPane()
Returns the output pane of this GUI.

Specified by:
outputPane in interface Mainable

editor

public Editorable editor()
Returns the editor of this GUI.

Specified by:
editor in interface Mainable

explorer

public Explorable explorer()
Returns the explorer of this GUI.

Specified by:
explorer in interface Mainable

main

public static void main(String[] args)
The main entry point of this GUI.


UTJML

UTJML is Copyright (C) 2004-2006 by University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the JML project.