protected void installDefaults() {
   super.installDefaults();
   Integer integer = UIUtil.getPropertyMaxGutterIconWidth(getPropertyPrefix());
   if (integer != null) {
     myMaxGutterIconWidth = integer.intValue();
   }
 }
Example #2
0
 @Override
 protected void uninstallListeners() {
   super.uninstallListeners();
   if (this.mouseRolloverListener != null) {
     this.menuItem.removeMouseListener(this.mouseRolloverListener);
     this.mouseRolloverListener = null;
   }
 }
Example #3
0
  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

  }
Example #4
0
  /**
   * 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);
  }
Example #5
0
 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);
   }
 }
Example #6
0
 public void uninstallUI(JComponent c) {
   c.setOpaque(true);
   super.uninstallUI(c);
 }
Example #7
0
 public void installUI(JComponent c) {
   super.installUI(c);
   c.setOpaque(false);
 }
Example #8
0
 @Override
 protected void installDefaults() {
   super.installDefaults();
 }
Example #9
0
 @Override
 protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) {
   super.paintText(g, menuItem, textRect, text);
 }
Example #10
0
 @Override
 protected void installListeners() {
   super.installListeners();
   this.mouseRolloverListener = new MenuMouseHandler();
   this.menuItem.addMouseListener(this.mouseRolloverListener);
 }
Example #11
0
 @Override
 public void uninstallUI(JComponent c) {
   super.uninstallUI(c);
 }
Example #12
0
 @Override
 public void installUI(JComponent c) {
   super.installUI(c);
   this.menuItem.setRolloverEnabled(true);
 }