Package org.jdesktop.swingx.action

Examples of org.jdesktop.swingx.action.AbstractActionExt


        //if the report action needs to be defined, do so
        Action a = c.getActionMap().get(JXErrorPane.REPORT_ACTION_KEY);
        if (a == null) {
            final JXErrorPane pane = (JXErrorPane)c;
            AbstractActionExt reportAction = new AbstractActionExt() {
                public void actionPerformed(ActionEvent e) {
                    ErrorReporter reporter = pane.getErrorReporter();
                    if (reporter != null) {
                        reporter.reportError(pane.getErrorInfo());
                    }
View Full Code Here


        actionMap.put(JXMonthView.COMMIT_KEY, acceptAction);
        actionMap.put(JXMonthView.CANCEL_KEY, cancelAction);
       
        // PENDING JW: complete (year-, decade-, ?? ) and consolidate with KeyboardAction
        // additional navigation actions
        AbstractActionExt prev = new AbstractActionExt() {

            public void actionPerformed(ActionEvent e) {
                previousMonth();
            }
           
        };
        monthView.getActionMap().put("scrollToPreviousMonth", prev);
        AbstractActionExt next = new AbstractActionExt() {

            public void actionPerformed(ActionEvent e) {
                nextMonth();
            }
           
View Full Code Here

     * findBar.
     */
    private void installCustomSearch() {
        // <snip> Customize Search
        // create custom find action
        Action find = new AbstractActionExt() {
           
            @Override
            public void actionPerformed(ActionEvent e) {
                updateSearchPanel(e != null ? e.getSource() : null);
            }
View Full Code Here

  private void initActions() {
    actionManager = ActionManager.getInstance();

    // exit
    final AbstractActionExt exitAction = new AbstractActionExt() {
      public void actionPerformed(ActionEvent e) {
        exit();
      }
    };
    exitAction.setName(MESSAGES.getString("ExitAction.Text"));
    exitAction.setShortDescription(MESSAGES.getString("ExitAction.Tooltip"));
    exitAction.setActionCommand(EXIT_ACTION);
    actionManager.addAction(exitAction);

    // open file
    final AbstractActionExt openFileAction = new AbstractActionExt() {
      public void actionPerformed(ActionEvent e) {
        openFile();
      }
    };
    openFileAction.setName(MESSAGES.getString("OpenFileAction.Text"));
    openFileAction.setShortDescription(MESSAGES.getString("OpenFileAction.Tooltip"));
    openFileAction.setSmallIcon(ICONS.getIcon("OpenFileAction"));
    openFileAction.setActionCommand(OPEN_FILE_ACTION);
    actionManager.addAction(openFileAction);

    // filter
    final AbstractActionExt filterAction = new AbstractActionExt() {
      public void actionPerformed(ActionEvent e) {
        filterTree();
      }
    };
    filterAction.setName(MESSAGES.getString("FilterAction.Text"));
    filterAction.setActionCommand(FILTER_ACTION);
    actionManager.addAction(filterAction);

    // clear filter
    final AbstractActionExt clearFilterAction = new AbstractActionExt() {
      public void actionPerformed(ActionEvent e) {
        getFilterCombo().setSelectedItem("");
        filterTree();
      }
    };
    clearFilterAction.setName(MESSAGES.getString("ClearFilterAction.Text"));
    clearFilterAction.setActionCommand(CLEAR_FILTER_ACTION);
    actionManager.addAction(clearFilterAction);

  }
View Full Code Here

     * #610-swingx.
     *
     * @return an Action which cancels an edit.
     */
    private Action createCancelAction() {
        Action action = new AbstractActionExt() {

            public void actionPerformed(ActionEvent e) {
                if (!isEditing())
                    return;
                getCellEditor().cancelCellEditing();
View Full Code Here

     * @param newActionKey the key of the wrapper action
     * @param icon the icon to use in the wrapper action
     */
    private void installWrapper(final String actionKey, String newActionKey,
            Icon icon) {
        AbstractActionExt wrapper = new AbstractActionExt(null, icon) {

            public void actionPerformed(ActionEvent e) {
                Action action = monthView.getActionMap().get(actionKey);
                if (action != null) {
                    action.actionPerformed(e);
View Full Code Here

         *
         */
        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

TOP

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

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.