protected void installDefaults() { super.installDefaults(); Integer integer = UIUtil.getPropertyMaxGutterIconWidth(getPropertyPrefix()); if (integer != null) { myMaxGutterIconWidth = integer.intValue(); } }
@Override protected void uninstallListeners() { super.uninstallListeners(); if (this.mouseRolloverListener != null) { this.menuItem.removeMouseListener(this.mouseRolloverListener); this.mouseRolloverListener = null; } }
public void paint(Graphics g, JComponent comp) { // paint to the buffered image comp.setForeground(UIHelper.DARK_GREEN_COLOR); comp.setBackground(UIHelper.BG_COLOR); comp.setFont(UIHelper.VER_12_BOLD); super.paint(g, comp); // do an alpha composite }
/** * Paints the given component. * * @param g The graphics context to use. * @param c The component to paint. */ public void paint(Graphics g, JComponent c) { super.paint(g, c); // Container parent = menuItem.getParent(); // Paint the horizontal highlight gradient: // MetouiaGradients.drawHighlight( // g, new Rectangle(0, -1, parent.getWidth(), parent.getHeight() / 2), // true, true); // Paint the horizontal shadow gradient: // MetouiaGradients.drawShadow( // g, // new Rectangle( // 0, parent.getHeight() / 2 - 1, // parent.getWidth(), parent.getHeight() / 2), // true, false); }
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Graphics2D g2D = (Graphics2D) g; Object savedRenderingHint = null; if (AbstractLookAndFeel.getTheme().isTextAntiAliasingOn()) { savedRenderingHint = g2D.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING); g2D.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, AbstractLookAndFeel.getTheme().getTextAntiAliasingHint()); } if (menuItem.isSelected() && menuItem.isArmed()) { g.setColor(AbstractLookAndFeel.getMenuSelectionForegroundColor()); } else { g.setColor(AbstractLookAndFeel.getMenuForegroundColor()); } super.paintText(g, menuItem, textRect, text); if (AbstractLookAndFeel.getTheme().isTextAntiAliasingOn()) { g2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, savedRenderingHint); } }
public void uninstallUI(JComponent c) { c.setOpaque(true); super.uninstallUI(c); }
public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); }
@Override protected void installDefaults() { super.installDefaults(); }
@Override protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { super.paintText(g, menuItem, textRect, text); }
@Override protected void installListeners() { super.installListeners(); this.mouseRolloverListener = new MenuMouseHandler(); this.menuItem.addMouseListener(this.mouseRolloverListener); }
@Override public void uninstallUI(JComponent c) { super.uninstallUI(c); }
@Override public void installUI(JComponent c) { super.installUI(c); this.menuItem.setRolloverEnabled(true); }