1 19 20 package org.netbeans.modules.websvc.design.view; 21 22 import java.awt.Point ; 23 import javax.swing.Action ; 24 import javax.swing.JPopupMenu ; 25 import org.netbeans.api.visual.action.PopupMenuProvider; 26 import org.netbeans.api.visual.widget.Widget; 27 import org.openide.util.Utilities; 28 29 33 public class DesignViewPopupProvider implements PopupMenuProvider{ 34 35 private Action [] actions; 36 40 public DesignViewPopupProvider(Action [] actions) { 41 this.actions = actions; 42 } 43 44 public JPopupMenu getPopupMenu(Widget widget, Point point) { 45 return Utilities.actionsToPopup(actions, 46 widget.getScene().getView().getComponentAt(point)); 47 } 48 49 } 50 | Popular Tags |