edu.ucla.stat.SOCR.TG_distributome
Class TGViewerApplet

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.TG_distributome.TGViewerApplet
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer
Direct Known Subclasses:
TGEditorApplet

public class TGViewerApplet
extends javax.swing.JApplet
implements java.awt.event.ActionListener, 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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected static java.awt.Color ControlBgColor
           
protected  javax.swing.JPanel controlPanel
           
protected  boolean displayXmlError
           
static java.awt.Color EdgeNormalColor
           
static java.awt.Color EdgeSelectedHighlightColor
           
protected static java.awt.Color EdgeTextColor
           
static java.awt.Color EdgeTypeHighlightColor
           
 GLPanel 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  javax.swing.JTextArea infoAreaMiddle
           
protected  javax.swing.JPanel infoAreaReference
           
protected  LoadAndShowFormula infoAreaUpper
           
protected static java.awt.Color InfoBgColor
           
protected static java.awt.Color InfoBgColor2
           
protected  javax.swing.JPanel infoPanel
           
protected static int MAXSEARCHLENGTH
           
protected static int MAXVIEWABLENODES
           
protected  javax.swing.JComboBox neighbor_level
           
protected  javax.swing.JComboBox neighbours_level
           
static java.awt.Color NodeBothColor
           
static java.awt.Color NodeChildrenColor
           
static java.awt.Color NodeNormalColor
           
static java.awt.Color NodeParentColor
           
static java.awt.Color NodeSelectedHighlightColor
           
protected static java.awt.Color NodeTextColor
           
static java.awt.Color NodeTypeHighlightColor
           
protected  TGViewerPanelInfo panelInfo
           
protected  javax.swing.JButton refreshButton
           
protected  java.lang.String searchTerm
           
static TGViewerApplet selfRef
           
protected static java.lang.String ShowBoth
           
protected static java.lang.String ShowChildren
           
protected static java.lang.String ShowParent
           
protected  boolean substringCheck
           
protected  javax.swing.JTextField textEntry
           
protected  javax.swing.JButton toggleButton
           
protected  boolean wildCard
           
protected  java.lang.String xmlErrorMsg
           
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
TGViewerApplet()
          CONSTRUCTOR
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          ActionListener implementation method
 void addTGEdge(SOCREdge _edge)
           
 int addTGNode(SOCRNode node, java.awt.Color bg)
           
 void clearInfoAreas()
           
protected  void displayInitInfo()
           
 void doubleClickedNode()
           
 void doubleClickedWhitespace()
           
 void edgeSelected()
           
 Edge findEdgeByIndex(int edgeIndex)
           
 Node findNodeByIndex(int nodeIndex)
           
 int findNodeIndex(int id)
           
 void getXMLInputFile()
           
 void hideNeighbor()
           
 void highlightEdgeType(int typeId)
           
 void highlightNodeAndNeighbors()
           
 void highlightNodeType(int typeId)
           
 void highlightSearchResult(boolean atleastOne)
           
 void highlightSingleEdge()
           
 void init()
           
protected  void initControlPanel()
           
 void initGraph()
           
 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 nodeSelected()
           
 void openDistributiOnLine()
           
protected  void resetControlPanel()
           
 void resetEdgeColor()
           
 void resetNodeColor()
           
 void showBoth(int pickedNodeIndex)
           
 void showChildren(int pickedNodeIndex)
           
 void showNeighbor()
           
 void showParents(int pickedNodeIndex)
           
protected  void showURL(java.lang.String urlString, java.lang.String window)
           
 void updateInfoAreaUpper(java.net.URL url, java.lang.String formula)
           
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, 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, start, stop
 
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, 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

XSIZE

protected static final int XSIZE
See Also:
Constant Field Values

YSIZE

protected static final int YSIZE
See Also:
Constant Field Values

displayXmlError

protected boolean displayXmlError

xmlErrorMsg

protected java.lang.String xmlErrorMsg

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

NodeParentColor

public static final java.awt.Color NodeParentColor

NodeChildrenColor

public static final java.awt.Color NodeChildrenColor

NodeBothColor

public static final java.awt.Color NodeBothColor

NodeTypeHighlightColor

public static final java.awt.Color NodeTypeHighlightColor

NodeSelectedHighlightColor

public static final java.awt.Color NodeSelectedHighlightColor

NodeNormalColor

public static final java.awt.Color NodeNormalColor

EdgeTypeHighlightColor

public static final java.awt.Color EdgeTypeHighlightColor

EdgeSelectedHighlightColor

public static final java.awt.Color EdgeSelectedHighlightColor

EdgeNormalColor

public static final java.awt.Color EdgeNormalColor

selfRef

public static TGViewerApplet selfRef

graphPanel

public javax.swing.JScrollPane graphPanel

controlPanel

protected javax.swing.JPanel controlPanel

infoPanel

protected javax.swing.JPanel infoPanel

infoAreaMiddle

protected javax.swing.JTextArea infoAreaMiddle

infoAreaUpper

protected LoadAndShowFormula infoAreaUpper

infoAreaReference

protected javax.swing.JPanel infoAreaReference

panelInfo

protected TGViewerPanelInfo 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

refreshButton

protected javax.swing.JButton refreshButton

toggleButton

protected javax.swing.JButton toggleButton

searchTerm

protected java.lang.String searchTerm

textEntry

protected javax.swing.JTextField textEntry

substringCheck

protected boolean substringCheck

wildCard

protected boolean wildCard

graph

public GLPanel graph
Constructor Detail

TGViewerApplet

public TGViewerApplet()
CONSTRUCTOR

Method Detail

init

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

initControlPanel

protected void initControlPanel()

resetControlPanel

protected void resetControlPanel()

initGraph

public void initGraph()

getXMLInputFile

public void getXMLInputFile()

displayInitInfo

protected void displayInitInfo()

clearInfoAreas

public void clearInfoAreas()

updateInfoAreaUpper

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

resetNodeColor

public void resetNodeColor()

resetEdgeColor

public void resetEdgeColor()

findNodeIndex

public int findNodeIndex(int id)

findEdgeByIndex

public Edge findEdgeByIndex(int edgeIndex)

findNodeByIndex

public Node findNodeByIndex(int nodeIndex)

addTGNode

public int addTGNode(SOCRNode node,
                     java.awt.Color bg)

addTGEdge

public void addTGEdge(SOCREdge _edge)

edgeSelected

public void edgeSelected()

nodeSelected

public void nodeSelected()

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

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()

actionPerformed

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

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

doubleClickedWhitespace

public void doubleClickedWhitespace()

doubleClickedNode

public void doubleClickedNode()

openDistributiOnLine

public void openDistributiOnLine()

highlightNodeAndNeighbors

public void highlightNodeAndNeighbors()

highlightSearchResult

public void highlightSearchResult(boolean atleastOne)

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)

isDebug

public boolean isDebug()