ij.ImageJ.keyPressed()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中ij.ImageJ.keyPressed()方法的一些代码示例,展示了ImageJ.keyPressed()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageJ.keyPressed()方法的具体详情如下:
包路径:ij.ImageJ
类名称:ImageJ
方法名:keyPressed

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);

相关文章