本文整理了Java中javax.swing.JMenu.setOpaque()
方法的一些代码示例,展示了JMenu.setOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.setOpaque()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:setOpaque
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setOpaque(boolean aValue) {
super.setOpaque(aValue);
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Returns the <code>JMenu</code> displaying the appropriate menu items for
* manipulating the Frame.
*
* @return <code>JMenu</code> displaying the appropriate menu items for
* manipulating the Frame.
*/
private JMenu createMenu() {
JMenu menu = new JMenu("");
menu.setOpaque(false);
menu.setBackground(null);
if (this.getWindowDecorationStyle() == JRootPane.FRAME) {
this.addMenuItems(menu);
}
return menu;
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JMenu menu = (JMenu) c;
menu.setFont (UIManager.getFont ("Menu.font"));
menu.setBorder (UIManager.getBorder ("Menu.border"));
menu.setBackground (UIManager.getColor ("Menu.background"));
menu.setForeground (UIManager.getColor ("Menu.foreground"));
menu.setOpaque (UIManager.getBoolean ("Menu.opaque"));
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Returns the <code>JMenu</code> displaying the appropriate menu items for
* manipulating the Frame.
*
* @return <code>JMenu</code> displaying the appropriate menu items for
* manipulating the Frame.
*/
private JMenu createMenu() {
JMenu menu = new JMenu("");
menu.setOpaque(false);
menu.setBackground(null);
//if (this.getWindowDecorationStyle() == JRootPane.FRAME) {
this.addMenuItems(menu);
//}
menu.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() > 1) {
closeAction.actionPerformed(new ActionEvent(e.getSource(),
ActionEvent.ACTION_PERFORMED, null,
EventQueue.getMostRecentEventTime(), e.getModifiers()));
}
}
});
return menu;
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
public void update( Graphics g, JComponent c) {
JMenu menu = (JMenu)c;
if ( menu.isTopLevelMenu() ) {
menu.setOpaque( false);
ButtonModel model = menu.getModel();
if ( model.isArmed() || model.isSelected() ) {
g.setColor( NimRODLookAndFeel.getFocusColor());
g.fillRoundRect( 1,1, c.getWidth()-2, c.getHeight()-3, 2,2);
}
}
else {
menuItem.setBorderPainted( false);
menuItem.setOpaque( false);
}
super.update( g, c);
}
内容来源于网络,如有侵权,请联系作者删除!