edu.harvard.mgh.purcell.gPLINK2
Class OpenHapDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by edu.harvard.mgh.purcell.gPLINK2.OpenHapDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class OpenHapDialog
extends javax.swing.JDialog

A JDialog that launches Haploview.

Author:
Kathe Todd-Brown
See Also:
Serialized Form

Nested Class Summary
private  class OpenHapDialog.myActionListener
          Create a generic ActionListener for a browse button that launches a local file browse.
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JButton cancel
          A JButton to close the dialog without doing anything.
private  GPLINK frame
          The GPLINK instance this dialog is attached to.
private  javax.swing.JButton infoButton
          A JButton that triggers the info file browse.
private  javax.swing.JTextField infoFile
          A JTextField that holds the full info file path.
private static java.lang.String[] infoSuffex
          A String array that holds all the suffix's that flag a info file.
private static org.apache.log4j.Logger logger
          Log comments and errors
private  javax.swing.JButton mapButton
          A JButton that triggers a browse for the map/bim file.
private  javax.swing.JTextField mapFile
          A JTextField that holds the map/bim file names.
private static java.lang.String[] mapSuffex
          A String array that holds all the suffix's that flag a map/bim file.
private  javax.swing.JButton nonSNPButton
          A JButton that browses for the nonSNP file.
private  javax.swing.JTextField nonSNPFile
          A JTextField that holds the full path name of nonSNP reconized files.
private  javax.swing.JRadioButton nonSNPRB
          A JRadioButton to flag the nonSNP file option.
private  javax.swing.JButton ok
          A JButton that signals to process and close the dialog.
private  java.awt.event.ActionListener openHaplo
          An ActionListener that attaches to the ok button and opens an instance of haploview using the files specified in the dialog.
private  javax.swing.JButton pedButton
          A JButton that triggers the ped file browse.
private  javax.swing.JTextField pedFile
          A JTextField that holds the full ped file path.
private  javax.swing.JRadioButton pedInfoRB
          A JRadioButton to flag the ped/info file option for haploview
private static java.lang.String[] pedSuffex
          A String array that holds all the suffix's that flag a ped file.
private  java.awt.event.ItemListener setFields
          An ItemListener to set the JTextFields and JButtons to reflect the corrisponding radio button selection.
private  javax.swing.JButton SNPButton
          A JButton to browse for SNP defined files.
private  javax.swing.JTextField SNPFile
          A JTextField that holds a SNP defined file name.
private  javax.swing.JRadioButton SNPRB
          A JRadioButton to flag the SNP file option
private static java.lang.String[] SNPSuffex
          A String array that holds all the suffix's that flag a SNP file.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
OpenHapDialog(GPLINK mf, java.lang.String givenOp, java.lang.String givenFile)
          Create a Dialog to open a Haploview instance.
 
Method Summary
(package private)  void createPanel()
          Intialize and layout the panel.
private  void populateFields(java.lang.String givenOp, java.lang.String filename)
          Populate the fields based on the file and operation name.
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, removeNotify, 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, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Logger logger
Log comments and errors


frame

private GPLINK frame
The GPLINK instance this dialog is attached to. We access the project data through this.


pedSuffex

private static java.lang.String[] pedSuffex
A String array that holds all the suffix's that flag a ped file.


infoSuffex

private static java.lang.String[] infoSuffex
A String array that holds all the suffix's that flag a info file.


pedInfoRB

private javax.swing.JRadioButton pedInfoRB
A JRadioButton to flag the ped/info file option for haploview


pedFile

private javax.swing.JTextField pedFile
A JTextField that holds the full ped file path.


pedButton

private javax.swing.JButton pedButton
A JButton that triggers the ped file browse.


infoFile

private javax.swing.JTextField infoFile
A JTextField that holds the full info file path.


infoButton

private javax.swing.JButton infoButton
A JButton that triggers the info file browse.


nonSNPRB

private javax.swing.JRadioButton nonSNPRB
A JRadioButton to flag the nonSNP file option. This is the default option for a random file.


nonSNPFile

private javax.swing.JTextField nonSNPFile
A JTextField that holds the full path name of nonSNP reconized files. This is the default.


nonSNPButton

private javax.swing.JButton nonSNPButton
A JButton that browses for the nonSNP file.


mapSuffex

private static java.lang.String[] mapSuffex
A String array that holds all the suffix's that flag a map/bim file.


SNPSuffex

private static java.lang.String[] SNPSuffex
A String array that holds all the suffix's that flag a SNP file.


SNPRB

private javax.swing.JRadioButton SNPRB
A JRadioButton to flag the SNP file option


SNPFile

private javax.swing.JTextField SNPFile
A JTextField that holds a SNP defined file name.


SNPButton

private javax.swing.JButton SNPButton
A JButton to browse for SNP defined files.


mapFile

private javax.swing.JTextField mapFile
A JTextField that holds the map/bim file names.


mapButton

private javax.swing.JButton mapButton
A JButton that triggers a browse for the map/bim file.


ok

private javax.swing.JButton ok
A JButton that signals to process and close the dialog.


cancel

private javax.swing.JButton cancel
A JButton to close the dialog without doing anything.


setFields

private java.awt.event.ItemListener setFields
An ItemListener to set the JTextFields and JButtons to reflect the corrisponding radio button selection.


openHaplo

private java.awt.event.ActionListener openHaplo
An ActionListener that attaches to the ok button and opens an instance of haploview using the files specified in the dialog.

Constructor Detail

OpenHapDialog

public OpenHapDialog(GPLINK mf,
                     java.lang.String givenOp,
                     java.lang.String givenFile)
Create a Dialog to open a Haploview instance.

Parameters:
mf - The GPLINK instance that this dialog is attached to.
givenOp - A String that
givenFile -
Method Detail

populateFields

private void populateFields(java.lang.String givenOp,
                            java.lang.String filename)
Populate the fields based on the file and operation name.

Parameters:
givenOp - A String that names the operation that this file is attached to if it's none, null otherwise.
filename - A String that is the file name we are looking to open with haploview.

createPanel

void createPanel()
Intialize and layout the panel.