本文整理汇总了Java中ij.gui.ImageWindow.removeKeyListener方法的典型用法代码示例。如果您正苦于以下问题:Java ImageWindow.removeKeyListener方法的具体用法?Java ImageWindow.removeKeyListener怎么用?Java ImageWindow.removeKeyListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.gui.ImageWindow
的用法示例。
在下文中一共展示了ImageWindow.removeKeyListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cancelSource
import ij.gui.ImageWindow; //导入方法依赖的package包/类
private double[][] cancelSource(final turboRegPointHandler sourcePh)
{
stopSourceThreads();
if (sourceScrollbar != null)
{
sourceScrollbar.removeAdjustmentListener(sourcePa);
sourceScrollbar = null;
}
final ImageWindow iw = sourceImp.getWindow();
iw.removeKeyListener(sourcePa);
sourceIc.removeKeyListener(sourcePa);
sourceIc.removeMouseMotionListener(sourcePa);
sourceIc.removeMouseListener(sourcePa);
sourceIc.addMouseListener(sourceIc);
sourceIc.addMouseMotionListener(sourceIc);
sourceIc.addKeyListener(IJ.getInstance());
iw.addKeyListener(IJ.getInstance());
sourceIc = null;
sourceImp.killRoi();
sourceImp.updateAndDraw();
sourceImp = null;
sourceImg = null;
sourceMsk = null;
sourcePa = null;
sourceScrollbar = null;
return (sourcePh.getPoints());
}
示例2: cancelTarget
import ij.gui.ImageWindow; //导入方法依赖的package包/类
private double[][] cancelTarget(final turboRegPointHandler targetPh)
{
stopTargetThreads();
if (targetScrollbar != null)
{
targetScrollbar.removeAdjustmentListener(targetPa);
targetScrollbar = null;
}
final ImageWindow iw = targetImp.getWindow();
iw.removeKeyListener(targetPa);
targetIc.removeKeyListener(targetPa);
targetIc.removeMouseMotionListener(targetPa);
targetIc.removeMouseListener(targetPa);
targetIc.addMouseListener(targetIc);
targetIc.addMouseMotionListener(targetIc);
targetIc.addKeyListener(IJ.getInstance());
iw.addKeyListener(IJ.getInstance());
targetIc = null;
targetImp.killRoi();
targetImp.updateAndDraw();
targetImp = null;
targetImg = null;
targetMsk = null;
targetPa = null;
targetScrollbar = null;
return (targetPh.getPoints());
}
示例3: unwarpJPointHandler
import ij.gui.ImageWindow; //导入方法依赖的package包/类
public unwarpJPointHandler (
final ImagePlus imp,
final unwarpJPointToolbar tb,
final unwarpJMask mask,
final unwarpJDialog dialog
) {
super(0, 0, imp.getWidth(), imp.getHeight(), imp);
this.imp = imp;
this.tb = tb;
this.dialog=dialog;
pa = new unwarpJPointAction(imp, this, tb, dialog);
final ImageWindow iw = imp.getWindow();
final ImageCanvas ic = iw.getCanvas();
iw.requestFocus();
iw.removeKeyListener(IJ.getInstance());
iw.addKeyListener(pa);
ic.removeMouseMotionListener(ic);
ic.removeMouseListener(ic);
ic.removeKeyListener(IJ.getInstance());
ic.addKeyListener(pa);
ic.addMouseListener(pa);
ic.addMouseMotionListener(pa);
setSpectrum();
started = true;
this.mask=mask;
clearMask();
}
示例4: PointHandler
import ij.gui.ImageWindow; //导入方法依赖的package包/类
/**
* Constructor with graphical capabilities, create an instance of PointHandler.
*
* @param imp pointer to the image
* @param tb pointer to the toolbar
* @param mask pointer to the mask
* @param dialog pointer to the bUnwarpJ dialog
*/
public PointHandler (
final ImagePlus imp,
final PointToolbar tb,
final Mask mask,
final MainDialog dialog)
{
super(0, 0, imp.getWidth(), imp.getHeight(), imp);
this.imp = imp;
this.tb = tb;
this.dialog = dialog;
this.pa = new PointAction(imp, this, tb, dialog);
final ImageWindow iw = imp.getWindow();
final ImageCanvas ic = iw.getCanvas();
//iw.requestFocus();
iw.removeKeyListener(IJ.getInstance());
iw.addKeyListener(pa);
ic.removeMouseMotionListener(ic);
ic.removeMouseListener(ic);
ic.removeKeyListener(IJ.getInstance());
ic.addKeyListener(pa);
ic.addMouseListener(pa);
ic.addMouseMotionListener(pa);
started = true;
this.mask = mask;
//clearMask(); // This line was commented to allow loading masks from the second slice of a stack.
}