org.peace_tools.core.job
Class FiltersWizardPage

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.FiltersWizardPage
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 FiltersWizardPage
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 filters to be used in the job. Filters are used to weed out ESTs with undesirable characteristics (biologically speaking) that negatively impact with the quality of clusters generated by PEACE. Currently the following two filters are available in the clustering engine (and are exposed by the GUI):

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.JCheckBox enableLCFilter
          Check box to indicate if the Low Complexity (LC) filter must be enabled for this job.
private  javax.swing.JCheckBox enableLenFilter
          Check box to indicate if the length filter must be enabled for this job.
private static java.lang.String FILTER_LIST_MSG
          A generic informational message that is displayed to the user if the string list in filterList is invalid.
private  javax.swing.JTextField filterList
          A list of comma separated strings (over ATCG) that are used to generate dummy low complexity sequences for filtering out ESTs that have low complexity regions.
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  javax.swing.JSpinner minLen
          The minimum length of the EST associated with the length filter.
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.
 
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
FiltersWizardPage(JobWizard wizard)
          The constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Method to handle clicking of check boxes.
private  javax.swing.JPanel adjustCheckBox(javax.swing.JCheckBox cb, java.lang.String cmd)
          Helper method to correctly format, enhance, and layout a given check box.
private  javax.swing.JPanel createLCFilterPanels()
          This is a helper method that is used to create the necessary information regarding the Low Complexity (LC) filter.
private  javax.swing.JPanel createLenFilterPanels()
          This is a helper method that is used to create the necessary information regarding the length filter.
protected  java.util.ArrayList<Filter> getFilters()
          This method is a convenience method that can be used to obtain a FilterList object containing information from this page.
protected  java.lang.String getSummary()
          This method is a convenience method that can be used to obtain a String summarizing the filters setup for this job.
 boolean pageChanging(WizardDialog dialog, int currPage, int nextPage)
          Method to veto a page change if filter string is invalid.
 
Methods inherited from class org.peace_tools.generic.GenericWizardPage
getPage, getSubTitle, getTitle, pageChanged, 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.


enableLenFilter

private javax.swing.JCheckBox enableLenFilter
Check box to indicate if the length filter must be enabled for this job.


minLen

private javax.swing.JSpinner minLen
The minimum length of the EST associated with the length filter. ESTs below this length are filtered out by the length filter (if it is enabled).


enableLCFilter

private javax.swing.JCheckBox enableLCFilter
Check box to indicate if the Low Complexity (LC) filter must be enabled for this job.


filterList

private javax.swing.JTextField filterList
A list of comma separated strings (over ATCG) that are used to generate dummy low complexity sequences for filtering out ESTs that have low complexity regions.


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

FILTER_LIST_MSG

private static final java.lang.String FILTER_LIST_MSG
A generic informational message that is displayed to the user if the string list in filterList is invalid.

See Also:
Constant Field Values

serialVersionUID

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

See Also:
Constant Field Values
Constructor Detail

FiltersWizardPage

public FiltersWizardPage(JobWizard wizard)
The constructor. The constructor sets up the various components on this wizard page. The components include: check boxes to enable/disable either of the two filters. In addition there are suitable controls that can be used to enter data for the filter if the filter is enabled.

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

adjustCheckBox

private javax.swing.JPanel adjustCheckBox(javax.swing.JCheckBox cb,
                                          java.lang.String cmd)
Helper method to correctly format, enhance, and layout a given check box.

Parameters:
cb - The check box to be formatted.
cmd - The action command to be set.
Returns:
A JPanel containing the check box with additional decorations.

createLenFilterPanels

private javax.swing.JPanel createLenFilterPanels()
This is a helper method that is used to create the necessary information regarding the length filter. This method is invoked from the constructor to layout this page in the wizard. This is a helper method that was introduced to streamline the code in the constructor.


createLCFilterPanels

private javax.swing.JPanel createLCFilterPanels()
This is a helper method that is used to create the necessary information regarding the Low Complexity (LC) filter.

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

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Method to handle clicking of check boxes. This method essentially enables and disables the various inputs depending on the check box.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getFilters

protected java.util.ArrayList<Filter> getFilters()
This method is a convenience method that can be used to obtain a FilterList 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 FilterList object containing the necessary information about the filters configured by the user.

getSummary

protected java.lang.String getSummary()
This method is a convenience method that can be used to obtain a String summarizing the filters setup for this job. This method is used by the JobWizard to compose a complete set of summary information just before the job is submitted.

Returns:
A String containing a summary information of the various filters configured for this run by the user.

pageChanging

public boolean pageChanging(WizardDialog dialog,
                            int currPage,
                            int nextPage)
Method to veto a page change if filter string is invalid. This method is invoked by the core WizardDialog panel just before the user changes from this page. This method checks to ensure that the filter string specified by the user is valid. If the string is valid then this method returns true.

Specified by:
pageChanging in interface WizardPage
Overrides:
pageChanging in class GenericWizardPage
Parameters:
dialog - The wizard dialog that is invoking this method.
currPage - The logical (zero-based) index of the current page in the sequence of pages in the wizard.
nextPage - The logical (zero-based) index of the next page that is going to be displayed.
Returns:
This method returns true if the filter text is valid. Otherwise it returns false.