Package javax.swing.plaf

Examples of javax.swing.plaf.ActionMapUIResource


                grabFocus();
                model.nextState();
            }
        });
        // Reset the keyboard action map
        ActionMap map = new ActionMapUIResource();
        map.put("pressed", new AbstractAction() {      //NOI18N
            public void actionPerformed(ActionEvent e) {
                grabFocus();
                model.nextState();
            }
        });
        map.put("released", null);                     //NOI18N
        SwingUtilities.replaceUIActionMap(this, map);
        // set the model to the adapted model
        model = new TristateDecorator(getModel());
        setModel(model);
        setState(initial);
View Full Code Here


    return am;
  }

  private ActionMap createDefaultActions()
  {
    ActionMapUIResource am = new ActionMapUIResource();
    Action action = new ToolBarAction();

    am.put("navigateLeft", action);
    am.put("navigateRight", action);
    am.put("navigateUp", action);
    am.put("navigateDown", action);

    return am;
  }
View Full Code Here

  /**
   * This method installs the keyboard actions for the JInternalFrame.
   */
  protected void installKeyboardActions()
  {
    ActionMapUIResource am = new ActionMapUIResource();
    am.put("showSystemMenu", new ShowSystemMenuAction());

    // The RI impl installs the audio actions as parent of the UI action map,
    // so do we.
    BasicLookAndFeel blaf = (BasicLookAndFeel) UIManager.getLookAndFeel();
    ActionMap audioActionMap = blaf.getAudioActionMap();
    am.setParent(audioActionMap);

    SwingUtilities.replaceUIActionMap(frame, am);
  }
View Full Code Here

   *
   * @return the default actions
   */
  private ActionMap createDefaultActions()
  {
    ActionMapUIResource am = new ActionMapUIResource();
    Action action;

    // TreeHomeAction.
    action = new TreeHomeAction(-1, "selectFirst");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeHomeAction(-1, "selectFirstChangeLead");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeHomeAction(-1, "selectFirstExtendSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeHomeAction(1, "selectLast");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeHomeAction(1, "selectLastChangeLead");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeHomeAction(1, "selectLastExtendSelection");
    am.put(action.getValue(Action.NAME), action);

    // TreeIncrementAction.
    action = new TreeIncrementAction(-1, "selectPrevious");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeIncrementAction(-1, "selectPreviousExtendSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeIncrementAction(-1, "selectPreviousChangeLead");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeIncrementAction(1, "selectNext");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeIncrementAction(1, "selectNextExtendSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeIncrementAction(1, "selectNextChangeLead");
    am.put(action.getValue(Action.NAME), action);

    // TreeTraverseAction.
    action = new TreeTraverseAction(-1, "selectParent");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeTraverseAction(1, "selectChild");
    am.put(action.getValue(Action.NAME), action);

    // TreeToggleAction.
    action = new TreeToggleAction("toggleAndAnchor");
    am.put(action.getValue(Action.NAME), action);

    // TreePageAction.
    action = new TreePageAction(-1, "scrollUpChangeSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreePageAction(-1, "scrollUpExtendSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreePageAction(-1, "scrollUpChangeLead");
    am.put(action.getValue(Action.NAME), action);
    action = new TreePageAction(1, "scrollDownChangeSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreePageAction(1, "scrollDownExtendSelection");
    am.put(action.getValue(Action.NAME), action);
    action = new TreePageAction(1, "scrollDownChangeLead");
    am.put(action.getValue(Action.NAME), action);

    // Tree editing actions
    action = new TreeStartEditingAction("startEditing");
    am.put(action.getValue(Action.NAME), action);
    action = new TreeCancelEditingAction("cancel");
    am.put(action.getValue(Action.NAME), action);


    return am;
  }
View Full Code Here

                grabFocus();
                tristateModel.nextState();
            }
        });
   
        ActionMap map = new ActionMapUIResource();
        map.put("pressed", new AbstractAction()
        {
            @Override
            public void actionPerformed(ActionEvent e)
            {
                grabFocus();
                tristateModel.nextState();
            }
        });

        map.put("released", null);
        SwingUtilities.replaceUIActionMap(this, map);

        tristateModel = new TristateDecorator(getModel());
        setModel(tristateModel);
        setState(initial);
View Full Code Here

  /**
   * Return the mapping between JTree's input map and JGraph's actions.
   */
  ActionMap createActionMap() {
    // 1: Up, 2: Right, 3: Down, 4: Left
    ActionMap map = new ActionMapUIResource();

    map
        .put("selectPrevious", new GraphIncrementAction(1,
            "selectPrevious"));
    map.put("selectPreviousChangeLead", new GraphIncrementAction(1,
        "selectPreviousLead"));
    map.put("selectPreviousExtendSelection", new GraphIncrementAction(1,
        "selectPreviousExtendSelection"));

    map.put("selectParent", new GraphIncrementAction(4, "selectParent"));
    map.put("selectParentChangeLead", new GraphIncrementAction(4,
        "selectParentChangeLead"));

    map.put("selectNext", new GraphIncrementAction(3, "selectNext"));
    map.put("selectNextChangeLead", new GraphIncrementAction(3,
        "selectNextLead"));
    map.put("selectNextExtendSelection", new GraphIncrementAction(3,
        "selectNextExtendSelection"));

    map.put("selectChild", new GraphIncrementAction(2, "selectChild"));
    map.put("selectChildChangeLead", new GraphIncrementAction(2,
        "selectChildChangeLead"));

    map.put("cancel", new GraphCancelEditingAction("cancel"));
    map.put("startEditing", new GraphEditAction("startEditing"));
    map.put("selectAll", new GraphSelectAllAction("selectAll", true));
    map.put("clearSelection", new GraphSelectAllAction("clearSelection",
        false));
    return map;
  }
View Full Code Here

    // *******************************************************
    // ************ FileChooser UI PLAF methods **************
    // *******************************************************

    protected ActionMap createActionMap() {
        ActionMap map = new ActionMapUIResource();
        // add standard actions
        FilePane.addActionsToMap(map, filePane.getActions());
        // add synth only actions
        map.put("fileNameCompletion", getFileNameCompletionAction());
        return map;
    }
View Full Code Here

            }
            public boolean isEnabled(){
                return getFileChooser().isEnabled();
            }
        };
        ActionMap map = new ActionMapUIResource();
        map.put("approveSelection", getApproveSelectionAction());
        map.put("cancelSelection", escAction);
        map.put("Go Up", getChangeToParentDirectoryAction());
        return map;
    }
View Full Code Here

                grabFocus();
                model.nextState();
            }
        });
        // Reset the keyboard action map
        ActionMap map = new ActionMapUIResource();
        map.put("pressed", new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                grabFocus();
                model.nextState();
            }
        });
        map.put("released", null);
        SwingUtilities.replaceUIActionMap(this, map);
        // set the model to the adapted model
        model = new QuadStateDecorator(getModel());
        setModel(model);
        setState(initial);
View Full Code Here

      public boolean isEnabled()
      {
        return getFileChooser().isEnabled();
      }
    };
    ActionMap map = new ActionMapUIResource();
    map.put("approveSelection", getApproveSelectionAction());
    map.put("cancelSelection", escAction);
    map.put("Go Up", getChangeToParentDirectoryAction());
    return map;
  }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.ActionMapUIResource

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.