edu.umd.cs.jazz.event
Class ZSelectionDeleteHandler

java.lang.Object
  |
  +--edu.umd.cs.jazz.event.ZFilteredEventHandler
        |
        +--edu.umd.cs.jazz.event.ZSelectionDeleteHandler
All Implemented Interfaces:
ZEventHandler

public class ZSelectionDeleteHandler
extends ZFilteredEventHandler

ZSelectionDeleteHandler is a selection handler for use with a ZSelectionManager. ZSelectionDeleteHandler allows the user to delete the current selection by pressing the DEL key.

ZSelectionDeleteHandler also allows registration of ZGroupListener instances to be notified when items are deleted.

Author:
Antony Courtney, Yale University
, Lance Good, Univesity of Maryland , Benjamin Bederson, University of Maryland , Jesse Grosjean, University of Maryland
See Also:
ZSelectionManager, ZCompositeSelectionHandler

Nested Class Summary
 
Nested classes inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
ZFilteredEventHandler.ZFilteredEventDispatcher
 
Field Summary
 
Fields inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
fFilteredEventDispatcher, fMouseFilter
 
Constructor Summary
ZSelectionDeleteHandler(ZCanvas aFilteredKeyEventSouce)
          Constructs a new ZSelectionDeleteHandler.
ZSelectionDeleteHandler(ZNode aIgnoredNode, ZCamera aIgnoredCamera, ZCanvas aFilteredKeyEventSouce)
          Deprecated. As of Jazz version 1.2, use ZSelectionDeleteHandler(ZSceneGraphObject aEventSource) instead.
ZSelectionDeleteHandler(ZNode aIgnoredNode, ZCanvas aFilteredKeyEventSouce)
          Deprecated. As of Jazz version 1.2, use ZSelectionDeleteHandler(ZSceneGraphObject aEventSource) instead.
 
Method Summary
 void addGroupListener(ZGroupListener l)
          Add a ZGroupListener, registered for nodeRemoved events.
protected  void deleteSelection()
          Delete the current selection and fire ZGroupEvent.NODE_REMOVED events to each registered group listener.
 void filteredKeyPressed(java.awt.event.KeyEvent e)
          Invoked when a key is pressed on the key event souce and the event filter accepts the event.
protected  void fireEvent(ZEvent aEvent)
          Notifies all listeners that have registered interest for notification on this event type.
 void removeGroupListener(ZGroupListener l)
          Remove a ZGroupListener, registered for nodeRemoved events.
 
Methods inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
filteredKeyReleased, filteredKeyTyped, filteredMouseClicked, filteredMouseDragged, filteredMouseEntered, filteredMouseExited, filteredMouseMoved, filteredMousePressed, filteredMouseReleased, getCurrentFilteredMouseEvent, getCurrentSelection, getFilteredEventDispatcher, getFilteredKeyEventSource, getFilteredMouseEventSource, getInteractionCamera, getMouseFilter, getTopCamera, isActive, setActive, setFilteredKeyEventSource, setFilteredMouseEventSource, setMouseFilter, wantsKeyEvents, wantsMouseEvents, wantsMouseMotionEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZSelectionDeleteHandler

public ZSelectionDeleteHandler(ZCanvas aFilteredKeyEventSouce)
Constructs a new ZSelectionDeleteHandler.

Parameters:
aFilteredKeyEventSouce - the source for filtered KeyEvents. See the ZFilteredEventHandler class comment to customize this behavior.

ZSelectionDeleteHandler

public ZSelectionDeleteHandler(ZNode aIgnoredNode,
                               ZCanvas aFilteredKeyEventSouce)
Deprecated. As of Jazz version 1.2, use ZSelectionDeleteHandler(ZSceneGraphObject aEventSource) instead.


ZSelectionDeleteHandler

public ZSelectionDeleteHandler(ZNode aIgnoredNode,
                               ZCamera aIgnoredCamera,
                               ZCanvas aFilteredKeyEventSouce)
Deprecated. As of Jazz version 1.2, use ZSelectionDeleteHandler(ZSceneGraphObject aEventSource) instead.

Method Detail

filteredKeyPressed

public void filteredKeyPressed(java.awt.event.KeyEvent e)
Invoked when a key is pressed on the key event souce and the event filter accepts the event.

Overrides:
filteredKeyPressed in class ZFilteredEventHandler
Parameters:
e - the filtered key pressed event accepted by the event filter.

deleteSelection

protected void deleteSelection()
Delete the current selection and fire ZGroupEvent.NODE_REMOVED events to each registered group listener.


addGroupListener

public void addGroupListener(ZGroupListener l)
Add a ZGroupListener, registered for nodeRemoved events.


removeGroupListener

public void removeGroupListener(ZGroupListener l)
Remove a ZGroupListener, registered for nodeRemoved events.


fireEvent

protected void fireEvent(ZEvent aEvent)
Notifies all listeners that have registered interest for notification on this event type.

See Also:
EventListenerList


Copyright 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.