Package org.esa.snap.rcp.magicwand
Class MagicWandInteractor
java.lang.Object
com.bc.ceres.swing.figure.AbstractInteractor
com.bc.ceres.swing.figure.ViewportInteractor
org.esa.snap.rcp.magicwand.MagicWandInteractor
- All Implemented Interfaces:
com.bc.ceres.swing.figure.Interactor,KeyListener,MouseListener,MouseMotionListener,EventListener,MagicWandModel.Listener
public class MagicWandInteractor
extends com.bc.ceres.swing.figure.ViewportInteractor
implements MagicWandModel.Listener
An interactor that lets users create masks using a "magic wand".
The mask comprises all pixels in the image that are "spectrally" close to the pixel that
has been selected using the magic wand.
- Since:
- BEAM 4.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivate()voidgetModel()booleanvoidmodelChanged(MagicWandModel model, boolean recomputeMask) voidmouseClicked(MouseEvent event) voidsetModelModified(boolean modelModified) voidsetUndoContext(com.bc.ceres.swing.undo.UndoContext undoContext) Methods inherited from class com.bc.ceres.swing.figure.ViewportInteractor
getModelToViewTransform, getViewport, getViewToModelTransform, toModelPoint, toModelPoint, toModelShapeMethods inherited from class com.bc.ceres.swing.figure.AbstractInteractor
addListener, cancelInteraction, getCursor, getListeners, isActive, isLeftMouseButtonDown, isMultiButton1Click, isSingleButton1Click, keyPressed, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, removeListener, startInteraction, stopInteraction
-
Constructor Details
-
MagicWandInteractor
public MagicWandInteractor()
-
-
Method Details
-
isModelModified
public boolean isModelModified() -
setModelModified
public void setModelModified(boolean modelModified) -
modelChanged
- Specified by:
modelChangedin interfaceMagicWandModel.Listener
-
getOptionsWindow
-
activate
public boolean activate()- Specified by:
activatein interfacecom.bc.ceres.swing.figure.Interactor- Overrides:
activatein classcom.bc.ceres.swing.figure.AbstractInteractor
-
deactivate
public void deactivate()- Specified by:
deactivatein interfacecom.bc.ceres.swing.figure.Interactor- Overrides:
deactivatein classcom.bc.ceres.swing.figure.AbstractInteractor
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classcom.bc.ceres.swing.figure.AbstractInteractor
-
getModel
-
setUndoContext
public void setUndoContext(com.bc.ceres.swing.undo.UndoContext undoContext)
-