/** * Returns a popup menu that allows the user to change the class of object. * * @return a JPopupMenu that when shown will let the user choose the class */ public JPopupMenu getChooseClassPopupMenu() { if (DEBUG) System.out.println("Objectnames: " + m_ObjectNames); return super.getChooseClassPopupMenu(); }
/** * Returns a popup menu that allows the user to change the class of object. * * @return a JPopupMenu that when shown will let the user choose the class */ public JPopupMenu getChooseClassPopupMenu() { if (DEBUG) System.out.println("Objectnames: " + m_ObjectNames); return super.getChooseClassPopupMenu(); }
@Override public void actionPerformed(ActionEvent e) { JPopupMenu popup = getChooseClassPopupMenu(); // show the popup where the source component is if (e.getSource() instanceof Component) { Component comp = (Component) e.getSource(); popup.show(comp, comp.getX(), comp.getY()); } } });
@Override public void actionPerformed(ActionEvent e) { JPopupMenu popup = getChooseClassPopupMenu(); // show the popup where the source component is if (e.getSource() instanceof Component) { Component comp = (Component) e.getSource(); popup.show(comp, comp.getX(), comp.getY()); } } });