当前位置: 首页>>代码示例>>Java>>正文


Java ImageCanvas.addMouseListener方法代码示例

本文整理汇总了Java中ij.gui.ImageCanvas.addMouseListener方法的典型用法代码示例。如果您正苦于以下问题:Java ImageCanvas.addMouseListener方法的具体用法?Java ImageCanvas.addMouseListener怎么用?Java ImageCanvas.addMouseListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ij.gui.ImageCanvas的用法示例。


在下文中一共展示了ImageCanvas.addMouseListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createListeners

import ij.gui.ImageCanvas; //导入方法依赖的package包/类
private void createListeners() {
    //IJ.log("createListeners");
    if(srcImp == null) {
        return;
    }
    ImageCanvas canvas = srcImp.getCanvas();
    if(canvas == null) {
        return;
    }
    canvas.addMouseListener(this);
    canvas.addMouseMotionListener(this);
    canvas.addKeyListener(this);
    ImagePlus.addImageListener(this);
    Font font = live.getFont();
    live.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
    live.setForeground(Color.red);
}
 
开发者ID:zitmen,项目名称:thunderstorm,代码行数:18,代码来源:IJHistogramWindow.java

示例2: 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());
	}
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:19,代码来源:PointHandler.java

示例3: 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());
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:12,代码来源:UnwarpJ_.java

示例4: 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();
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:29,代码来源:UnwarpJ_.java

示例5: 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.
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:36,代码来源:PointHandler.java


注:本文中的ij.gui.ImageCanvas.addMouseListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。