cytoscape.editor.impl
Class CytoscapeEditorManagerSupport

java.lang.Object
  extended bycytoscape.editor.impl.CytoscapeEditorManagerSupport
All Implemented Interfaces:
javax.swing.event.ChangeListener, cytoscape.view.cytopanels.CytoPanelListener, java.util.EventListener, giny.model.GraphPerspectiveChangeListener, java.beans.PropertyChangeListener

public class CytoscapeEditorManagerSupport
extends java.lang.Object
implements java.beans.PropertyChangeListener, javax.swing.event.ChangeListener, giny.model.GraphPerspectiveChangeListener, cytoscape.view.cytopanels.CytoPanelListener

provides non-static methods needed by the CytoscapeEditorManager, in particular those methods associated with the PropertyChangeListener class

Version:
1.0
Author:
Allan Kuchinsky, Agilent Technologies
See Also:
CytoscapeEditorManager

Constructor Summary
CytoscapeEditorManagerSupport()
          register interest in NETWORK_VIEW_FOCUSED and NETWORK_VIEW_CREATED events
 
Method Summary
 void graphPerspectiveChanged(giny.model.GraphPerspectiveChangeEvent event)
          Implementation of the GraphPerspectiveChangeListener interface.
 void onComponentAdded(int count)
          Notifies the listener when a component is added to the CytoPanel.
 void onComponentRemoved(int count)
          Notifies the listener when a component is removed from the CytoPanel.
 void onComponentSelected(int componentIndex)
          respond to selection of a CytoPanels component, in particular respond to selection of a tab on the WEST CytoPanel.
 void onStateChange(cytoscape.view.cytopanels.CytoPanelState newState)
          Notifies the listener on a change in the CytoPanel state.
 void propertyChange(java.beans.PropertyChangeEvent e)
          respond to a PropertyChangeEvent.
 void setupUndoableAdditionEdit(cytoscape.CyNetwork net, cytoscape.CyNode node, cytoscape.CyEdge edge)
          sets up the undo/redo operations for an Add of a node or edge
 void stateChanged(javax.swing.event.ChangeEvent e)
          respond to a ChangeEvent, typically this is caused by switching visual styles
 void updateEditorPalette(cytoscape.visual.VisualStyle style)
          sets up editor and visual style and builds the ShapePalette
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CytoscapeEditorManagerSupport

public CytoscapeEditorManagerSupport()
register interest in NETWORK_VIEW_FOCUSED and NETWORK_VIEW_CREATED events

Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
respond to a ChangeEvent, typically this is caused by switching visual styles

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

onComponentSelected

public void onComponentSelected(int componentIndex)
respond to selection of a CytoPanels component, in particular respond to selection of a tab on the WEST CytoPanel.

Specified by:
onComponentSelected in interface cytoscape.view.cytopanels.CytoPanelListener

onStateChange

public void onStateChange(cytoscape.view.cytopanels.CytoPanelState newState)
Notifies the listener on a change in the CytoPanel state.

Specified by:
onStateChange in interface cytoscape.view.cytopanels.CytoPanelListener
Parameters:
newState - The new CytoPanel state - see CytoPanelState class.

onComponentAdded

public void onComponentAdded(int count)
Notifies the listener when a component is added to the CytoPanel.

Specified by:
onComponentAdded in interface cytoscape.view.cytopanels.CytoPanelListener
Parameters:
count - The number of components on the CytoPanel after the add.

onComponentRemoved

public void onComponentRemoved(int count)
Notifies the listener when a component is removed from the CytoPanel.

Specified by:
onComponentRemoved in interface cytoscape.view.cytopanels.CytoPanelListener
Parameters:
count - The number of components on the CytoPanel after the remove.

updateEditorPalette

public void updateEditorPalette(cytoscape.visual.VisualStyle style)
sets up editor and visual style and builds the ShapePalette

Parameters:
style -

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
respond to a PropertyChangeEvent. This is typically the Creation or Modification of a Network or NetworkView. If networkView focus changes, then bring up the appropriate editor for the enw network view.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

setupUndoableAdditionEdit

public void setupUndoableAdditionEdit(cytoscape.CyNetwork net,
                                      cytoscape.CyNode node,
                                      cytoscape.CyEdge edge)
sets up the undo/redo operations for an Add of a node or edge

Parameters:
net - network node/edge has been added to
node - the added node (null if the add operation was for an edge)
edge - the added edge (null if the add operation was for a node)

graphPerspectiveChanged

public void graphPerspectiveChanged(giny.model.GraphPerspectiveChangeEvent event)
Implementation of the GraphPerspectiveChangeListener interface. Responds to the removal of nodes and edges by saving them, so that they can be restored via RestoreDeleted action. Fires a NETWORK_MODIFIED event.

Specified by:
graphPerspectiveChanged in interface giny.model.GraphPerspectiveChangeListener