edu.iastate.metnet.ui
Class AddInteractionForm

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 edu.iastate.metnet.ui.AbstractMetnetWindow
                      extended by edu.iastate.metnet.ui.AddInteractionForm
All Implemented Interfaces:
VersionListener, IMetnetWindow, java.awt.event.ContainerListener, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class AddInteractionForm
extends AbstractMetnetWindow
implements VersionListener, java.awt.event.ContainerListener, java.awt.event.KeyListener

Main window for edit interaction

Author:
Jie Li
See Also:
AddEntityForm, AddPathwayForm, 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
(package private)  javax.swing.DefaultCellEditor cellEditorCoefficient
          change the cell editor of the coefficient which will use a text field (default?)
(package private)  javax.swing.DefaultCellEditor cellEditorEntityType
          chage the cell editor of the entitytype column which will use combobox
(package private)  javax.swing.DefaultCellEditor cellEditorLocation
          change the cell editor of the substrate table ad product table, this is for the location column which will use combobix
(package private)  CodelocationListModel codelocationListModel
          location list model
(package private)  int COLUMN_COEFFICIENT
          coefficient column
(package private)  int COLUMN_ENTITYTYPE
          entity type column
(package private)  int COLUMN_LOCATION
          location column
(package private)  int COLUMN_NAME
          column order number of the interaction parts
(package private)  java.lang.String ebid
          ebid
(package private)  java.lang.String entityId
          blockid of entity?
(package private)  com.jgoodies.binding.list.ArrayListModel entityList
          entity list for the entity table, which support the finer-grained change event in list
(package private)  java.lang.String enzymeType
          entity type of the enzyme, may polypeptide or protein complex so when insert the enzyme, program know if the enzyme exists already based on the name,entitytype and the location
(package private)  java.lang.String ibid
          blockid of the interaction
(package private)  com.jgoodies.binding.list.ArrayListModel leftList
          from part of the interaction
(package private) static org.apache.log4j.Logger logger
          log4j facility
(package private)  int partChoice
          indicate which part table (from or to) that user are working on, so when the user click the removePart button, program know remove which selection.
(package private)  java.lang.String pbid
          blockid of the pathway
(package private)  java.sql.ResultSet resultSet
          resultset from database
(package private)  com.jgoodies.binding.list.ArrayListModel rightList
          to part of the interaction
(package private)  java.lang.String sql
          sql string
(package private)  java.sql.Statement statement
          statement for database
(package private)  java.lang.Integer templateRecordId
          current template interaction's version id
 
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
AddInteractionForm()
          constrcutor, initialize the layout of the main window and data model of the controls
 
Method Summary
 void componentAdded(java.awt.event.ContainerEvent e)
          perform the component add event
 void componentRemoved(java.awt.event.ContainerEvent e)
          perform the component remove event
 void keyPressed(java.awt.event.KeyEvent e)
          perform the press event
 void keyReleased(java.awt.event.KeyEvent e)
          perform the release event
 void keyTyped(java.awt.event.KeyEvent e)
           
 void queryReactionByID(java.lang.String reactionID)
          get the reaction information and update the main window based on the BlockID of the interaction
 void receivePathway(java.util.HashMap pathwayMap)
          get the pathway's BlocID and list it in the the pathway table
 void receiveReactionID(java.lang.String reactionID, boolean pickupOnly)
          get the BlockID from Edit Entity window or Edit Pathway window and show all the information of the specified interaction.
 void receiveVersionDataObject(java.lang.Object versionDataObject)
          handle the version data update
 
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

static org.apache.log4j.Logger logger
log4j facility


entityList

com.jgoodies.binding.list.ArrayListModel entityList
entity list for the entity table, which support the finer-grained change event in list


leftList

com.jgoodies.binding.list.ArrayListModel leftList
from part of the interaction


rightList

com.jgoodies.binding.list.ArrayListModel rightList
to part of the interaction


COLUMN_NAME

final int COLUMN_NAME
column order number of the interaction parts

See Also:
Constant Field Values

COLUMN_ENTITYTYPE

final int COLUMN_ENTITYTYPE
entity type column

See Also:
Constant Field Values

COLUMN_LOCATION

final int COLUMN_LOCATION
location column

See Also:
Constant Field Values

COLUMN_COEFFICIENT

final int COLUMN_COEFFICIENT
coefficient column

See Also:
Constant Field Values

codelocationListModel

CodelocationListModel codelocationListModel
location list model


sql

java.lang.String sql
sql string


statement

java.sql.Statement statement
statement for database


resultSet

java.sql.ResultSet resultSet
resultset from database


pbid

java.lang.String pbid
blockid of the pathway


ibid

java.lang.String ibid
blockid of the interaction


entityId

java.lang.String entityId
blockid of entity?


ebid

java.lang.String ebid
ebid


templateRecordId

java.lang.Integer templateRecordId
current template interaction's version id


enzymeType

java.lang.String enzymeType
entity type of the enzyme, may polypeptide or protein complex so when insert the enzyme, program know if the enzyme exists already based on the name,entitytype and the location


cellEditorLocation

javax.swing.DefaultCellEditor cellEditorLocation
change the cell editor of the substrate table ad product table, this is for the location column which will use combobix


cellEditorCoefficient

javax.swing.DefaultCellEditor cellEditorCoefficient
change the cell editor of the coefficient which will use a text field (default?)


cellEditorEntityType

javax.swing.DefaultCellEditor cellEditorEntityType
chage the cell editor of the entitytype column which will use combobox


partChoice

int partChoice
indicate which part table (from or to) that user are working on, so when the user click the removePart button, program know remove which selection. = 1 represents the from part of the interaction, = 2 represents the to part of the interaction

Constructor Detail

AddInteractionForm

public AddInteractionForm()
constrcutor, initialize the layout of the main window and data model of the controls

Method Detail

queryReactionByID

public void queryReactionByID(java.lang.String reactionID)
get the reaction information and update the main window based on the BlockID of the interaction

Parameters:
reactionID - the BlockID of the interaction

componentAdded

public void componentAdded(java.awt.event.ContainerEvent e)
perform the component add event

Specified by:
componentAdded in interface java.awt.event.ContainerListener

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent e)
perform the component remove event

Specified by:
componentRemoved in interface java.awt.event.ContainerListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
perform the press event

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
perform the release event

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

receiveVersionDataObject

public void receiveVersionDataObject(java.lang.Object versionDataObject)
handle the version data update

Specified by:
receiveVersionDataObject in interface VersionListener

receiveReactionID

public void receiveReactionID(java.lang.String reactionID,
                              boolean pickupOnly)
get the BlockID from Edit Entity window or Edit Pathway window and show all the information of the specified interaction. If only pick up the substrates, then only catalyst, substrates and products will be changed.

Parameters:
reactionID - the BlockID of the interaction specified by users in the Edit Pathway window
pickupOnly - if only update the substrates and products

receivePathway

public void receivePathway(java.util.HashMap pathwayMap)
get the pathway's BlocID and list it in the the pathway table

Specified by:
receivePathway in interface IMetnetWindow
Overrides:
receivePathway in class AbstractMetnetWindow
Parameters:
pathwayMap - the list of pathway ID and name