diva.graphx.toolbox
Class DeletionListener

java.lang.Object
  extended by diva.graphx.toolbox.DeletionListener
All Implemented Interfaces:
ActionListener, EventListener

public class DeletionListener
extends Object
implements ActionListener

This class provides deletion support for most simple graph editors. Associate this class with some action (such as a key press on an instance of the JCanvas class). Any nodes or edges in the selection model of the graph pane's controller will be removed.

Version:
$Revision: 1.4 $
Author:
Steve Neuendorffer, John Reekie

Constructor Summary
DeletionListener(GraphController gc)
          Create a new listener but don't attach it to anything.
DeletionListener(GraphController gc, JCanvas canvas)
          Create a new listener and attach it to the given JCanvas.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Delete any nodes or edges from the graph that are currently selected.
 DeletionPolicy getDeletionPolicy()
          Get the delation policy
 void setDeletionPolicy(DeletionPolicy p)
          Set the deletion policy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeletionListener

public DeletionListener(GraphController gc)
Create a new listener but don't attach it to anything.


DeletionListener

public DeletionListener(GraphController gc,
                        JCanvas canvas)
Create a new listener and attach it to the given JCanvas.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Delete any nodes or edges from the graph that are currently selected.

Specified by:
actionPerformed in interface ActionListener

getDeletionPolicy

public DeletionPolicy getDeletionPolicy()
Get the delation policy


setDeletionPolicy

public void setDeletionPolicy(DeletionPolicy p)
Set the deletion policy



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.