Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

ding.view
Class InnerCanvas

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by ding.view.DingCanvas
                  extended by ding.view.InnerCanvas
All Implemented Interfaces:
DropTargetListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, ImageObserver, MenuContainer, Serializable, EventListener, phoebe.PhoebeCanvasDroppable

public class InnerCanvas
extends DingCanvas
implements MouseListener, MouseMotionListener, DropTargetListener, phoebe.PhoebeCanvasDroppable, KeyListener, MouseWheelListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
 Vector edgeContextMenuListeners
          DOCUMENT ME!
 Vector listeners
          DOCUMENT ME!
 Vector nodeContextMenuListeners
          DOCUMENT ME!
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
 
Method Summary
 void addEdgeContextMenuListener(EdgeContextMenuListener l)
          DOCUMENT ME!
 void addNodeContextMenuListener(NodeContextMenuListener l)
          adds a listener to the store of NodeContextMenuListeners
 void addPhoebeCanvasDropListener(phoebe.PhoebeCanvasDropListener l)
          adds a listener to the store of PhoebeCanvasDropTargetListeners
 void addTransferComponent(JComponent comp)
          DOCUMENT ME!
 void disableNodeMovement()
           
 void dragEnter(DropTargetDragEvent dte)
          default dragEnter handler.
 void dragExit(DropTargetEvent dte)
          default dragExit handler.
 void dragOver(DropTargetDragEvent dte)
          default dragOver handler.
 void drop(DropTargetDropEvent dte)
          default drop handler.
 void dropActionChanged(DropTargetDragEvent dte)
          default dropActionChanged handler.
 void enableNodeMovement()
           
 AffineTransform getAffineTransform()
          Called to get the tranform matrix used by the inner canvas to move the nodes.
 int getLastRenderDetail()
          DOCUMENT ME!
 boolean isNodeMovementDisabled()
           
 boolean isSelecting()
          DOCUMENT ME!
 void keyPressed(KeyEvent k)
          Handles key press events.
 void keyReleased(KeyEvent k)
          Currently not used.
 void keyTyped(KeyEvent k)
          Currently not used.
 void mouseClicked(MouseEvent e)
          DOCUMENT ME!
 void mouseDragged(MouseEvent e)
          DOCUMENT ME!
 void mouseEntered(MouseEvent e)
          DOCUMENT ME!
 void mouseExited(MouseEvent e)
          DOCUMENT ME!
 void mouseMoved(MouseEvent e)
          DOCUMENT ME!
 void mousePressed(MouseEvent e)
          DOCUMENT ME!
 void mouseReleased(MouseEvent e)
          DOCUMENT ME!
 void mouseWheelMoved(MouseWheelEvent e)
           
 void paint(Graphics g)
          DOCUMENT ME!
 void print(Graphics g)
          DOCUMENT ME!
 void printNoImposter(Graphics g)
          Print routine which corrects bug 1471/1495
 void removeEdgeContextMenuListener(EdgeContextMenuListener l)
          DOCUMENT ME!
 void removeNodeContextMenuListener(NodeContextMenuListener l)
          removes a listener from the store of NodeContextMenuListeners
 void removePhoebeCanvasDropListener(phoebe.PhoebeCanvasDropListener l)
          removes a listener from the store of PhoebeCanvasDropTargetListeners
 void removeTransferComponent(JComponent comp)
          DOCUMENT ME!
 void setBounds(int x, int y, int width, int height)
          DOCUMENT ME!
 void setSelecting(boolean s)
          DOCUMENT ME!
 void update(Graphics g)
          DOCUMENT ME!
 
Methods inherited from class ding.view.DingCanvas
getBackground, getImage, setBackground, setOpaque, setVisible
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listeners

public Vector listeners
DOCUMENT ME!


nodeContextMenuListeners

public Vector nodeContextMenuListeners
DOCUMENT ME!


edgeContextMenuListeners

public Vector edgeContextMenuListeners
DOCUMENT ME!

Method Detail

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
DOCUMENT ME!

Overrides:
setBounds in class Component
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
width - DOCUMENT ME!
height - DOCUMENT ME!

update

public void update(Graphics g)
DOCUMENT ME!

Overrides:
update in class JComponent
Parameters:
g - DOCUMENT ME!

paint

public void paint(Graphics g)
DOCUMENT ME!

Overrides:
paint in class JComponent
Parameters:
g - DOCUMENT ME!

print

public void print(Graphics g)
DOCUMENT ME!

Overrides:
print in class JComponent
Parameters:
g - DOCUMENT ME!

printNoImposter

public void printNoImposter(Graphics g)
Print routine which corrects bug 1471/1495

Overrides:
printNoImposter in class DingCanvas
Parameters:
g - DOCUMENT ME!

mouseClicked

public void mouseClicked(MouseEvent e)
DOCUMENT ME!

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - DOCUMENT ME!

mouseEntered

public void mouseEntered(MouseEvent e)
DOCUMENT ME!

