apollo.dataadapter.ensj19
Class EnsJAdapterGUI

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.bdgp.swing.AbstractDataAdapterUI
                      extended by apollo.dataadapter.ensj19.EnsJAdapterGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, org.bdgp.io.DataAdapterUI
Direct Known Subclasses:
AnnotationEnsJAdapterGUI

public abstract class EnsJAdapterGUI
extends org.bdgp.swing.AbstractDataAdapterUI

Configuration GUI for the EnsJAdapter class. It enables the user to specify:

This class interacts with the Apollo history framework by getting and setting various history parameters.

Usage: the user should add the line DataAdapterInstall "apollo.dataadapter.ensj.EnsJAdapter" to her apollo.cfg file. The Adaptor and this GUI will then be made available from the initial apollo screen.

Originally based on EnsCGIAdaptorGUI.

See Also:
Serialized Form

Nested Class Summary
 class EnsJAdapterGUI.ChromosomeDropdownPopupListener
          When the user pops up the chromosome dropdown, it is populated - this listener makes the call to the driver, in turn to retrieve the chromsome list.
 class EnsJAdapterGUI.DataSourceChangeListener
          This class clears out chromosome dd, leaving the initialisation taks to the dd's popup menu listener
 class EnsJAdapterGUI.DataTypeButton
           
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected static java.lang.String DEFAULT_CONFIG_FILE
           
 javax.swing.JPanel locationPanel
           
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.bdgp.swing.AbstractDataAdapterUI
driver
 
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
EnsJAdapterGUI(org.bdgp.io.IOOperation op)
           
 
Method Summary
protected  void buildGUI()
           
protected  javax.swing.JPanel buildIncludePanel()
           
protected  javax.swing.JPanel buildLocationPanel()
           
protected  javax.swing.border.TitledBorder createBorder(java.lang.String label)
           
abstract  java.util.Properties createStateInformation()
           
protected  java.lang.String findFile(java.lang.String file)
          Trys to locate file using apollo's Config class first and by searching the classpath second.
protected  java.awt.event.ActionListener getChrAction()
           
 javax.swing.JRadioButton getChrButton()
           
 javax.swing.JComboBox getChrDropdown()
           
 javax.swing.JComboBox getChrStartEndList()
           
protected  javax.swing.JRadioButton getCloneFragmentButton()
           
 javax.swing.Box getCloneFragmentPanel()
           
 org.bdgp.io.DataAdapter getDataAdapter()
           
protected  EnsJAdapterGUI.DataTypeButton[] getDataTypeButtons()
           
 javax.swing.JTextField getEndTextBox()
           
protected  java.util.Properties getInitialSettings()
           
 javax.swing.JPanel getLocationPanel()
           
 java.lang.String getLoggingFile()
           
 org.bdgp.io.IOOperation getOperation()
           
protected  java.util.Vector getPrefixedProperties(java.util.Properties settings, java.lang.String prefix, boolean convertValueToFilePath)
          Construct a vector containing all the values of properties with a key that begins with _prefix_.
 java.util.Properties getProperties()
          Returns the UI properties for this DataAdapterUI.
 java.lang.String getSelectedChr()
           
 java.lang.String getSelectedChrStartEnd()
           
protected  java.lang.String getSelectedCloneFragment()
           
 java.lang.String getSelectedEnd()
           
 java.lang.String getSelectedStableID()
           
 java.lang.String getSelectedStart()
           
 javax.swing.JRadioButton getStableIdButton()
           
 javax.swing.JTextField getStartTextBox()
           
 void initialiseChromosomeDropdown()
           
protected  boolean isChromosomeListInitialised()
           
protected  void putPrefixedProperties(java.util.Properties settings, java.util.Vector values, java.lang.String prefix)
          Puts each element from _values_ into _settings_.
 void setDataAdapter(org.bdgp.io.DataAdapter adapter)
          Sets the data adapter for this UI.
protected  void setDataTypeButtons(EnsJAdapterGUI.DataTypeButton[] buttons)
           
 void setLoggingFile(java.lang.String newValue)
           
 void setProperties(java.util.Properties input)
          Loads history values into 'drop down' lists and other GUI components.
 void setSelectedStableId(java.lang.String stableId)
           
 
Methods inherited from class org.bdgp.swing.AbstractDataAdapterUI
setInput
 
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, 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, 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, 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
 
Methods inherited from interface org.bdgp.io.DataAdapterUI
doOperation
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

DEFAULT_CONFIG_FILE

protected static final java.lang.String DEFAULT_CONFIG_FILE
See Also:
Constant Field Values

locationPanel

public javax.swing.JPanel locationPanel
Constructor Detail

