apollo.dataadapter.synteny
Class SyntenyAdapterGUI

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.synteny.SyntenyAdapterGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, org.bdgp.io.DataAdapterUI

public class SyntenyAdapterGUI
extends org.bdgp.swing.AbstractDataAdapterUI

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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  SyntenyAdapter driver
           
protected static org.apache.log4j.Logger logger
           
protected  org.bdgp.io.IOOperation op
           
 
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
SyntenyAdapterGUI(org.bdgp.io.IOOperation op, SyntenyAdapter adapter)
           
 
Method Summary
 java.lang.Object doOperation(java.lang.Object values)
          We need to post-process this composite curation set.
 java.util.Map getAdapterGUIs()
           
 java.util.List getAdapterLabelList()
           
protected  org.bdgp.io.IOOperation getOperation()
           
 java.util.Properties getProperties()
          Gather properties for each child adapter - prefix each gathered property with the name of the species (so, "myProp" -> "Homo_sapiens:myProp") and then glue all child Properties into one big Properties.
 java.util.HashMap getSharedData()
          Data common to all adapters should have a place to live - this is it.
 void setDataAdapter(org.bdgp.io.DataAdapter driver)
          This sets the SyntenyAdapter as the dataadapter for this GUI.
 void setInput(java.lang.Object input)
          This is called specifically by helpers (like the FullEnsJDBCSyntenyPanel) which need to set values directly into the widgets in its children.
 void setProperties(java.util.Properties combinedProperties)
           Walk each property we've been handed.
 
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

logger

protected static final org.apache.log4j.Logger logger

driver

protected SyntenyAdapter driver

op

protected org.bdgp.io.IOOperation op
Constructor Detail

SyntenyAdapterGUI

public SyntenyAdapterGUI(org.bdgp.io.IOOperation op,
                         SyntenyAdapter adapter)
Method Detail

setDataAdapter

public void setDataAdapter(org.bdgp.io.DataAdapter driver)
This sets the SyntenyAdapter as the dataadapter for this GUI. We must propagate this relation down to the children, otherwise none of the GUI's in the child adapters will be connected to the child dataadapers.

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

setInput

public void setInput(java.lang.Object input)

This is called specifically by helpers (like the FullEnsJDBCSyntenyPanel) which need to set values directly into the widgets in its children. -- The point is that we get fed something (currently a SyntenyRegion) from the our invoker (currently the SyntenyMenu). We find the adapter gui's relevant to the chromosomes on the region and setInput on them, passing in a HashMap of text-field values relevant to each.

For instance, when given ranges on Human and Mouse, we will set the Human ranges on the Human adapter, the Mouse ranges on the Mouse adapter, and both ranges on the Human/Mouse adapter.

If we get called with anything other than a HashMap, we do nothing.

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

getProperties

public java.util.Properties getProperties()
Gather properties for each child adapter - prefix each gathered property with the name of the species (so, "myProp" -> "Homo_sapiens:myProp") and then glue all child Properties into one big Properties. Hand out!


setProperties

public void setProperties(java.util.Properties combinedProperties)

Walk each property we've been handed. Strip off the species name at the front of the property, and gather the properties into species-specific groups.

Add to these properties the configuration information in the synteny style file for this species (in particular, we'll throw in the query- and hit-species for the compara-adapters we load into the properties list)

Call setProperties() on each species' adapter, passing in the specific groups we've gathered.


doOperation

public java.lang.Object doOperation(java.lang.Object values)
                             throws org.bdgp.io.DataAdapterException
We need to post-process this composite curation set. Right now, protein homology information is being provided with no "extra" redundant information - namely, the positions of the homologous genes are no longer being stored with the gene pairs, but we have already retrieved these genes in the individual species' curation sets, so we will fill-in the feature pairs' position information with the gene info we already know. Changed this so it always returns a CompositeDataHolder now. Presently for gff and ensj it makes a composite cur set and then makes a comp data holder from that. Eventually they should just make a comp data holder from scratch.

Throws:
org.bdgp.io.DataAdapterException

getAdapterGUIs

public java.util.Map getAdapterGUIs()

getOperation

protected org.bdgp.io.IOOperation getOperation()

getAdapterLabelList

public java.util.List getAdapterLabelList()

getSharedData

public java.util.HashMap getSharedData()
Data common to all adapters should have a place to live - this is it.