Package org.jdesktop.swingx.action

Examples of org.jdesktop.swingx.action.ActionContainerFactory


    actionManager.addAction(clearFilterAction);

  }

  private void initComponents() {
    containerFactory = new ActionContainerFactory(actionManager);

    exitButton = (JButton) containerFactory.createButton(actionManager.getAction(EXIT_ACTION));

    openButton = (JButton) containerFactory.createButton(actionManager
        .getAction(OPEN_FILE_ACTION));
View Full Code Here


         * @param actions a list containing the actions to add to the popup.
         *        Must not be null.
         *
         */
        protected void addItems(List<? extends Action> actions) {
            ActionContainerFactory factory = new ActionContainerFactory(null);
            for (Action action : actions) {
                addItem(factory.createMenuItem(action));
            }

        }
View Full Code Here

     * @return current <code>ActionContainerFactory</code>.
     * Will lazily create new factory if it does not exist
     */
    protected ActionContainerFactory getActionContainerFactory() {
        if (actionFactory == null) {
            actionFactory = new ActionContainerFactory(null);
        }
        return actionFactory;
    }
View Full Code Here

         * @param actions a list containing the actions to add to the popup.
         *        Must not be null.
         *
         */
        protected void addItems(List<? extends Action> actions) {
          ActionContainerFactory factory = new ActionContainerFactory(null);
            for (Action action : actions) {
              AbstractActionExt a = (AbstractActionExt)action;
              if (action.isEnabled()) {
                if (a.isStateAction())
                  addItem(createCheckBox((AbstractActionExt)action));
                else {                 
                  addItem(factory.createButton(action));
                }
              }
            }
        }
View Full Code Here

    }


    @Override
    public void addMenuItems(JMenuBar menuBar) {
        ActionContainerFactory factory = new ActionContainerFactory(null);
       
       
         JMenu menu = new JMenu("Find");
        /*
         menu.add(factory.createMenuItem(getActionMap().get("triggerFind")));
       
        menu.add(factory.createMenuItem(getActionMap().get("useFindBar")));
        menuBar.add(menu);
         */
        menu = new JMenu("Help");
        TargetableAction findAction = new TargetableAction("About Us", "aboutus");
        getActionMap().put("triggerFind", findAction);
        menu.add(factory.createMenuItem(getActionMap().get("triggerFind")));
        menuBar.add(menu);
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.action.ActionContainerFactory

Copyright © 2018 www.massapicom. 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.