edu.ucla.stat.SOCR.distributome
Class ViewerApplet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by edu.ucla.stat.SOCR.distributome.ViewerApplet
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer
Direct Known Subclasses:
EditorApplet

public class ViewerApplet
extends javax.swing.JApplet
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.KeyListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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  javax.swing.JCheckBox chb_freeze
           
protected static java.awt.Color ControlBgColor
           
protected  javax.swing.JPanel controlPanel
           
protected static java.awt.Color EdgeNormalColor
           
protected static java.awt.Color EdgeTextColor
           
protected static java.awt.Color EdgeTypeHighlightColor
           
protected  javax.swing.JComboBox freezeChoice
           
 JGraph graph
           
protected static java.awt.Color GraphBgColor
           
 javax.swing.JScrollPane graphPanel
           
protected static java.lang.String HideNeighbor
           
protected  javax.swing.JComboBox highlightEdgeColorChoice
           
protected  javax.swing.JComboBox highlightNodeColorChoice
           
protected  java.awt.TextArea infoAreaMiddle
           
protected  javax.swing.JPanel infoAreaReference
           
protected  LoadAndShowFormula infoAreaUpper
           
protected  javax.swing.JScrollPane infoAreaUpperContainer
           
protected static java.awt.Color InfoBgColor
           
protected static java.awt.Color InfoBgColor2
           
protected  javax.swing.JPanel infoPanel
           
protected  boolean isWhiteSpacePicked
           
protected static int MAXSEARCHLENGTH
           
protected static int MAXVIEWABLENODES
           
protected  javax.swing.JComboBox neighbor_level
           
protected  javax.swing.JComboBox neighbours_level
           
protected static java.awt.Color NodeBothColor
           
protected static java.awt.Color NodeChildrenColor
           
protected static java.awt.Color NodeHighlightColor
           
protected static java.awt.Color NodeNormalColor
           
protected static java.awt.Color NodeParentColor
           
protected static java.awt.Color NodeTextColor
           
protected static java.awt.Color NodeTypeHighlightColor
           
protected  ViewerPanelInfo panelInfo
           
protected  javax.swing.JScrollPane refContainer
           
protected  javax.swing.JButton refresh
           
protected  java.lang.String searchTerm
           
static ViewerApplet selfRef
           
protected static java.lang.String ShowBoth
           
protected static java.lang.String ShowChildren
           
protected  javax.swing.JComboBox showHighlightedOnlyChoice
           
protected static java.lang.String ShowParent
           
protected  boolean substringCheck
           
protected  java.awt.TextField textEntry
           
protected  java.lang.String urlPattern
           
protected  boolean wildCard
           
protected static int XSIZE
           
protected static int YSIZE
           
protected  javax.swing.JComboBox zoom_level
           
protected static java.lang.String ZoomIn
           
protected static java.lang.String ZoomOut
           
protected static java.lang.String ZoomReset
           
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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
ViewerApplet()
          CONSTRUCTOR
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          ActionListener implementation method
 void addEdgeCell(Edge _edge, int sourceCellId, int targetCellId)
           
 void addNodeCell(SOCRNode node, java.awt.Color bg)
           
 void clearInfoAreas()
           
 void clearScreen()
          clear screen method
 DefaultGraphCell createVertex(SOCRNode ob, double x, double y, double w, double h, java.awt.Color bg, boolean raised)
           
protected  void displayInitInfo()
           
 int findNodeCellId(int id)
           
 int findNodeIndex(int id)
           
 void getXMLInputFile()
           
 void hideNeighbor()
           
 void highlightEdgeType(int typeId)
           
 void highlightNodeAndNeighbors()
           
 void highlightNodeType(int typeId)
           
 void highlightSearchResult()
           
 void highlightSingleEdge()
           
 void init()
           
protected  void initControlPanel()
           
 void initGraph()
           
static boolean isDebug()
           
 void keyPressed(java.awt.event.KeyEvent e)
          KeyListener implementation - for search field
 void keyReleased(java.awt.event.KeyEvent e)
          keyListener implement
 void keyTyped(java.awt.event.KeyEvent e)
          keyListener
 void mouseClicked(java.awt.event.MouseEvent e)
          handle right button mouse events separates for getting more detail on the protein node
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
protected  void resetControlPanel()
           
 void resetEdgeColor()
           
 void resetNodeColor()
           
 void setFreezedStatus(boolean in)
          destroy panel
 void showBoth(int pickedNodeIndex)
           
 void showChildren(int pickedNodeIndex)
           
 void showNeighbor()
           
 void showNodeUpdate()
           
 void showParents(int pickedNodeIndex)
           
protected  void showURL(java.lang.String urlString, java.lang.String window)
           
 void start()
          applet
 void stop()
          applet
 void updateInfoAreaUpper(java.net.URL url, java.lang.String formula)
           
protected  void zoominAt(CellView cell, double zoomFactor)
           
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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

HideNeighbor

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

ShowParent

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

ShowChildren

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

ShowBoth

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

ZoomReset

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

ZoomIn

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

ZoomOut

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

MAXVIEWABLENODES

protected static final int MAXVIEWABLENODES
See Also:
Constant Field Values

MAXSEARCHLENGTH

protected static final int MAXSEARCHLENGTH
See Also:
Constant Field Values

isWhiteSpacePicked

protected boolean isWhiteSpacePicked

XSIZE

