View Javadoc

1   
2   package org.catacomb.druid.swing;
3   
4   import java.awt.Font;
5   
6   import javax.swing.JMenu;
7   
8   import javax.swing.JComponent;
9   
10  public class DMenu extends JMenu {
11      static final long serialVersionUID = 1001;
12  
13      public DMenu(String s) {
14          super(s);
15  
16          setFont(new Font("sansserif", Font.PLAIN, 12));
17  
18          setBackground(LAF.getBackgroundColor());
19      }
20  
21  
22      public void preShowSync() {
23  
24      }
25  
26  
27      public void applyRollover() {
28          addMouseListener(new RolloverEffect(this,
29                                              RolloverEffect.NONE,
30                                              RolloverEffect.ETCHED_UP));
31      }
32  
33  
34      public void showPopup(JComponent jcpt, int i, int j) {
35          getPopupMenu().show(jcpt, i, j);
36  
37      }
38  
39  }