本文整理了Java中java.awt.PopupMenu.setFont()
方法的一些代码示例,展示了PopupMenu.setFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PopupMenu.setFont()
方法的具体详情如下:
包路径:java.awt.PopupMenu
类名称:PopupMenu
方法名:setFont
暂无
代码示例来源:origin: i2p/i2p.i2p
private TrayIcon getAWTTrayIcon(String tooltip) throws AWTException {
PopupMenu menu = getMainMenu();
if (!SystemVersion.isWindows())
menu.setFont(new Font("Arial", Font.BOLD, 14));
TrayIcon ti = new TrayIcon(getTrayImage(), tooltip, menu);
ti.addMouseListener(new MouseListener() {
public void mouseClicked(MouseEvent m) {}
public void mouseEntered(MouseEvent m) {}
public void mouseExited(MouseEvent m) {}
public void mousePressed(MouseEvent m) { updateMenu(); }
public void mouseReleased(MouseEvent m) { updateMenu(); }
});
return ti;
}
代码示例来源:origin: net.imagej/ij
public static void updateFont() {
scale = (int)Math.round(Prefs.getGuiScale());
Font font = getFont();
mbar.setFont(font);
if (ij!=null)
ij.setMenuBar(mbar);
popup.setFont(font);
}
代码示例来源:origin: imagej/ImageJA
public static void updateFont() {
scale = (int)Math.round(Prefs.getGuiScale());
Font font = getFont();
mbar.setFont(font);
if (ij!=null)
ij.setMenuBar(mbar);
popup.setFont(font);
}
代码示例来源:origin: net.imagej/ij
void installPopupMenu(ImageJ ij) {
String s;
int count = 0;
MenuItem mi;
popup = new PopupMenu("");
if (fontSize!=0 || scale>1.0)
popup.setFont(getFont());
while (true) {
count++;
s = Prefs.getString("popup" + (count/10)%10 + count%10);
if (s==null)
break;
if (s.equals("-"))
popup.addSeparator();
else if (!s.equals("")) {
mi = new MenuItem(s);
mi.addActionListener(ij);
popup.add(mi);
}
}
}
代码示例来源:origin: imagej/ImageJA
void installPopupMenu(ImageJ ij) {
String s;
int count = 0;
MenuItem mi;
popup = new PopupMenu("");
if (fontSize!=0 || scale>1.0)
popup.setFont(getFont());
while (true) {
count++;
s = Prefs.getString("popup" + (count/10)%10 + count%10);
if (s==null)
break;
if (s.equals("-"))
popup.addSeparator();
else if (!s.equals("")) {
mi = new MenuItem(s);
mi.addActionListener(ij);
popup.add(mi);
}
}
}
代码示例来源:origin: net.imagej/ij
menus[tool] = new PopupMenu("");
if (Menus.getFontSize()!=0)
menus[tool].setFont(Menus.getFont());
add(menus[tool] );
} else
代码示例来源:origin: imagej/ImageJA
menus[tool] = new PopupMenu("");
if (Menus.getFontSize()!=0)
menus[tool].setFont(Menus.getFont());
add(menus[tool] );
} else
代码示例来源:origin: tonikelope/megabasterd
menu.setFont(new_font.deriveFont(Font.BOLD, Math.round(14 * ZOOM_FACTOR)));
代码示例来源:origin: net.imagej/ij
void addPopupMenus() {
rectPopup = new PopupMenu();
if (Menus.getFontSize()!=0)
rectPopup.setFont(Menus.getFont());
rectItem = new CheckboxMenuItem("Rectangle", rectType==RECT_ROI);
rectItem.addItemListener(this);
ovalPopup.setFont(Menus.getFont());
ovalItem = new CheckboxMenuItem("Oval selections", ovalType==OVAL_ROI);
ovalItem.addItemListener(this);
pointPopup.setFont(Menus.getFont());
pointItem = new CheckboxMenuItem("Point Tool", !multiPointMode);
pointItem.addItemListener(this);
linePopup.setFont(Menus.getFont());
straightLineItem = new CheckboxMenuItem("Straight Line", lineType==LINE&&!arrowMode);
straightLineItem.addItemListener(this);
switchPopup.setFont(Menus.getFont());
add(switchPopup);
代码示例来源:origin: imagej/ImageJA
void addPopupMenus() {
rectPopup = new PopupMenu();
if (Menus.getFontSize()!=0)
rectPopup.setFont(Menus.getFont());
rectItem = new CheckboxMenuItem("Rectangle", rectType==RECT_ROI);
rectItem.addItemListener(this);
ovalPopup.setFont(Menus.getFont());
ovalItem = new CheckboxMenuItem("Oval selections", ovalType==OVAL_ROI);
ovalItem.addItemListener(this);
pointPopup.setFont(Menus.getFont());
pointItem = new CheckboxMenuItem("Point Tool", !multiPointMode);
pointItem.addItemListener(this);
linePopup.setFont(Menus.getFont());
straightLineItem = new CheckboxMenuItem("Straight Line", lineType==LINE&&!arrowMode);
straightLineItem.addItemListener(this);
switchPopup.setFont(Menus.getFont());
add(switchPopup);
内容来源于网络,如有侵权,请联系作者删除!