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 TypeMethodDescriptionboolean
activate()
void
getModel()
boolean
void
modelChanged
(MagicWandModel model, boolean recomputeMask) void
mouseClicked
(MouseEvent event) void
setModelModified
(boolean modelModified) void
setUndoContext
(com.bc.ceres.swing.undo.UndoContext undoContext) Methods inherited from class com.bc.ceres.swing.figure.ViewportInteractor
getModelToViewTransform, getViewport, getViewToModelTransform, toModelPoint, toModelPoint, toModelShape
Methods 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:
modelChanged
in interfaceMagicWandModel.Listener
-
getOptionsWindow
-
activate
public boolean activate()- Specified by:
activate
in interfacecom.bc.ceres.swing.figure.Interactor
- Overrides:
activate
in classcom.bc.ceres.swing.figure.AbstractInteractor
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfacecom.bc.ceres.swing.figure.Interactor
- Overrides:
deactivate
in classcom.bc.ceres.swing.figure.AbstractInteractor
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classcom.bc.ceres.swing.figure.AbstractInteractor
-
getModel
-
setUndoContext
public void setUndoContext(com.bc.ceres.swing.undo.UndoContext undoContext)
-