本文整理了Java中javax.swing.JMenuBar.setOpaque()
方法的一些代码示例,展示了JMenuBar.setOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenuBar.setOpaque()
方法的具体详情如下:
包路径:javax.swing.JMenuBar
类名称:JMenuBar
方法名:setOpaque
暂无
代码示例来源:origin: ron190/jsql-injection
panelLineBottom.setOpaque(false);
panelLineBottom.setBorder(null);
panelLineBottom.setPreferredSize(new Dimension(0, 26));
代码示例来源:origin: ron190/jsql-injection
menuBarVendor.setOpaque(false);
menuBarVendor.setBorder(null);
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setOpaque(boolean aValue) {
super.setOpaque(aValue);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/**
* Returns the <code>JMenuBar</code> displaying the appropriate system
* menu items.
*/
protected JMenuBar createMenuBar()
{
menuBar = new SystemMenuBar();
menuBar.setOpaque(false);
menuBar.setFocusable(false);
menuBar.setBorderPainted(true);
menuBar.add(createMenu());
return menuBar;
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Add the menu items to this frame.
* @return The new menu.
*/
public JMenuBar addMenu(ScreenFieldView sfView)
{
char rgchShortcuts[] = new char[10];
JMenuBar menubar = new JMenuBar()
{
private static final long serialVersionUID = 1L;
public Dimension getMaximumSize()
{ // HACK - Not sure why menu takes up 1/2 of screen...?
return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height);
}
};
menubar.setBorderPainted(false);
menubar.setOpaque(false);
menubar.add(sfView.addStandardMenu(ThinMenuConstants.FILE, rgchShortcuts));
menubar.add(sfView.addStandardMenu(ThinMenuConstants.EDIT, rgchShortcuts));
menubar.add(sfView.addStandardMenu(ThinMenuConstants.HELP, rgchShortcuts));
return menubar;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Add the menu items to this frame.
* @param sfView The screen to add these menu items to.
* @return The new menu.
*/
public JMenuBar addMenu(ScreenFieldView sfView)
{
char rgchShortcuts[] = new char[10];
JMenuBar menubar = new JMenuBar()
{
private static final long serialVersionUID = 1L;
public Dimension getMaximumSize()
{ // HACK - Not sure why menu takes up 1/2 of screen...?
return new Dimension(super.getMaximumSize().width, super.getPreferredSize().height);
}
};
menubar.setBorderPainted(false);
menubar.setOpaque(false);
menubar.add(sfView.addStandardMenu(ThinMenuConstants.FILE, rgchShortcuts));
menubar.add(sfView.addStandardMenu(ThinMenuConstants.EDIT, rgchShortcuts));
menubar.add(sfView.addStandardMenu(ThinMenuConstants.RECORD, rgchShortcuts));
menubar.add(sfView.addStandardMenu(ThinMenuConstants.HELP, rgchShortcuts));
return menubar;
}
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
menubar.setOpaque(false);
menubar.add(sfView.addStandardMenu(MenuConstants.FILE, rgchShortcuts));
menubar.add(sfView.addStandardMenu(MenuConstants.EDIT, rgchShortcuts));
代码示例来源:origin: org.protege/protege-editor-core-application
private JComponent createOtherActions() {
Color fontColor = PropertyUtil.getColor(ProtegeProperties.getInstance().getProperty(ProtegeProperties.PROPERTY_COLOR_KEY),
Color.GRAY);
JPanel otherActionsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
otherActionsPanel.setBackground(Color.WHITE);
JMenuBar littleMenuBar = new JMenuBar();
// littleMenuBar.setBackground(Color.WHITE);
littleMenuBar.setOpaque(false);
final JMenu dropDownMenu = new JMenu("More actions");
dropDownMenu.setFont(getFont().deriveFont(Font.BOLD, 10.0f));
dropDownMenu.setForeground(fontColor);
dropDownMenu.setBackground(Color.WHITE);
littleMenuBar.add(dropDownMenu);
for (AltStartupActionPlugin plugin : new AltStartupActionPluginLoader(ProtegeWelcomeFrame.this).getPlugins()) {
try {
AbstractAction a = plugin.newInstance();
JMenuItem subMenu = new JMenuItem(a);
dropDownMenu.add(subMenu);
}
catch (Exception e) {
ProtegeApplication.getErrorLog().logError(e);
}
}
otherActionsPanel.add(littleMenuBar);
Box southBox = new Box(BoxLayout.Y_AXIS);
southBox.setBorder(BorderFactory.createEmptyBorder(0, 50, 0, 0));
southBox.add(otherActionsPanel);
return southBox;
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Returns the <code>JMenuBar</code> displaying the appropriate system menu
* items.
*
* @return <code>JMenuBar</code> displaying the appropriate system menu
* items.
*/
@Override
protected JMenuBar createSystemMenuBar() {
this.menuBar = new SubstanceMenuBar();
this.menuBar.setFocusable(false);
this.menuBar.setBorderPainted(true);
this.menuBar.add(this.createSystemMenu());
this.menuBar.setOpaque(false);
// support for RTL
this.menuBar.applyComponentOrientation(this.getComponentOrientation());
return this.menuBar;
}
代码示例来源:origin: org.java.net.substance/substance
/**
* Returns the <code>JMenuBar</code> displaying the appropriate system menu
* items.
*
* @return <code>JMenuBar</code> displaying the appropriate system menu
* items.
*/
protected JMenuBar createMenuBar() {
this.menuBar = new SubstanceMenuBar();
this.menuBar.setFocusable(false);
this.menuBar.setBorderPainted(true);
this.menuBar.add(this.createMenu());
this.menuBar.setOpaque(false);
// support for RTL
this.menuBar.applyComponentOrientation(this.rootPane
.getComponentOrientation());
this.markExtraComponent(this.menuBar, ExtraComponentKind.LEADING);
return this.menuBar;
}
代码示例来源:origin: com.github.insubstantial/substance
/**
* Returns the <code>JMenuBar</code> displaying the appropriate system menu
* items.
*
* @return <code>JMenuBar</code> displaying the appropriate system menu
* items.
*/
protected JMenuBar createMenuBar() {
this.menuBar = new SubstanceMenuBar();
this.menuBar.setFocusable(false);
this.menuBar.setBorderPainted(true);
this.menuBar.add(this.createMenu());
this.menuBar.setOpaque(false);
// support for RTL
this.menuBar.applyComponentOrientation(this.rootPane
.getComponentOrientation());
this.markExtraComponent(this.menuBar, ExtraComponentKind.LEADING);
return this.menuBar;
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/** Installs the default settings for the associated menu bar */
protected void installDefaults()
{
if (menuBar.getLayout() == null
|| menuBar.getLayout() instanceof UIResource)
{
if (TonicUtils.isLeftToRight(menuBar))
{
menuBar.setLayout(new DefaultMenuLayout(menuBar, BoxLayout.X_AXIS));
}
else
{
menuBar.setLayout(new RightToLeftMenuLayout());
}
}
menuBar.setOpaque(true);
LookAndFeel.installBorder(menuBar, "MenuBar.border");
LookAndFeel.installColorsAndFont(menuBar, "MenuBar.background", "MenuBar.foreground", "MenuBar.font");
}
代码示例来源:origin: khuxtable/seaglass
int x = menuInTitle? 20 : 0;
root.getJMenuBar().setBounds(x, menuInTitle ? 0 : nextY, w, mbd.height);
root.getJMenuBar().setOpaque(false);
root.getJMenuBar().setBackground(transparentColor);
if (!menuInTitle) {
内容来源于网络,如有侵权,请联系作者删除!