org.peace_tools.core.job
Class AnalyzerWizardPage

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.peace_tools.generic.GenericWizardPage
                      extended by org.peace_tools.core.job.AnalyzerWizardPage
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, WizardPage

public class AnalyzerWizardPage
extends GenericWizardPage
implements java.awt.event.ActionListener

This class serves as an interactive page in a JobWizard. This page permits the user to provide the information about the frame/word analyzer to be used to computing distance/similarity metric between two given ESTs. The distance/similarity metric is used to decide if two ESTs must be clustered together. When the "Next >" button is clicked this wizard populates the user supplied information in FWAnalyzer data structure.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JComboBox analyzerList
          A combo-box to select the type of frame/word algorithm to be used for computing similarity metric.
private static java.lang.String[] ANALYZERS
          The list of analyzers that the user can choose from to compare two ESTs to determine similarity or distance.
private  javax.swing.JComboBox cacheList
          A combo-box to select the type of caching that must be used to cache intermediate values to improve performance of the analyzer.
private  javax.swing.JSpinner cacheSize
          The size of the cache (number of entries maintained in the cache) to be used for analysis.
private  javax.swing.JSpinner frameSize
          Formatted field to read the frame size to be used for analysis.
private  javax.swing.JLabel frameSizeAuto
          A simple JLabel that is used instead of the frameSize spinner whenever the user selected TwoPassD2 to indicate that the frame size is automatically determined.
private static java.lang.String INFO_MSG
          A generic informational message that is displayed at the top of this wizard page to provide some additional information to the user.
private static long serialVersionUID
          A serialization UID to keep the compiler happy.
private  JobWizard wizard
          A reference to the wizard dialog that logically owns this page.
private  javax.swing.JComboBox wordSize
          This combo box is provided to permit the user to select a suitable word size to be used for analysis.
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AnalyzerWizardPage(JobWizard wizard)
          The constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Action listener to enable/disable frame depending on analyzer selected.
private  javax.swing.JPanel createCachePanels()
          This is a helper method that is used to create the cache type and cache size entry boxes.
private  javax.swing.JPanel createFrameWordPanels()
          This is a helper method that is used to create the frame and word entry boxes.
protected  FWAnalyzer getAnalyzer()
          This method is a convenience method that can be used to obtain a FWAnalyzer object containing information from this page.
protected  FWAnalyzer.FWAnalyzerType getAnalyzerType()
          Obtain the currently selected analyzer.
protected  java.lang.Integer getFrameSize()
          Obtain the currently set frame size for the analyzer.
 
Methods inherited from class org.peace_tools.generic.GenericWizardPage
getPage, getSubTitle, getTitle, pageChanged, pageChanging, setTitle
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, 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, 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
add, add, add, add, add, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wizard

private final JobWizard wizard
A reference to the wizard dialog that logically owns this page. This reference is used to enable and disable buttons on this wizard appropriately.


analyzerList

private javax.swing.JComboBox analyzerList
A combo-box to select the type of frame/word algorithm to be used for computing similarity metric.


frameSize

private javax.swing.JSpinner frameSize
Formatted field to read the frame size to be used for analysis.


frameSizeAuto

private javax.swing.JLabel frameSizeAuto
A simple JLabel that is used instead of the frameSize spinner whenever the user selected TwoPassD2 to indicate that the frame size is automatically determined.


wordSize

private javax.swing.JComboBox wordSize
This combo box is provided to permit the user to select a suitable word size to be used for analysis. Currently the word size is locked to 6.


cacheList

private javax.swing.JComboBox cacheList
A combo-box to select the type of caching that must be used to cache intermediate values to improve performance of the analyzer.


cacheSize

private javax.swing.JSpinner cacheSize
The size of the cache (number of entries maintained in the cache) to be used for analysis.


INFO_MSG

private static final java.lang.String INFO_MSG
A generic informational message that is displayed at the top of this wizard page to provide some additional information to the user.

See Also:
Constant Field Values

ANALYZERS

private static final java.lang.String[] ANALYZERS
The list of analyzers that the user can choose from to compare two ESTs to determine similarity or distance.


serialVersionUID

private static final long serialVersionUID
A serialization UID to keep the compiler happy.

See Also:
Constant Field Values
Constructor Detail

AnalyzerWizardPage

public AnalyzerWizardPage(JobWizard wizard)
The constructor. The constructor sets up the various components on this wizard page. The components include: combo box to select the frame/word analyzer to be used, spinners for window and word size, the type of cache and size of cache to be used.

Parameters:
wizard - The wizard that logically owns this page.
Method Detail

createFrameWordPanels

private javax.swing.JPanel createFrameWordPanels()
This is a helper method that is used to create the frame and word entry boxes. This method adds the two controls with suitable labels to the supplied sub-panel.

Returns:
A panel to which the text controls have been added.

createCachePanels

private javax.swing.JPanel createCachePanels()
This is a helper method that is used to create the cache type and cache size entry boxes. This method adds the two controls with suitable labels to the supplied sub-panel. This method was introduced to keep the code clutter to a minimum in the constructor.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Action listener to enable/disable frame depending on analyzer selected. This method is invoked whenever the user changes the currently selected analyzer in the analyzerList combo box. This method enables or disables the spinner for setting the window/frame size.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - The action event associated with this method. This event is currently unused.

getFrameSize

protected java.lang.Integer getFrameSize()
Obtain the currently set frame size for the analyzer. This method is currently used by the HeuristicsWizardPage class.

Returns:
The currently set frame size value for the analyzer.

getAnalyzerType

protected FWAnalyzer.FWAnalyzerType getAnalyzerType()
Obtain the currently selected analyzer. This method is a convenience method that can be used by other wizard pages to determine the type of the wizard that the user has currently selected. Currently this method is used by the HeuristicsWizardPage to enable or disable heuristic configuration.

Returns:
A predefined enumeration defining the type of analyzer that the user has currently chosen.

getAnalyzer

protected FWAnalyzer getAnalyzer()
This method is a convenience method that can be used to obtain a FWAnalyzer object containing information from this page. This method is used by the JobWizard to compose a complete set of entries once the wizard has successfully completed.

Returns:
A FWAnalyzer object containing the necessary information about this analyzer.