JAL-1807 Bob's first commit -- Applet loaded; needs image
[jalview.git] / src / javajs / swing / JPopupMenu.java
1 package javajs.swing;
2
3 import javajs.awt.Component;
4
5 public class JPopupMenu extends AbstractButton {
6   
7   // note that in Java Swing JPopupMenu extends 
8   // JComponent, but here we extend AbstractButton
9   // so that it shares the SwingComponent interface
10   
11   boolean tainted = true;
12
13   static {
14     /**
15      * @j2sNative
16      * 
17      *            SwingController.setDraggable(javajs.swing.JPopupMenu); 
18      */
19     {
20     }
21   }
22   
23   public JPopupMenu(String name) {
24     super("mnu");
25     this.name = name;
26   }
27
28   public void setInvoker(Object applet) {
29     this.applet = applet;
30     /**
31      * @j2sNative
32      * 
33      * SwingController.setMenu(this);
34      * 
35      */
36     {}
37   }
38   
39   /**
40    * @param applet  
41    * @param x 
42    * @param y 
43    */
44   public void show(Component applet, int x, int y) {
45     /**
46      * @j2sNative
47      * 
48      * if (applet != null)
49      *   this.tainted = true;
50      * SwingController.showMenu(this, x, y);
51      * 
52      */
53     {}
54   }
55
56   public void disposeMenu() {
57     /**
58      * @j2sNative
59      * 
60      * SwingController.disposeMenu(this);
61      */
62     {}
63   }
64   
65   @Override
66   public String toHTML() {
67     return getMenuHTML();
68   }
69
70 }