本文整理汇总了Java中ij.gui.ImageCanvas.removeKeyListener方法的典型用法代码示例。如果您正苦于以下问题:Java ImageCanvas.removeKeyListener方法的具体用法?Java ImageCanvas.removeKeyListener怎么用?Java ImageCanvas.removeKeyListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.gui.ImageCanvas
的用法示例。
在下文中一共展示了ImageCanvas.removeKeyListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: killListeners
import ij.gui.ImageCanvas; //导入方法依赖的package包/类
/**
* Kill listeners.
*/
public void killListeners ()
{
if(imp != null)
{
final ImageWindow iw = imp.getWindow();
final ImageCanvas ic = iw.getCanvas();
ic.removeKeyListener(pa);
ic.removeMouseListener(pa);
ic.removeMouseMotionListener(pa);
ic.addMouseMotionListener(ic);
ic.addMouseListener(ic);
ic.addKeyListener(IJ.getInstance());
}
}
示例2: ImageCanvas3D
import ij.gui.ImageCanvas; //导入方法依赖的package包/类
public ImageCanvas3D(final int width, final int height, final UIAdapter uia) {
super(SimpleUniverse.getPreferredConfiguration());
this.ui = uia;
setPreferredSize(new Dimension(width, height));
final ByteProcessor ip = new ByteProcessor(width, height);
roiImagePlus = new RoiImagePlus("RoiImage", ip);
roiImageCanvas = new ImageCanvas(roiImagePlus) {
/* prevent ROI to enlarge/move on mouse click */
@Override
public void mousePressed(final MouseEvent e) {
if (!ui.isMagnifierTool() && !ui.isPointTool()) super.mousePressed(e);
}
};
roiImageCanvas.removeKeyListener(ij.IJ.getInstance());
roiImageCanvas.removeMouseListener(roiImageCanvas);
roiImageCanvas.removeMouseMotionListener(roiImageCanvas);
roiImageCanvas.disablePopupMenu(true);
background =
new Background(new Color3f(UniverseSettings.defaultBackground));
background.setCapability(Background.ALLOW_COLOR_WRITE);
addListeners();
}
示例3: removeListeners
import ij.gui.ImageCanvas; //导入方法依赖的package包/类
private void removeListeners() {
//IJ.log("removeListeners");
if(srcImp == null) {
return;
}
ImageCanvas canvas = srcImp.getCanvas();
canvas.removeMouseListener(this);
canvas.removeMouseMotionListener(this);
canvas.removeKeyListener(this);
ImagePlus.removeImageListener(this);
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize()));
live.setForeground(Color.black);
}
示例4: killListeners
import ij.gui.ImageCanvas; //导入方法依赖的package包/类
public void killListeners (
) {
final ImageWindow iw = imp.getWindow();
final ImageCanvas ic = iw.getCanvas();
ic.removeKeyListener(pa);
ic.removeMouseListener(pa);
ic.removeMouseMotionListener(pa);
ic.addMouseMotionListener(ic);
ic.addMouseListener(ic);
ic.addKeyListener(IJ.getInstance());
}
示例5: unwarpJPointHandler
import ij.gui.ImageCanvas; //导入方法依赖的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();
}
示例6: PointHandler
import ij.gui.ImageCanvas; //导入方法依赖的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.
}