Specified by:
mouseEntered in interface MouseListener
Parameters:
e - DOCUMENT ME!

mouseExited

public void mouseExited(MouseEvent e)
DOCUMENT ME!

Specified by:
mouseExited in interface MouseListener
Parameters:
e - DOCUMENT ME!

mousePressed

public void mousePressed(MouseEvent e)
DOCUMENT ME!

Specified by:
mousePressed in interface MouseListener
Parameters:
e - DOCUMENT ME!

mouseReleased

public void mouseReleased(MouseEvent e)
DOCUMENT ME!

Specified by:
mouseReleased in interface MouseListener
Parameters:
e - DOCUMENT ME!

mouseDragged

public void mouseDragged(MouseEvent e)
DOCUMENT ME!

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - DOCUMENT ME!

mouseMoved

public void mouseMoved(MouseEvent e)
DOCUMENT ME!

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - DOCUMENT ME!

keyPressed

public void keyPressed(KeyEvent k)
Handles key press events. Currently used with the up/down, left/right arrow keys. Pressing any of the listed keys will move the selected nodes one pixel in that direction.

Specified by:
keyPressed in interface KeyListener
Parameters:
k - The key event that we're listening for.

keyReleased

public void keyReleased(KeyEvent k)
Currently not used.

Specified by:
keyReleased in interface KeyListener
Parameters:
k - The key event that we're listening for.

keyTyped

public void keyTyped(KeyEvent k)
Currently not used.

Specified by:
keyTyped in interface KeyListener
Parameters:
k - The key event that we're listening for.

dragEnter

public void dragEnter(DropTargetDragEvent dte)
default dragEnter handler. Accepts the drag.

Specified by:
dragEnter in interface DropTargetListener
Parameters:
dte - the DropTargetDragEvent

dragExit

public void dragExit(DropTargetEvent dte)
default dragExit handler. Does nothing, can be overridden.

Specified by:
dragExit in interface DropTargetListener
Parameters:
dte - the DropTargetDragEvent

dropActionChanged

public void dropActionChanged(DropTargetDragEvent dte)
default dropActionChanged handler. Does nothing, can be overridden.

Specified by:
dropActionChanged in interface DropTargetListener
Parameters:
dte - the DropTargetDragEvent

dragOver

public void dragOver(DropTargetDragEvent dte)
default dragOver handler. Does nothing, can be overridden.

Specified by:
dragOver in interface DropTargetListener
Parameters:
dte - the DropTargetDragEvent

drop

public void drop(DropTargetDropEvent dte)
default drop handler. Accepts drop, builds a transferable, creates and fires a PhoebeCanvasDropEvent, then calls dropComplete().

Specified by:
drop in interface DropTargetListener
Parameters:
dte - the DropTargetDragEvent

addPhoebeCanvasDropListener

public void addPhoebeCanvasDropListener(phoebe.PhoebeCanvasDropListener l)
adds a listener to the store of PhoebeCanvasDropTargetListeners

Specified by:
addPhoebeCanvasDropListener in interface phoebe.PhoebeCanvasDroppable
Parameters:
l - the PhoebeCanvasDropTargetListener

removePhoebeCanvasDropListener

public void removePhoebeCanvasDropListener(phoebe.PhoebeCanvasDropListener l)
removes a listener from the store of PhoebeCanvasDropTargetListeners

Specified by:
removePhoebeCanvasDropListener in interface phoebe.PhoebeCanvasDroppable
Parameters:
l - the PhoebeCanvasDropTargetListener

addTransferComponent

public void addTransferComponent(JComponent comp)
DOCUMENT ME!

Parameters:
comp - DOCUMENT ME!

removeTransferComponent

public void removeTransferComponent(JComponent comp)
DOCUMENT ME!

Parameters:
comp - DOCUMENT ME!

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface MouseWheelListener

addNodeContextMenuListener

public void addNodeContextMenuListener(NodeContextMenuListener l)
adds a listener to the store of NodeContextMenuListeners

Parameters:
l - the NodeContextMenuListener

removeNodeContextMenuListener

public void removeNodeContextMenuListener(NodeContextMenuListener l)
removes a listener from the store of NodeContextMenuListeners

Parameters:
l - the NodeContextMenuListener

addEdgeContextMenuListener

public void addEdgeContextMenuListener(EdgeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeEdgeContextMenuListener

public void removeEdgeContextMenuListener(EdgeContextMenuListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

getLastRenderDetail

public int getLastRenderDetail()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setSelecting

public void setSelecting(boolean s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!

isSelecting

public boolean isSelecting()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getAffineTransform

public AffineTransform getAffineTransform()
Called to get the tranform matrix used by the inner canvas to move the nodes.

Returns:
AffineTransform

enableNodeMovement

public void enableNodeMovement()

disableNodeMovement

public void disableNodeMovement()

isNodeMovementDisabled

public boolean isNodeMovementDisabled()

www.cytoscape.org