UTJML

edu.utep.cs.utjml.gui
Class ExplorerPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTabbedPane
                  extended by edu.utep.cs.utjml.gui.ExplorerPane
All Implemented Interfaces:
Explorable, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class ExplorerPane
extends JTabbedPane
implements Explorable

A tabbed pane that displays serveral tree panes such as directory browser, open files, and test data.

Author:
Yoonsik Cheon
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
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 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.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ExplorerPane(Main utjml, edu.utep.cs.utjml.gui.MenuFactory mf)
          Creates a new explore pane for the given main class by using the given menu factory.
 
Method Summary
 void addHistory(File file)
          Adds the given file to the history of open files.
 String getFileName()
          Returns the name of the currently selected file.
 edu.utep.cs.utjml.gui.TestCaseTree openTestGenPane()
          Opens the test generation pane.
 void refreshSelected()
          Refresh the currently selected node.
 void refreshSelectedParent()
          Refresh the parent of currently selected node.
 void setRoot(File file)
          Sets the root of the directory browser.
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

ExplorerPane

public ExplorerPane(Main utjml,
                    edu.utep.cs.utjml.gui.MenuFactory mf)
Creates a new explore pane for the given main class by using the given menu factory.

Method Detail

addHistory

public void addHistory(File file)
Adds the given file to the history of open files. The given file becomes selected. If argument is null, the current selection is cleared.

Specified by:
addHistory in interface Explorable

refreshSelected

public void refreshSelected()
Description copied from interface: Explorable
Refresh the currently selected node.

Specified by:
refreshSelected in interface Explorable

refreshSelectedParent

public void refreshSelectedParent()
Description copied from interface: Explorable
Refresh the parent of currently selected node.

Specified by:
refreshSelectedParent in interface Explorable

getFileName

public String getFileName()
Description copied from interface: Explorable
Returns the name of the currently selected file.

Specified by:
getFileName in interface Explorable

setRoot

public void setRoot(File file)
Description copied from interface: Explorable
Sets the root of the directory browser.

Specified by:
setRoot in interface Explorable

openTestGenPane

public edu.utep.cs.utjml.gui.TestCaseTree openTestGenPane()
Opens the test generation pane. If no test pane is created yet for this explorer pane, create one and add it.

Specified by:
openTestGenPane in interface Explorable

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.