public void paintBackground(Graphics g, JComponent c) {
    int menuWidth = c.getWidth();
    int menuHeight = c.getHeight();
    PlastikColorTheme colorTheme = PlastikLookAndFeel.getTheme().getColorTheme();

    Color oldColor = g.getColor();
    g.setColor(colorTheme.getColor(PlastikColorTheme.POPUP_MENU | PlastikColorTheme.BACKGROUND));
    g.fillRect(0, 0, menuWidth, menuHeight);

    g.setColor(oldColor);
  }
 public void paintMenuItem(
     Graphics g,
     JComponent c,
     Icon checkIcon,
     Icon arrowIcon,
     Color background,
     Color foreground,
     int defaultTextIconGap) {
   PlastikColorTheme colorTheme = PlastikLookAndFeel.getTheme().getColorTheme();
   selectionForeground =
       colorTheme.getColor(
           PlastikColorTheme.MENU_ITEM
               | PlastikColorTheme.FOREGROUND_TEXT
               | PlastikColorTheme.ROLLOVER);
   super.paintMenuItem(g, c, checkIcon, arrowIcon, background, foreground, defaultTextIconGap);
 }
  public void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor) {
    ButtonModel model = menuItem.getModel();
    int menuWidth = menuItem.getWidth();
    int menuHeight = menuItem.getHeight();
    PlastikColorTheme colorTheme = PlastikLookAndFeel.getTheme().getColorTheme();

    Color oldColor = g.getColor();

    Color background =
        colorTheme.getColor(
            menuItem.getBackground(), PlastikColorTheme.MENU_ITEM | PlastikColorTheme.BACKGROUND);
    g.setColor(background);
    g.fillRect(0, 0, menuWidth, menuHeight);

    if (model.isArmed() || (menuItem instanceof JMenu && model.isSelected())) {
      Color top =
          colorTheme.getColor(
              PlastikColorTheme.MENU_ITEM
                  | PlastikColorTheme.BACKGROUND
                  | PlastikColorTheme.ROLLOVER
                  | PlastikColorTheme.BRIGHTER);
      Color topGradient =
          colorTheme.getColor(
              PlastikColorTheme.MENU_ITEM
                  | PlastikColorTheme.BACKGROUND
                  | PlastikColorTheme.ROLLOVER
                  | PlastikColorTheme.BRIGHTER_GRADIENT);
      Color bottomGradient =
          colorTheme.getColor(
              PlastikColorTheme.MENU_ITEM
                  | PlastikColorTheme.BACKGROUND
                  | PlastikColorTheme.ROLLOVER
                  | PlastikColorTheme.DARKER_GRADIENT);
      Color bottom =
          colorTheme.getColor(
              PlastikColorTheme.MENU_ITEM
                  | PlastikColorTheme.BACKGROUND
                  | PlastikColorTheme.ROLLOVER
                  | PlastikColorTheme.DARKER);
      g.setColor(top);
      g.drawLine(0, 0, menuWidth - 1, 0);
      Gradients.drawBoxGradient(g, 0, 1, menuWidth, menuHeight - 2, topGradient, bottomGradient);
      g.setColor(bottom);
      g.drawLine(0, menuHeight - 1, menuWidth - 1, menuHeight - 1);
    }

    g.setColor(oldColor);
  }