apollo.dataadapter.ensj19
Class CompositeDataSourceConfigurationPanel

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 apollo.dataadapter.ensj19.CompositeDataSourceConfigurationPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class CompositeDataSourceConfigurationPanel
extends javax.swing.JPanel

This is a panel which composes a number of the standard DataSourceConfiguration panels - one for the results, one for variations, one for sequences. The point is to allow the user to gracefully enter configuration for all of these different databases.

Which database the user is configuring is determined by a drop-down at the top of the panel, which determines which one of the set of configuration panels is visible.

The set/getProperties reads the properties of ALL the panels, prefacing the properties of all except the "default" panel with a string, like "sequence:" or "default:". This should allow these properties to be easily cleaved off later, when we're trying to configure those databases.

See Also:
Serialized Form

Nested Class Summary
 class CompositeDataSourceConfigurationPanel.ChooserActionListener
          Exposes the chosen panel, hides the one that was previously chosen
 class CompositeDataSourceConfigurationPanel.DatabaseFindListener
          When the user hits "find" on the _default_ data config panel, we need to find all core ensembl databases, as well as variations.
 
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
 java.awt.event.ActionListener interactionListener
           
 
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
CompositeDataSourceConfigurationPanel()
           
CompositeDataSourceConfigurationPanel(java.lang.String[] chooserNames)
          Automatically takes the first chooser name passed in as the default.
CompositeDataSourceConfigurationPanel(java.lang.String[] chooserNames, boolean linkChooserInteractions)
           
 
Method Summary
 void addExternalDataSourceChangeListener(java.awt.event.ActionListener listener)
          The input listener is added to each data source config panel.
 DataSourceConfigurationPanel getChooser(java.lang.String key)
           
 java.awt.event.ActionListener getInteractionListener()
          The default interaction listener will do nothing.
 java.util.Properties getPrefixedProperties()
          Return properties from all choosers, prefixing each with its key
 java.lang.String getSelectedChooser()
           
protected  void initialiseDatabaseDriver(java.util.Properties defaultPanelProperties)
           
static void main(java.lang.String[] args)
           
 void populateEnsemblDatabases()
           
 void setInteractionListener(java.awt.event.ActionListener listener)
          Any listener passed in here is actually set as the interaction listener on on each component configuration panel.
 void setProperties(java.util.Properties properties)
          Set (suitably prefixed) properties onto each chooser.
 
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
 

Field Detail

interactionListener

public java.awt.event.ActionListener interactionListener
Constructor Detail

CompositeDataSourceConfigurationPanel

public CompositeDataSourceConfigurationPanel(java.lang.String[] chooserNames)
Automatically takes the first chooser name passed in as the default. This also links the choice of database on the default chooser to the remaining choosers - if you hit the "find" button on the default chooser, it will also find the variation databases


CompositeDataSourceConfigurationPanel

public CompositeDataSourceConfigurationPanel(java.lang.String[] chooserNames,
                                             boolean linkChooserInteractions)

CompositeDataSourceConfigurationPanel

public CompositeDataSourceConfigurationPanel()
Method Detail

getPrefixedProperties

public java.util.Properties getPrefixedProperties()
Return properties from all choosers, prefixing each with its key


setProperties

public void setProperties(java.util.Properties properties)
Set (suitably prefixed) properties onto each chooser. If it doesn't FIND any properties with the prefix it's looking for - e.g. "sequence" or "variation" etc, then it will just set the input properties onto that chooser.


getChooser

public DataSourceConfigurationPanel getChooser(java.lang.String key)

getSelectedChooser

public java.lang.String getSelectedChooser()

getInteractionListener

public java.awt.event.ActionListener getInteractionListener()
The default interaction listener will do nothing.


setInteractionListener

public void setInteractionListener(java.awt.event.ActionListener listener)
Any listener passed in here is actually set as the interaction listener on on each component configuration panel.


main

public static void main(java.lang.String[] args)

populateEnsemblDatabases

public void populateEnsemblDatabases()

initialiseDatabaseDriver

protected void initialiseDatabaseDriver(java.util.Properties defaultPanelProperties)

addExternalDataSourceChangeListener

public void addExternalDataSourceChangeListener(java.awt.event.ActionListener listener)
The input listener is added to each data source config panel. If the source of data is changed, an action event is fired at the input listener (if it's present). This allows any interested parties (like chromosome dropdowns) to reset themselves.