edu.iastate.metnet.graphmodel
Class JMetaphorGraph

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by org.jgraph.JGraph
                  extended by edu.iastate.metnet.graphmodel.JMetaphorGraph
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable

public class JMetaphorGraph
extends org.jgraph.JGraph

extend the JGraph by applying the metaphor description based on the content of the pathway

Author:
Jie Li
See Also:
Serialized Form

Nested Class Summary
 class JMetaphorGraph.EditorGraphUI
          Definition of the custom GraphUI.
 
Nested classes/interfaces inherited from class org.jgraph.JGraph
org.jgraph.JGraph.EmptySelectionModel, org.jgraph.JGraph.GraphSelectionRedirector
 
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)  boolean aracycUpdate
           
(package private) static org.apache.log4j.Logger logger
          log4j facility
(package private)  int multiNodeFlag
           
 
Fields inherited from class org.jgraph.JGraph
antiAliased, ANTIALIASED_PROPERTY, autoResizeGraph, bendable, cloneable, connectable, CROSS_GRID_MODE, disconnectable, disconnectOnMove, DOT_GRID_MODE, dragEnabled, dropEnabled, editable, EDITABLE_PROPERTY, editClickCount, enabled, GRAPH_LAYOUT_CACHE_PROPERTY, GRAPH_MODEL_PROPERTY, graphLayoutCache, graphModel, GRID_COLOR_PROPERTY, GRID_SIZE_PROPERTY, GRID_VISIBLE_PROPERTY, gridColor, gridEnabled, gridMode, gridSize, gridVisible, HANDLE_COLOR_PROPERTY, HANDLE_SIZE_PROPERTY, handleColor, handleSize, highlightColor, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, isJumpToDefaultPort, isMoveIntoGroups, isMoveOutOfGroups, LINE_GRID_MODE, LOCKED_HANDLE_COLOR_PROPERTY, lockedHandleColor, marquee, MARQUEE_HANDLER_PROPERTY, marqueeColor, minimumMove, moveable, moveBelowZero, PORTS_SCALED_PROPERTY, PORTS_VISIBLE_PROPERTY, portsScaled, portsVisible, previewInvalidNullPorts, scale, SCALE_PROPERTY, SELECTION_MODEL_PROPERTY, selectionEnabled, SELECTIONENABLED_PROPERTY, selectionModel, selectionRedirector, sizeable, tolerance, VERSION
 
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
JMetaphorGraph()
          default constructor
JMetaphorGraph(org.jgraph.graph.GraphModel model)
          constructor
JMetaphorGraph(org.jgraph.graph.GraphModel model, org.jgraph.graph.BasicMarqueeHandler mh)
          constructor
JMetaphorGraph(org.jgraph.graph.GraphModel model, boolean isAraCycUpdate)
          constructor
JMetaphorGraph(org.jgraph.graph.GraphModel model, org.jgraph.graph.GraphLayoutCache view)
          constructor
JMetaphorGraph(org.jgraph.graph.GraphModel model, org.jgraph.graph.GraphLayoutCache view, org.jgraph.graph.BasicMarqueeHandler mh)
          constructor
 
Method Summary
 void applyMetaphore(IGraphMetaphor metaphor)
          apply the metaphor instance, similar to the layout
 java.lang.Object[] findGenes()
          find the gene object in the graph model
 java.lang.Object[] findOrphans(PathwayModel pathwayModel)
           
 java.lang.Object[] findRNAs()
          get RNA object in graph model
 java.util.Set getAllIbidSet()
          get all interaction blockid in the mapping view
 int getMultiNodeFlag()
           
 java.lang.String getToolTipText(java.awt.event.MouseEvent mouseEvent)
          get the tooltips
 boolean isAracycUpdate()
           
 boolean isCellEditable(java.lang.Object cell)
          override the parent method with our definition
 void setAracycUpdate(boolean isAraCycUpdate)
           
 void setMultiNodeFlag(int multiNodeFlag)
           
 void updateUI()
          Override parent method with custom GraphUI.
 
