panelLineBottom.setOpaque(false); panelLineBottom.setBorder(null); panelLineBottom.setPreferredSize(new Dimension(0, 26));
menuBarVendor.setOpaque(false); menuBarVendor.setBorder(null);
@ScriptFunction @Override public void setOpaque(boolean aValue) { super.setOpaque(aValue); }
/** * 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; }
/** * 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; } /**
/** * 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; } }
menubar.setOpaque(false); menubar.add(sfView.addStandardMenu(MenuConstants.FILE, rgchShortcuts)); menubar.add(sfView.addStandardMenu(MenuConstants.EDIT, rgchShortcuts));
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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** 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"); }
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) {