本文整理了Java中ij.ImageJ.addKeyListener()
方法的一些代码示例,展示了ImageJ.addKeyListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageJ.addKeyListener()
方法的具体详情如下:
包路径:ij.ImageJ
类名称:ImageJ
方法名:addKeyListener
暂无
代码示例来源:origin: sc.fiji/fiji-lib
ij.addKeyListener(this);
for (Component component : ij.getComponents())
component.addKeyListener(this);
代码示例来源:origin: axtimwalde/mpicbg
/**
* Add new event handlers.
*/
final void takeOverGui()
{
canvas.addKeyListener( Stack_Rotate.this );
window.addKeyListener( Stack_Rotate.this );
canvas.addMouseMotionListener( Stack_Rotate.this );
canvas.addMouseListener( Stack_Rotate.this );
ij.addKeyListener( Stack_Rotate.this );
window.addMouseWheelListener( Stack_Rotate.this );
scrollBar.addAdjustmentListener( Stack_Rotate.this );
updateScrollBar();
}
代码示例来源:origin: mpicbg/mpicbg_
/**
* Add new event handlers.
*/
final void takeOverGui()
{
canvas.addKeyListener( Stack_Rotate.this );
window.addKeyListener( Stack_Rotate.this );
canvas.addMouseMotionListener( Stack_Rotate.this );
canvas.addMouseListener( Stack_Rotate.this );
ij.addKeyListener( Stack_Rotate.this );
window.addMouseWheelListener( Stack_Rotate.this );
scrollBar.addAdjustmentListener( Stack_Rotate.this );
updateScrollBar();
}
代码示例来源:origin: sc.fiji/fiji-compat
@Override
public void run() {
if (IJ.getInstance() == null) return;
if (removeRegisteredListeners()) {
if (IJ.debugMode)
IJ.showStatus("Alt Key listener removed.");
return;
}
if (openMenu != null) {
ImageJ ij = IJ.getInstance();
ij.addKeyListener(this);
ij.addFocusListener(this);
if (IJ.debugMode)
IJ.showStatus("Alt Key listener installed.");
}
}
代码示例来源:origin: axtimwalde/mpicbg
/**
* Restore the previously active Event handlers.
*/
final void restoreGui()
{
clearGui();
for ( final KeyListener l : canvasKeyListeners )
canvas.addKeyListener( l );
for ( final KeyListener l : windowKeyListeners )
window.addKeyListener( l );
for ( final KeyListener l : ijKeyListeners )
ij.addKeyListener( l );
for ( final MouseListener l : canvasMouseListeners )
canvas.addMouseListener( l );
for ( final MouseMotionListener l : canvasMouseMotionListeners )
canvas.addMouseMotionListener( l );
for ( final MouseWheelListener l : windowMouseWheelListeners )
window.addMouseWheelListener( l );
for ( final AdjustmentListener l : scrollBarAdjustmentListeners )
scrollBar.addAdjustmentListener( l );
scrollBar.setValues( scrollBarValue, scrollBarVisible, scrollBarMin, scrollBarMax );
}
代码示例来源:origin: mpicbg/mpicbg_
/**
* Restore the previously active Event handlers.
*/
final void restoreGui()
{
clearGui();
for ( final KeyListener l : canvasKeyListeners )
canvas.addKeyListener( l );
for ( final KeyListener l : windowKeyListeners )
window.addKeyListener( l );
for ( final KeyListener l : ijKeyListeners )
ij.addKeyListener( l );
for ( final MouseListener l : canvasMouseListeners )
canvas.addMouseListener( l );
for ( final MouseMotionListener l : canvasMouseMotionListeners )
canvas.addMouseMotionListener( l );
for ( final MouseWheelListener l : windowMouseWheelListeners )
window.addMouseWheelListener( l );
for ( final AdjustmentListener l : scrollBarAdjustmentListeners )
scrollBar.addAdjustmentListener( l );
scrollBar.setValues( scrollBarValue, scrollBarVisible, scrollBarMin, scrollBarMax );
}
代码示例来源:origin: mpicbg/mpicbg
@Override
public void run( final String arg )
{
ij = IJ.getInstance();
imp = IJ.getImage();
window = imp.getWindow();
canvas = imp.getCanvas();
canvas.addKeyListener( this );
window.addKeyListener( this );
canvas.addMouseMotionListener( this );
canvas.addMouseListener( this );
ij.addKeyListener( this );
init();
imp.getProcessor().snapshot();
Toolbar.getInstance().setTool( Toolbar.LINE );
painter = new PaintThread();
painter.start();
}
代码示例来源:origin: mpicbg/mpicbg
@Override
public void run( String arg )
{
ij = IJ.getInstance();
imp = IJ.getImage();
window = imp.getWindow();
canvas = imp.getCanvas();
canvas.addKeyListener( this );
window.addKeyListener( this );
canvas.addMouseMotionListener( this );
canvas.addMouseListener( this );
ij.addKeyListener( this );
init();
imp.getProcessor().snapshot();
Toolbar.getInstance().setTool( Toolbar.RECTANGLE );
painter = new PaintThread();
painter.start();
}
代码示例来源:origin: axtimwalde/mpicbg
@Override
public void run( final String arg )
{
ij = IJ.getInstance();
imp = IJ.getImage();
window = imp.getWindow();
canvas = imp.getCanvas();
canvas.addKeyListener( this );
window.addKeyListener( this );
canvas.addMouseMotionListener( this );
canvas.addMouseListener( this );
ij.addKeyListener( this );
init();
imp.getProcessor().snapshot();
Toolbar.getInstance().setTool( Toolbar.LINE );
painter = new PaintThread();
painter.start();
}
代码示例来源:origin: axtimwalde/mpicbg
@Override
public void run( String arg )
{
ij = IJ.getInstance();
imp = IJ.getImage();
window = imp.getWindow();
canvas = imp.getCanvas();
canvas.addKeyListener( this );
window.addKeyListener( this );
canvas.addMouseMotionListener( this );
canvas.addMouseListener( this );
ij.addKeyListener( this );
init();
imp.getProcessor().snapshot();
Toolbar.getInstance().setTool( Toolbar.RECTANGLE );
painter = new PaintThread();
painter.start();
}
代码示例来源:origin: mpicbg/mpicbg
@Override
public void run( final String arg )
{
/* cleanup */
m.clear();
imp = IJ.getImage();
target = imp.getProcessor();
source = target.duplicate();
source.setInterpolationMethod( ImageProcessor.BILINEAR );
init();
createMapping();
painter = new MappingThread(
imp,
source,
target,
pleaseRepaint,
mapping,
interpolate );
painter.start();
Toolbar.getInstance().setTool( Toolbar.getInstance().addTool( "Add_and_drag_handles." ) );
imp.getCanvas().addMouseListener( this );
imp.getCanvas().addMouseMotionListener( this );
imp.getCanvas().addKeyListener( this );
imp.getWindow().addKeyListener( this );
IJ.getInstance().addKeyListener( this );
}
代码示例来源:origin: axtimwalde/mpicbg
@Override
public void run( final String arg )
{
/* cleanup */
m.clear();
imp = IJ.getImage();
target = imp.getProcessor();
source = target.duplicate();
source.setInterpolationMethod( ImageProcessor.BILINEAR );
init();
createMapping();
painter = new MappingThread(
imp,
source,
target,
pleaseRepaint,
mapping,
interpolate );
painter.start();
Toolbar.getInstance().setTool( Toolbar.getInstance().addTool( "Add_and_drag_handles." ) );
imp.getCanvas().addMouseListener( this );
imp.getCanvas().addMouseMotionListener( this );
imp.getCanvas().addKeyListener( this );
imp.getWindow().addKeyListener( this );
IJ.getInstance().addKeyListener( this );
}
代码示例来源:origin: axtimwalde/mpicbg
@Override
public void run( String arg )
{
ij = IJ.getInstance();
imp = IJ.getImage();
if ( imp.getStackSize() < 2 )
{
IJ.error( "This plugin only works on stacks with at least two slices." );
return;
}
window = imp.getWindow();
canvas = imp.getCanvas();
canvas.addKeyListener( this );
window.addKeyListener( this );
canvas.addMouseMotionListener( this );
canvas.addMouseListener( this );
ij.addKeyListener( this );
init();
imp.getProcessor().snapshot();
Toolbar.getInstance().setTool( Toolbar.RECTANGLE );
painter = new PaintThread();
painter.start();
}
代码示例来源:origin: mpicbg/mpicbg
@Override
public void run( String arg )
{
ij = IJ.getInstance();
imp = IJ.getImage();
if ( imp.getStackSize() < 2 )
{
IJ.error( "This plugin only works on stacks with at least two slices." );
return;
}
window = imp.getWindow();
canvas = imp.getCanvas();
canvas.addKeyListener( this );
window.addKeyListener( this );
canvas.addMouseMotionListener( this );
canvas.addMouseListener( this );
ij.addKeyListener( this );
init();
imp.getProcessor().snapshot();
Toolbar.getInstance().setTool( Toolbar.RECTANGLE );
painter = new PaintThread();
painter.start();
}
代码示例来源:origin: sc.fiji/Image_5D
ij.addKeyListener(this);
final int nIJComponents = ij.getComponentCount();
for (int i = 0; i < nIJComponents; i++) {
代码示例来源:origin: net.imagej/ij
addKeyListener(this);
addWindowListener(this);
setFocusTraversalKeysEnabled(false);
代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer
IJ.getInstance().addKeyListener(IJ.getInstance());
代码示例来源:origin: imagej/ImageJA
addKeyListener(this);
addWindowListener(this);
setFocusTraversalKeysEnabled(false);
内容来源于网络,如有侵权,请联系作者删除!