EnsJAdapterGUI

public EnsJAdapterGUI(org.bdgp.io.IOOperation op)
Method Detail

getPrefixedProperties

protected java.util.Vector getPrefixedProperties(java.util.Properties settings,
                                                 java.lang.String prefix,
                                                 boolean convertValueToFilePath)
Construct a vector containing all the values of properties with a key that begins with _prefix_. The indexes should begin at 0 and be consecutive. Example key/value format expected:
 cloneFragmentItem0=3333
 cloneFragmentItem1=55
 


putPrefixedProperties

protected void putPrefixedProperties(java.util.Properties settings,
                                     java.util.Vector values,
                                     java.lang.String prefix)
Puts each element from _values_ into _settings_. Each element is given a unique name beginning with _prefix_. An additional element is added to the vector containing the number of elements. This is the inverse of "getPrefixedProperties()"


setProperties

public void setProperties(java.util.Properties input)
Loads history values into 'drop down' lists and other GUI components. Uses defaults where necessary.


getProperties

public java.util.Properties getProperties()
Description copied from interface: org.bdgp.io.DataAdapterUI
Returns the UI properties for this DataAdapterUI. These properties may be recorded by the widget that displays the DataAdapterUI and provided to the setDataAdapter method of later instances of the DataAdapterUI. This method may return null if there are no properties to record.

Returns:
all of the history information for the drop-down lists.

createBorder

protected javax.swing.border.TitledBorder createBorder(java.lang.String label)

buildLocationPanel

protected javax.swing.JPanel buildLocationPanel()

buildIncludePanel

protected javax.swing.JPanel buildIncludePanel()

buildGUI

protected void buildGUI()

setDataAdapter

public void setDataAdapter(org.bdgp.io.DataAdapter adapter)
Description copied from interface: org.bdgp.io.DataAdapterUI
Sets the data adapter for this UI. Since the UI provides it's own implementation of the IOOperation via the {link #doOperation(Object)}, the DataAdapterUI can decide whether or not to actually use the DataAdapter to perform the operation. However, a correct implementation of this interface will use the DataAdapter given in setDataAdapter.

Specified by:
setDataAdapter in interface org.bdgp.io.DataAdapterUI
Overrides:
setDataAdapter in class org.bdgp.swing.AbstractDataAdapterUI

getDataAdapter

public org.bdgp.io.DataAdapter getDataAdapter()

getSelectedStableID

public java.lang.String getSelectedStableID()

getSelectedCloneFragment

protected java.lang.String getSelectedCloneFragment()

getSelectedChrStartEnd

public java.lang.String getSelectedChrStartEnd()

getSelectedChr

public java.lang.String getSelectedChr()

getSelectedStart

public java.lang.String getSelectedStart()

getSelectedEnd

public java.lang.String getSelectedEnd()

getChrDropdown

public javax.swing.JComboBox getChrDropdown()

getStartTextBox

public javax.swing.JTextField getStartTextBox()

getEndTextBox

public javax.swing.JTextField getEndTextBox()

findFile

protected java.lang.String findFile(java.lang.String file)
Trys to locate file using apollo's Config class first and by searching the classpath second.

Returns:
filpath to file IF found, otherwise null.

getChrAction

protected java.awt.event.ActionListener getChrAction()

getChrStartEndList

public javax.swing.JComboBox getChrStartEndList()

getChrButton

public javax.swing.JRadioButton getChrButton()

getCloneFragmentButton

protected javax.swing.JRadioButton getCloneFragmentButton()

getStableIdButton

public javax.swing.JRadioButton getStableIdButton()

getDataTypeButtons

protected EnsJAdapterGUI.DataTypeButton[] getDataTypeButtons()

setDataTypeButtons

protected void setDataTypeButtons(EnsJAdapterGUI.DataTypeButton[] buttons)

getInitialSettings

protected java.util.Properties getInitialSettings()

getCloneFragmentPanel

public javax.swing.Box getCloneFragmentPanel()

getLocationPanel

public javax.swing.JPanel getLocationPanel()

setSelectedStableId

public void setSelectedStableId(java.lang.String stableId)

getOperation

public org.bdgp.io.IOOperation getOperation()

setLoggingFile

public void setLoggingFile(java.lang.String newValue)

getLoggingFile

public java.lang.String getLoggingFile()

initialiseChromosomeDropdown

public void initialiseChromosomeDropdown()

isChromosomeListInitialised

protected boolean isChromosomeListInitialised()

createStateInformation

public abstract java.util.Properties createStateInformation()
                                                     throws ApolloAdapterException
Throws:
ApolloAdapterException