public void paint(Graphics g, JComponent c) {
    Graphics2D g2d = (Graphics2D) g;
    // storing original anitalising flag
    Object state = null;
    if (PlastikLookAndFeel.isTextAntialiasing()) {
      state = g2d.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING);
      if (state != RenderingHints.VALUE_TEXT_ANTIALIAS_ON) {
        g2d.setRenderingHint(
            RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
      }
    }

    paintBackground(g, c);
    super.paint(g, c);

    // restoring antialising flag
    if (state != null) {
      g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, state);
    }
  }
Пример #2
0
 public void installDefaults() {
   super.installDefaults();
   LookAndFeel.installBorder(popupMenu, "PopupMenu.border");
 }
Пример #3
0
 public void installUI(JComponent c) {
   super.installUI(c);
   popupMenu.setOpaque(false);
 }