edu.iastate.metnet.birdseyeview
Class RootPanel

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

public class RootPanel
extends javax.swing.JPanel

The RootPanel Class contains the functionality for positioning and creating the Bird's Eye View GUI. This is the root of the components. The RootPanel contains the ViewPanel, TextPanel, and ButtonPanel.

Author:
Matt Studham Created Jan 21, 2005
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
 
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
RootPanel(BirdsEyeView bev, java.awt.Dimension s, ViewInfo viewInfo, java.util.ArrayList viewInfoList, java.lang.String algorithm)
          Constructor.
 
Method Summary
 void displayaddAnnotations(java.util.ArrayList annList)
          This method displays the new additional given annotation List in the text panel.
 void displayAnnotation(Annotation annotation)
          This method displays the given annotation in the text panel.
 void displayAnnotations(java.util.ArrayList annotations)
          This method sets the annotations to be displayed in the text panel.
 void displayOrHideAnnotation(Annotation annotation)
          This method displays or hides the given annotation in the text panel based on the annotations current status.
 ButtonPanel getButtonPanel()
           
 void goDown()
          This method notifies the view display about the "go up" instruction.
 void goUp()
          This method notifies the view display about the "go up" instruction.
 void hideAnnotation(Annotation annotation)
          This method removes the given annotation from the text panel.
 void highlightAnnotation(Annotation annotation)
          This method highlights the given annoation.
 void highlightAnnotations(java.util.ArrayList annList)
          This method highlights the given annoation.
 void loadConfiguration()
          This method calls the view panel and instructs it to repaint based on the new configuration.
 void loadData(java.util.ArrayList newAnnotations)
          This method calls the view panel and instructs it to load the new data.
 void loadPathwayTree(java.util.HashSet globalPathwayList)
          This method calls treepanel and load the pathway list
static void main(java.lang.String[] args, java.lang.String algorithm)
          This method is used to test the RootPanel class.
 void newView(ViewInfo newViewInfo)
          This method notifies the children that the view has changed.
 void saveAnnotations(java.io.OutputStream os)
          This method calls the text panel to save the selected gene annotations.
 void setExperiments(java.lang.String experimentName, java.util.ArrayList experimentNames)
          This method informs the button panel that there are new experiments to display.
 void setlevelCapacity(int capacity)
          this method set the GO VIEW's current level's capacity
 boolean showhideLegend()
           
 void toggleMapLabels(boolean labelsOn)
          This method calls the view panel and button panel to turn the map labels on/off.
 void unHighlightAnnotation(Annotation annotation)
          This method unhighlights the given annotation.
 void updateCapacity(int capacity)
          this method update the gene dots' capacity when new data loaded
 void updateminiCapacity(int capacity)
          this method update the gene dots' mininum capacity when new data loaded
 
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
 

Constructor Detail

RootPanel

public RootPanel(BirdsEyeView bev,
                 java.awt.Dimension s,
                 ViewInfo viewInfo,
                 java.util.ArrayList viewInfoList,
                 java.lang.String algorithm)
Constructor. Create and layout components.

Parameters:
bev - The Bird's Eye View controller
s -
viewInfo - The initial view
viewInfoList - ArrayList of all ViewInfo objects
algorithm - Algorithm of treemaps
Method Detail

newView

public void newView(ViewInfo newViewInfo)
This method notifies the children that the view has changed.

Parameters:
newViewInfo -

goUp

public void goUp()
This method notifies the view display about the "go up" instruction.


goDown

public void goDown()
This method notifies the view display about the "go up" instruction.


displayAnnotations

public void displayAnnotations(java.util.ArrayList annotations)
This method sets the annotations to be displayed in the text panel.

Parameters:
annotations -

displayAnnotation

public void displayAnnotation(Annotation annotation)
This method displays the given annotation in the text panel.

Parameters:
annotation - Annotation object

displayaddAnnotations

public void displayaddAnnotations(java.util.ArrayList annList)
This method displays the new additional given annotation List in the text panel.

Parameters:
annotation - Annotation object

hideAnnotation

public void hideAnnotation(Annotation annotation)
This method removes the given annotation from the text panel.

Parameters:
annotation - Annotation object

displayOrHideAnnotation

public void displayOrHideAnnotation(Annotation annotation)
This method displays or hides the given annotation in the text panel based on the annotations current status.

Parameters:
annotation - Annotation object

updateCapacity

public void updateCapacity(int capacity)
this method update the gene dots' capacity when new data loaded

Parameters:
capacity - the number of genes represtented in each dot

setlevelCapacity

public void setlevelCapacity(int capacity)
this method set the GO VIEW's current level's capacity

Parameters:
capacity -

updateminiCapacity

public void updateminiCapacity(int capacity)
this method update the gene dots' mininum capacity when new data loaded

Parameters:
capacity - the number of genes represtented in each dot

highlightAnnotation

public void highlightAnnotation(Annotation annotation)
This method highlights the given annoation.

Parameters:
annotation - Annotation object

highlightAnnotations

public void highlightAnnotations(java.util.ArrayList annList)
This method highlights the given annoation.

Parameters:
annotation - Annotation object

unHighlightAnnotation

public void unHighlightAnnotation(Annotation annotation)
This method unhighlights the given annotation.

Parameters:
annotation - Annotation object

setExperiments

public void setExperiments(java.lang.String experimentName,
                           java.util.ArrayList experimentNames)
This method informs the button panel that there are new experiments to display.

Parameters:
experimentName - Name of the currently selected experiment
experimentNames - Names of all experiments

loadData

public void loadData(java.util.ArrayList newAnnotations)
This method calls the view panel and instructs it to load the new data.

Parameters:
newAnnotations - ArrayList of Annotation objects

loadConfiguration

public void loadConfiguration()
This method calls the view panel and instructs it to repaint based on the new configuration.


loadPathwayTree

public void loadPathwayTree(java.util.HashSet globalPathwayList)
This method calls treepanel and load the pathway list

Parameters:
globalPathwayList - HashSet of Pathway involved in the file

saveAnnotations

public void saveAnnotations(java.io.OutputStream os)
This method calls the text panel to save the selected gene annotations.

Parameters:
os - OutputStream where the annotations are written

toggleMapLabels

public void toggleMapLabels(boolean labelsOn)
This method calls the view panel and button panel to turn the map labels on/off.

Parameters:
labelsOn - Flag indicating if map labels are to be turned on

showhideLegend

public boolean showhideLegend()

main

public static void main(java.lang.String[] args,
                        java.lang.String algorithm)
This method is used to test the RootPanel class.

Parameters:
args -

getButtonPanel

public ButtonPanel getButtonPanel()
Returns:
Returns the buttonPanel.