本文整理了Java中ij.ImageJ.getMenuBar()
方法的一些代码示例,展示了ImageJ.getMenuBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageJ.getMenuBar()
方法的具体详情如下:
包路径:ij.ImageJ
类名称:ImageJ
方法名:getMenuBar
暂无
代码示例来源:origin: net.imagej/imagej-legacy
public MenuBar getMenuBar() {
final ImageJ ij1 = hasInstance() ? IJ.getInstance() : null;
return ij1 == null ? null : ij1.getMenuBar();
}
代码示例来源:origin: sc.fiji/fiji-compat
static Runnable getX11Opener() throws NoSuchMethodException {
@SuppressWarnings("deprecation")
final Method method = IJ.getInstance().getMenuBar()
.getPeer().getClass()
.getDeclaredMethod("handleF10KeyPress",
new Class[] { KeyEvent.class });
method.setAccessible(true);
return new Runnable() {
@SuppressWarnings("deprecation")
@Override
public void run() {
final ImageJ ij = IJ.getInstance();
if (ij == null ||!ij.isFocused()) return;
KeyEvent event = new KeyEvent(IJ.getInstance(),
KeyEvent.VK_F10,
System.currentTimeMillis(), 0,
KeyEvent.VK_F10,
KeyEvent.CHAR_UNDEFINED);
try {
method.invoke(ij.getMenuBar().getPeer(),
new Object[] { event });
} catch (Exception e) { /* ignore */ }
}
};
}
代码示例来源:origin: sc.fiji/fiji-compat
@SuppressWarnings("deprecation")
@Override
public void run() {
final ImageJ ij = IJ.getInstance();
if (ij == null ||!ij.isFocused()) return;
KeyEvent event = new KeyEvent(IJ.getInstance(),
KeyEvent.VK_F10,
System.currentTimeMillis(), 0,
KeyEvent.VK_F10,
KeyEvent.CHAR_UNDEFINED);
try {
method.invoke(ij.getMenuBar().getPeer(),
new Object[] { event });
} catch (Exception e) { /* ignore */ }
}
};
代码示例来源:origin: net.imagej/ij
public void windowActivated(WindowEvent e) {
if (IJ.isMacintosh() && !quitting) {
IJ.wait(10); // may be needed for Java 1.4 on OS X
MenuBar mb = Menus.getMenuBar();
if (mb!=null && mb!=getMenuBar()) {
setMenuBar(mb);
Menus.setMenuBarCount++;
if (IJ.debugMode) IJ.log("setMenuBar: "+Menus.setMenuBarCount);
}
}
}
代码示例来源:origin: imagej/ImageJA
public void windowActivated(WindowEvent e) {
if (IJ.isMacintosh() && !quitting) {
IJ.wait(10); // may be needed for Java 1.4 on OS X
MenuBar mb = Menus.getMenuBar();
if (mb!=null && mb!=getMenuBar()) {
setMenuBar(mb);
Menus.setMenuBarCount++;
if (IJ.debugMode) IJ.log("setMenuBar: "+Menus.setMenuBarCount);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!