Пример #1
0
 /**
  * Add the relevant edit menu items into the list
  *
  * @param items List of menu items
  * @param forMenuBar Is this for the menu in the window's menu bar or for a popup menu in the
  *     legend
  */
 protected void getEditMenuItems(List items, boolean forMenuBar) {
   if (probe != null) {
     JMenuItem mi = new JMenuItem("Reset Probe Position");
     mi.addActionListener(
         new ActionListener() {
           public void actionPerformed(ActionEvent ae) {
             resetProbePosition();
           }
         });
     items.add(mi);
   }
   super.getEditMenuItems(items, forMenuBar);
 }