cytoscape.editor.event
Class NetworkEditEventAdapter

java.lang.Object
  extended bycytoscape.editor.event.NetworkEditEventAdapter
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, cytoscape.data.attr.MultiHashMapListener, phoebe.PhoebeCanvasDropListener
Direct Known Subclasses:
BasicNetworkEditEventHandler

public class NetworkEditEventAdapter
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener, phoebe.PhoebeCanvasDropListener, java.awt.event.KeyListener, cytoscape.data.attr.MultiHashMapListener

The NetworkEditEventAdapter class provides stub methods for specialized network edit event handlers, as part of the graph editing framework. The specialized network edit event handler is the key class in the Cytoscape editor for defining the behavior of the editor. The behavior is defined in terms of how the event handler responds to mouse events, drag/drop events, and button press events. All editors must include a network edit event handler class that extends the NetworkEditEventAdapter class. * revised: 04/15/2006 to integrate with Cytoscape 2.3 renderer Phase 1: switch underlying node identification and edge drawing code Phase 2: remove dependencies upon Piccolo

Version:
1.0
Author:
Allan Kuchinsky

Constructor Summary
NetworkEditEventAdapter()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          actionPerformed() method should be overwritten by child classes
 void allAttributeValuesRemoved(java.lang.String objectKey, java.lang.String attributeName)
           
 void attributeValueAssigned(java.lang.String objectKey, java.lang.String attributeName, java.lang.Object[] keyIntoValue, java.lang.Object oldAttributeValue, java.lang.Object newAttributeValue)
          MultiHashMapListener methods
 void attributeValueRemoved(java.lang.String objectKey, java.lang.String attributeName, java.lang.Object[] keyIntoValue, java.lang.Object attributeValue)
           
 CytoscapeEditor get_caller()
           
 ding.view.InnerCanvas getCanvas()
           
 ding.view.DGraphView getView()
           
 void itemDropped(phoebe.PhoebeCanvasDropEvent dte)
          method for responding when an item is dropped onto the canvas.
 void keyPressed(java.awt.event.KeyEvent event)
           
 void keyReleased(java.awt.event.KeyEvent event)
           
 void keyTyped(java.awt.event.KeyEvent event)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void set_caller(CytoscapeEditor _caller)
           
 void setView(ding.view.DGraphView view)
           
 void start(ding.view.DGraphView view)
          starts up the event handler on the input network view adds an input event listener to the view's canvas
 void stop()
          stops the event handler by removing the input event listener from the canvas this is called when the user switches between editors
 void updateEdge()
          method for rendering an edge under construction as the user moves the mouse typically this may be done via a rubberband-line that udpates as the mouse position changes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkEditEventAdapter

public NetworkEditEventAdapter()
Method Detail

start

public void start(ding.view.DGraphView view)
starts up the event handler on the input network view adds an input event listener to the view's canvas

Parameters:
view - a Cytoscape network view

stop

public void stop()
stops the event handler by removing the input event listener from the canvas this is called when the user switches between editors


getCanvas

public ding.view.InnerCanvas getCanvas()
Returns:
the current canvas

mouseExited

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

mouseEntered

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

mousePressed

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

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseClicked

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

mouseReleased

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

keyPressed

public void keyPressed(java.awt.event.KeyEvent event)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent event)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent event)
Specified by:
keyTyped in interface java.awt.event.KeyListener

updateEdge

public void updateEdge()
method for rendering an edge under construction as the user moves the mouse typically this may be done via a rubberband-line that udpates as the mouse position changes


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed() method should be overwritten by child classes

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

itemDropped

public void itemDropped(phoebe.PhoebeCanvasDropEvent dte)
method for responding when an item is dropped onto the canvas. typically this would result in the addition of a node or an edge to the current Cytoscape network.

Specified by:
itemDropped in interface phoebe.PhoebeCanvasDropListener

attributeValueAssigned

public void attributeValueAssigned(java.lang.String objectKey,
                                   java.lang.String attributeName,
                                   java.lang.Object[] keyIntoValue,
                                   java.lang.Object oldAttributeValue,
                                   java.lang.Object newAttributeValue)
MultiHashMapListener methods

Specified by:
attributeValueAssigned in interface cytoscape.data.attr.MultiHashMapListener

attributeValueRemoved

public void attributeValueRemoved(java.lang.String objectKey,
                                  java.lang.String attributeName,
                                  java.lang.Object[] keyIntoValue,
                                  java.lang.Object attributeValue)
Specified by:
attributeValueRemoved in interface cytoscape.data.attr.MultiHashMapListener

allAttributeValuesRemoved

public void allAttributeValuesRemoved(java.lang.String objectKey,
                                      java.lang.String attributeName)
Specified by:
allAttributeValuesRemoved in interface cytoscape.data.attr.MultiHashMapListener

get_caller

public CytoscapeEditor get_caller()
Returns:
Returns the _caller.

set_caller

public void set_caller(CytoscapeEditor _caller)
Parameters:
_caller - The _caller to set.

getView

public ding.view.DGraphView getView()
Returns:
Returns the view.

setView

public void setView(ding.view.DGraphView view)
Parameters:
view - The view to set.