本文整理了Java中ij.ImageJ.keyPressed()
方法的一些代码示例,展示了ImageJ.keyPressed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageJ.keyPressed()
方法的具体详情如下:
包路径:ij.ImageJ
类名称:ImageJ
方法名:keyPressed
暂无
代码示例来源:origin: net.imagej/ij
public void keyPressed (KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
IJ.getInstance().keyPressed(e);
}
代码示例来源:origin: imagej/ImageJA
public void keyPressed (KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
IJ.getInstance().keyPressed(e);
}
代码示例来源:origin: net.imagej/ij
public void keyPressed(KeyEvent e) {
boolean thisPanel = e.getSource() instanceof PixelInspector;
if (thisPanel && e.getKeyCode()==KeyEvent.VK_C) {
copyToClipboard();
return;
}
if (e.getKeyCode()==KeyEvent.VK_UP && y0 > 0) {
y0--; update(FULL_UPDATE);
} else if (e.getKeyCode()==KeyEvent.VK_DOWN && y0<imp.getHeight()-1) {
y0++; update(FULL_UPDATE);
} else if (e.getKeyCode()==KeyEvent.VK_LEFT && x0>0) {
x0--; update(FULL_UPDATE);
} else if (e.getKeyCode()==KeyEvent.VK_RIGHT && x0<imp.getWidth()-1) {
x0++; update(FULL_UPDATE);
} else if (e.getSource() instanceof Button)
ij.keyPressed(e); //forward other keys from the panel to ImageJ
Overlay overlay = imp.getOverlay();
if (overlay==null) return;
int index = getIndex(overlay, TITLE);
if (index>=0) {
overlay.remove(index);
Roi roi = new Roi(x0-radius, y0-radius, radius*2+1, radius*2+1);
roi.setName(TITLE);
roi.setStrokeColor(Color.red);
overlay.add(roi);
imp.setOverlay(overlay);
}
}
代码示例来源:origin: imagej/ImageJA
public void keyPressed(KeyEvent e) {
boolean thisPanel = e.getSource() instanceof PixelInspector;
if (thisPanel && e.getKeyCode()==KeyEvent.VK_C) {
copyToClipboard();
return;
}
if (e.getKeyCode()==KeyEvent.VK_UP && y0 > 0) {
y0--; update(FULL_UPDATE);
} else if (e.getKeyCode()==KeyEvent.VK_DOWN && y0<imp.getHeight()-1) {
y0++; update(FULL_UPDATE);
} else if (e.getKeyCode()==KeyEvent.VK_LEFT && x0>0) {
x0--; update(FULL_UPDATE);
} else if (e.getKeyCode()==KeyEvent.VK_RIGHT && x0<imp.getWidth()-1) {
x0++; update(FULL_UPDATE);
} else if (e.getSource() instanceof Button)
ij.keyPressed(e); //forward other keys from the panel to ImageJ
Overlay overlay = imp.getOverlay();
if (overlay==null) return;
int index = getIndex(overlay, TITLE);
if (index>=0) {
overlay.remove(index);
Roi roi = new Roi(x0-radius, y0-radius, radius*2+1, radius*2+1);
roi.setName(TITLE);
roi.setStrokeColor(Color.red);
overlay.add(roi);
imp.setOverlay(overlay);
}
}
代码示例来源:origin: sc.fiji/TrakEM2_
IJ.getInstance().keyPressed(ke);
return;
IJ.getInstance().keyPressed(ke);
repaint(active, 5);
ke.consume();
代码示例来源:origin: sc.fiji/3D_Viewer
code == KeyEvent.VK_ENTER) IJ.getInstance().keyPressed(e);
内容来源于网络,如有侵权,请联系作者删除!