Package javax.swing

Examples of javax.swing.JPopupMenu.addSeparator()


                    menuItem.addActionListener(this);
                    popup.add(menuItem);
                }
            }

            popup.addSeparator();
        }

        JMenuItem menuItem = new JMenuItem("CANCEL");
        menuItem.setForeground(Color.red);
        menuItem.setHorizontalTextPosition(SwingConstants.CENTER);
View Full Code Here


            int sy = y + myLoc.y - dcLoc.y;
            if (sco.isSelectionEmpty()) {
                popup = new JPopupMenu();
            } else {
                popup = sco.doPopup(sx, sy, ContextualActionProvider.SOURCELIST_CONTEXT);
                popup.addSeparator();
            }
        }
        if (sourceInfo == null) {
            sourceInfo = resources.getItem("sourceInfo", this);
        }
View Full Code Here

      }
      if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) == MouseEvent.BUTTON3_MASK) {
        JPopupMenu popup = doPopup(e.getX(), e.getY(), ContextualActionProvider.EDITOR_CONTEXT);
        if (popup==null) popup = new JPopupMenu();
        if (popup.getComponentCount()>0){
          popup.addSeparator();
        }
        boolean needSep=addCollectiveActions(popup, e.getX(), e.getY(), ContextualActionProvider.EDITOR_CONTEXT);
        if(getContextualDrawing()==null){
          if(needSep){
            popup.addSeparator();
View Full Code Here

          popup.addSeparator();
        }
        boolean needSep=addCollectiveActions(popup, e.getX(), e.getY(), ContextualActionProvider.EDITOR_CONTEXT);
        if(getContextualDrawing()==null){
          if(needSep){
            popup.addSeparator();
          }
          if(JSynoptic.gui!=null)
            JSynoptic.gui.addEditMenu(popup);
        }
        if(getElementContainer().getSelection().isEmpty()){
View Full Code Here

          if(JSynoptic.gui!=null)
            JSynoptic.gui.addEditMenu(popup);
        }
        if(getElementContainer().getSelection().isEmpty()){
          // no selection add background color menu
          popup.addSeparator();
          popup.add(new JMenuItem(new AbstractAction(
              resources.getStringValue("backgroundColorAction")) {
            public void actionPerformed(ActionEvent e) {
              Color c=showColorDialog(ShapesContainer.this._diagParam.backgr);
              if(c!=null){
View Full Code Here

        DesktopToolkit.openPageInBrowser("config.jsp");
      }
    });
    menu.add(item);

    menu.addSeparator();
   
    item = new JMenuItem(mLocalizer.msg("exit", "Exit"));
    item.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        Main.quit();
View Full Code Here

           switch( whichCondition() ) {
          
               case A  :  popup_menu = new JPopupMenu();
                          popup_menu.add(stop_download);
                          popup_menu.add(cancel_download);
                          popup_menu.addSeparator();
                          popup_menu.add(copy_ed2k_links);
                          popup_menu.add(paste_ed2k_links);
                          popup_menu.addSeparator();
                     //     popup_menu.add(column_setup);
                          popup_menu.add(properties);
View Full Code Here

                          popup_menu.add(stop_download);
                          popup_menu.add(cancel_download);
                          popup_menu.addSeparator();
                          popup_menu.add(copy_ed2k_links);
                          popup_menu.add(paste_ed2k_links);
                          popup_menu.addSeparator();
                     //     popup_menu.add(column_setup);
                          popup_menu.add(properties);
                          break;
                         
               case B :   popup_menu = new JPopupMenu();
View Full Code Here

                          break;
                         
               case B :   popup_menu = new JPopupMenu();
                              popup_menu.add(stop_download);
                              popup_menu.add(cancel_download);
                              popup_menu.addSeparator();
                              popup_menu.add(copy_ed2k_links);
                              popup_menu.add(paste_ed2k_links);
                              popup_menu.addSeparator();
                       //       popup_menu.add(column_setup);
                              popup_menu.add(properties);
View Full Code Here

                              popup_menu.add(stop_download);
                              popup_menu.add(cancel_download);
                              popup_menu.addSeparator();
                              popup_menu.add(copy_ed2k_links);
                              popup_menu.add(paste_ed2k_links);
                              popup_menu.addSeparator();
                       //       popup_menu.add(column_setup);
                              popup_menu.add(properties);
                              break;
                             
               case C :   popup_menu = new JPopupMenu();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.