diva.sketch
Class DeletionAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by diva.sketch.DeletionAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class DeletionAction
extends AbstractAction

This class encapsulates a deletion operation for pen interaction.

Version:
$Revision: 1.4 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
DeletionAction(BasicInterpreter interp)
          Construct a deletion operator that executes within the given interpreter.
 
Method Summary
 void actionPerformed(ActionEvent evt)
          Treat the current stroke as a lasso selection if it is mostly closed.
protected  void deleteFigures(Iterator figures)
          Remove all of the figures in the given iterator.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeletionAction

public DeletionAction(BasicInterpreter interp)
Construct a deletion operator that executes within the given interpreter.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent evt)
Treat the current stroke as a lasso selection if it is mostly closed.


deleteFigures

protected void deleteFigures(Iterator figures)
Remove all of the figures in the given iterator.

Get the sketch model from the controller, iterate over the 'figures', retrieve the symbol from each figure's user object, and remove the symbol from the sketch model.



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