Methods inherited from class org.jgraph.JGraph
addGraphSelectionListener, addSampleData, addSelectionCell, addSelectionCells, cancelEditing, clearSelection, cloneCells, convertValueToString, createBounds, fireValueChanged, fromScreen, fromScreen, getAttributes, getCellBounds, getCellBounds, getDefaultPortForCell, getDescendants, getEditClickCount, getEditingCell, getFirstCellForLocation, getGraphLayoutCache, getGridColor, getGridMode, getGridSize, getHandleColor, getHandleSize, getHighlightColor, getImage, getInvokesStopCellEditing, getLeafViewAt, getLockedHandleColor, getMarqueeColor, getMarqueeHandler, getMinimumMove, getModel, getNextCellForLocation, getNextSelectableViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getNextViewAt, getPortForLocation, getPortViewAt, getPortViewAt, getPreferredScrollableViewportSize, getRoots, getRoots, getScale, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionCell, getSelectionCellAt, getSelectionCells, getSelectionCells, getSelectionCount, getSelectionModel, getTolerance, getTopmostViewAt, getUI, getUIClassID, graphDidChange, isAntiAliased, isAutoResizeGraph, isBendable, isCellSelected, isCloneable, isConnectable, isDisconnectable, isDisconnectOnMove, isDragEnabled, isDropEnabled, isEditable, isEditing, isGridEnabled, isGridVisible, isJumpToDefaultPort, isMoveable, isMoveBelowZero, isMoveIntoGroups, isMoveOutOfGroups, isPortsScaled, isPortsVisible, isPreviewInvalidNullPorts, isSelectionEmpty, isSelectionEnabled, isSizeable, main, order, paramString, removeGraphSelectionListener, removeSelectionCell, scrollCellToVisible, scrollPointToVisible, setAntiAliased, setAutoResizeGraph, setBendable, setCloneable, setConnectable, setDisconnectable, setDisconnectOnMove, setDragEnabled, setDropEnabled, setEditable, setEditClickCount, setGraphLayoutCache, setGridColor, setGridEnabled, setGridMode, setGridSize, setGridVisible, setHandleColor, setHandleSize, setHighlightColor, setInvokesStopCellEditing, setJumpToDefaultPort, setLockedHandleColor, setMarqueeColor, setMarqueeHandler, setMinimumMove, setModel, setMoveable, setMoveBelowZero, setMoveIntoGroups, setMoveOutOfGroups, setPortsScaled, setPortsVisible, setPreviewInvalidNullPorts, setScale, setSelectionCell, setSelectionCells, setSelectionEnabled, setSelectionModel, setSizeable, setTolerance, setUI, snap, snap, snap, startEditingAtCell, stopEditing, toScreen, toScreen, updateAutoSize
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, 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
 
Methods inherited from interface javax.accessibility.Accessible
getAccessibleContext
 

Field Detail

logger

static org.apache.log4j.Logger logger
log4j facility


multiNodeFlag

int multiNodeFlag

aracycUpdate

boolean aracycUpdate
Constructor Detail

JMetaphorGraph

public JMetaphorGraph()
default constructor


JMetaphorGraph

public JMetaphorGraph(org.jgraph.graph.GraphModel model)
constructor

Parameters:
model - graph model

JMetaphorGraph

public JMetaphorGraph(org.jgraph.graph.GraphModel model,
                      boolean isAraCycUpdate)
constructor

Parameters:
model - graph model

JMetaphorGraph

public JMetaphorGraph(org.jgraph.graph.GraphModel model,
                      org.jgraph.graph.BasicMarqueeHandler mh)
constructor

Parameters:
model - graph model
mh - nothing

JMetaphorGraph

public JMetaphorGraph(org.jgraph.graph.GraphModel model,
                      org.jgraph.graph.GraphLayoutCache view)
constructor

Parameters:
model - graph model
view - nothing

JMetaphorGraph

public JMetaphorGraph(org.jgraph.graph.GraphModel model,
                      org.jgraph.graph.GraphLayoutCache view,
                      org.jgraph.graph.BasicMarqueeHandler mh)
constructor

Parameters:
model - graph model
view - nothing
mh - nothing
Method Detail

updateUI

public void updateUI()
Override parent method with custom GraphUI.

Overrides:
updateUI in class org.jgraph.JGraph

isCellEditable

public boolean isCellEditable(java.lang.Object cell)
override the parent method with our definition

Overrides:
isCellEditable in class org.jgraph.JGraph

applyMetaphore

public void applyMetaphore(IGraphMetaphor metaphor)
apply the metaphor instance, similar to the layout

Parameters:
metaphor - the metaphor to be applied

findOrphans

public java.lang.Object[] findOrphans(PathwayModel pathwayModel)

getAllIbidSet

public java.util.Set getAllIbidSet()
get all interaction blockid in the mapping view

Returns:
allinteraction in the view.

findGenes

public java.lang.Object[] findGenes()
find the gene object in the graph model

Returns:
gene object list

findRNAs

public java.lang.Object[] findRNAs()
get RNA object in graph model

Returns:
rna object list

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent mouseEvent)
get the tooltips

Overrides:
getToolTipText in class org.jgraph.JGraph

getMultiNodeFlag

public int getMultiNodeFlag()
Returns:
Returns the multiNodeFlag.

setMultiNodeFlag

public void setMultiNodeFlag(int multiNodeFlag)
Parameters:
multiNodeFlag - The multiNodeFlag to set. 2 or more for multi-pathway, 1 or less for normal pathway

isAracycUpdate

public boolean isAracycUpdate()
Returns:
the isAraCycUpdate

setAracycUpdate

public void setAracycUpdate(boolean isAraCycUpdate)
Parameters:
isAraCycUpdate - the isAraCycUpdate to set