org.peace_tools.core.dataset
Class ESTInfoWizardPage

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.dataset.ESTInfoWizardPage
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, java.util.EventListener, javax.accessibility.Accessible, WizardPage

public class ESTInfoWizardPage
extends GenericWizardPage
implements java.lang.Runnable, java.awt.event.ActionListener

This class serves as the second interactive page in a the Data Set Wizard. This page permits the user to enter information about the top-level EST file that forms the primary input for this data set. The EST file must be in FASTA file format in order for PEACE to successfully process it. In order to ensure validity of the primary FASTA file, this wizard page verifies the file when the "Next" button is clicked (and before proceeding to the next page). The verification is done on a separate thread so that the GUI does not appear to hang (as loading FASTA files can be a time consuming task).

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.JButton browse
          The browse button to be enabled only for local installs.
private  DataSet dataSet
          Information about the actual data set entry being edited.
private  javax.swing.JTextArea description
          Field to read and edit a brief description about the server.
private  javax.swing.JTextField estFile
          Field to read/display the install path where PEACE is (or has been) installed on the given server.
private static java.lang.String INVALID_FASTA_MSG
          Just a simple error message that is displayed when connection to the remote host could not be successfully established.
private  boolean lockPath
          If this flag is set to true, then this wizard permits the user only to change the install path on the server.
private static long serialVersionUID
          A serialization UID to keep the compiler happy.
private  DataSetWizard 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
ESTInfoWizardPage(DataSetWizard wizard, DataSet dataSet, boolean lockPath)
          The constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
          This method handles the tasks performed when the "Browse" button is clicked.
private  javax.swing.JComponent createInfoPanel()
          This is a refactored utility method to create informational labels.
 void pageChanged(WizardDialog dialog, int currPage, int prevPage)
          This method is called just before this page is to be displayed.
 boolean pageChanging(WizardDialog dialog, int currPage, int nextPage)
          Method to intercept page change and trigger FASTA validation.
 void run()
          This is a helper method that is used to validate a given FASTA file.
 
Methods inherited from class org.peace_tools.generic.GenericWizardPage
getPage, getSubTitle, getTitle, 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 DataSetWizard 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.


dataSet

private final DataSet dataSet
Information about the actual data set entry being edited. This reference is set when this class is instantiated and is never changed during the life time.


estFile

private javax.swing.JTextField estFile
Field to read/display the install path where PEACE is (or has been) installed on the given server.


description

private javax.swing.JTextArea description
Field to read and edit a brief description about the server. This information can be anything the user desires and is meaningful only to the user.


lockPath

private boolean lockPath
If this flag is set to true, then this wizard permits the user only to change the install path on the server.


browse

private javax.swing.JButton browse
The browse button to be enabled only for local installs.


INVALID_FASTA_MSG

private static final java.lang.String INVALID_FASTA_MSG
Just a simple error message that is displayed when connection to the remote host could not be successfully established.

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

ESTInfoWizardPage

public ESTInfoWizardPage(DataSetWizard wizard,
                         DataSet dataSet,
                         boolean lockPath)
The constructor. The constructor sets up the various components on this wizard page. The components include: a text area for description, a text field for install directory.

Parameters:
wizard - The wizard that logically owns this page.
dataSet - The in-memory object that contains the core information about the data set being edited.
lockPath - Flag to indicate if this page must permit the user to edit the EST file path.
Method Detail

createInfoPanel

private javax.swing.JComponent createInfoPanel()
This is a refactored utility method to create informational labels. This method was introduced to keep the code clutter in the constructor to a minimum.

Returns:
The label to be used as the information panel.

pageChanged

public void pageChanged(WizardDialog dialog,
                        int currPage,
                        int prevPage)
This method is called just before this page is to be displayed. This page essentially updates the data being displayed in the GUI fields from the data stored in the in-memory Server object.

Specified by:
pageChanged in interface WizardPage
Overrides:
pageChanged 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 that is going to be displayed.
prevPage - The logical (zero-based) index of the previous page that was displayed. For the first page this value is -1.

pageChanging

public boolean pageChanging(WizardDialog dialog,
                            int currPage,
                            int nextPage)
Method to intercept page change and trigger FASTA validation. This method is invoked by the wizard when the user clicks the "Next" button. This method verifies that the FASTA file is valid. The actual detailed validation is done from a separate thread so that the GUI does not appear to hang.

Specified by:
pageChanging in interface WizardPage
Overrides:
pageChanging in class GenericWizardPage
Parameters:
dialog - The wizard dialog which logically owns this page.
currPage - The current zero-based page number.
nextPage - The zero-based index number of the next page that this wizard will display.
Returns:
This method always returns true to indicate that the user can navigate off from this page.

run

public void run()
This is a helper method that is used to validate a given FASTA file. This method verifies the file is valid and then tries to load the EST data. If the data is loaded successfully this method returns true. This method was primarily introduced to keep the code more readable.

Specified by:
run in interface java.lang.Runnable

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
This method handles the tasks performed when the "Browse" button is clicked. It displays a JFileChooser and permits the user to select a local folder.

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