diva.sketch
Class LassoSelectionAction

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

public class LassoSelectionAction
extends AbstractAction

This class encapsulates lasso-style selection operation for pen interaction.

Version:
$Revision: 1.3 $
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
LassoSelectionAction(BasicInterpreter interp)
          Construct a lasso selection 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 toggleSelection(List hitFigures)
          Toggle the selection state of the given figures.
 
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

LassoSelectionAction

public LassoSelectionAction(BasicInterpreter interp)
Construct a lasso selection 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.


toggleSelection

protected void toggleSelection(List hitFigures)
Toggle the selection state of the given figures. Implemented as a template method so that subclasses can override the behavior.



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