protected static final int XSIZE
See Also:
Constant Field Values

YSIZE

protected static final int YSIZE
See Also:
Constant Field Values

ControlBgColor

protected static final java.awt.Color ControlBgColor

InfoBgColor

protected static final java.awt.Color InfoBgColor

InfoBgColor2

protected static final java.awt.Color InfoBgColor2

GraphBgColor

protected static final java.awt.Color GraphBgColor

NodeTextColor

protected static final java.awt.Color NodeTextColor

EdgeTextColor

protected static final java.awt.Color EdgeTextColor

NodeHighlightColor

protected static final java.awt.Color NodeHighlightColor

NodeParentColor

protected static final java.awt.Color NodeParentColor

NodeChildrenColor

protected static final java.awt.Color NodeChildrenColor

NodeBothColor

protected static final java.awt.Color NodeBothColor

NodeTypeHighlightColor

protected static final java.awt.Color NodeTypeHighlightColor

NodeNormalColor

protected static final java.awt.Color NodeNormalColor

EdgeTypeHighlightColor

protected static final java.awt.Color EdgeTypeHighlightColor

EdgeNormalColor

protected static final java.awt.Color EdgeNormalColor

selfRef

public static ViewerApplet selfRef

graphPanel

public javax.swing.JScrollPane graphPanel

controlPanel

protected javax.swing.JPanel controlPanel

infoPanel

protected javax.swing.JPanel infoPanel

infoAreaMiddle

protected java.awt.TextArea infoAreaMiddle

infoAreaUpper

protected LoadAndShowFormula infoAreaUpper

infoAreaUpperContainer

protected javax.swing.JScrollPane infoAreaUpperContainer

infoAreaReference

protected javax.swing.JPanel infoAreaReference

refContainer

protected javax.swing.JScrollPane refContainer

panelInfo

protected ViewerPanelInfo panelInfo

neighbours_level

protected javax.swing.JComboBox neighbours_level

zoom_level

protected javax.swing.JComboBox zoom_level

highlightNodeColorChoice

protected javax.swing.JComboBox highlightNodeColorChoice

highlightEdgeColorChoice

protected javax.swing.JComboBox highlightEdgeColorChoice

neighbor_level

protected javax.swing.JComboBox neighbor_level

freezeChoice

protected javax.swing.JComboBox freezeChoice

refresh

protected javax.swing.JButton refresh

showHighlightedOnlyChoice

protected javax.swing.JComboBox showHighlightedOnlyChoice

searchTerm

protected java.lang.String searchTerm

textEntry

protected java.awt.TextField textEntry

substringCheck

protected boolean substringCheck

wildCard

protected boolean wildCard

chb_freeze

protected javax.swing.JCheckBox chb_freeze

urlPattern

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

graph

public JGraph graph
Constructor Detail

ViewerApplet

public ViewerApplet()
CONSTRUCTOR

Method Detail

start

public void start()
applet

Overrides:
start in class java.applet.Applet

stop

public void stop()
applet

Overrides:
stop in class java.applet.Applet

init

public void init()
Overrides:
init in class java.applet.Applet

addNodeCell

public void addNodeCell(SOCRNode node,
                        java.awt.Color bg)

addEdgeCell

public void addEdgeCell(Edge _edge,
                        int sourceCellId,
                        int targetCellId)

createVertex

public DefaultGraphCell createVertex(SOCRNode ob,
                                     double x,
                                     double y,
                                     double w,
                                     double h,
                                     java.awt.Color bg,
                                     boolean raised)

initControlPanel

protected void initControlPanel()

resetControlPanel

protected void resetControlPanel()

getXMLInputFile

public void getXMLInputFile()

displayInitInfo

protected void displayInitInfo()

initGraph

public void initGraph()

findNodeIndex

public int findNodeIndex(int id)

findNodeCellId

public int findNodeCellId(int id)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
ActionListener implementation method

Specified by:
actionPerformed in interface java.awt.event.ActionListener

clearInfoAreas

public void clearInfoAreas()

updateInfoAreaUpper

public void updateInfoAreaUpper(java.net.URL url,
                                java.lang.String formula)

resetNodeColor

public void resetNodeColor()

resetEdgeColor

public void resetEdgeColor()

clearScreen

public void clearScreen()
clear screen method


setFreezedStatus

public void setFreezedStatus(boolean in)
destroy panel


showNodeUpdate

public void showNodeUpdate()

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
handle right button mouse events separates for getting more detail on the protein node

Specified by:
mouseClicked in interface java.awt.event.MouseListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
KeyListener implementation - for search field

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

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
keyListener implement

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

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
keyListener

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

zoominAt

protected void zoominAt(CellView cell,
                        double zoomFactor)

showNeighbor

public void showNeighbor()

showBoth

public void showBoth(int pickedNodeIndex)

showParents

public void showParents(int pickedNodeIndex)

showChildren

public void showChildren(int pickedNodeIndex)

hideNeighbor

public void hideNeighbor()

highlightNodeAndNeighbors

public void highlightNodeAndNeighbors()

highlightSearchResult

public void highlightSearchResult()

highlightNodeType

public void highlightNodeType(int typeId)

highlightSingleEdge

public void highlightSingleEdge()

highlightEdgeType

public void highlightEdgeType(int typeId)

showURL

protected void showURL(java.lang.String urlString,
                       java.lang.String window)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

isDebug

public static boolean isDebug()