Java 类javax.swing.plaf.ActionMapUIResource 实例源码

项目:incubator-netbeans    文件:DirectoryChooserUI.java   
protected ActionMap createActionMap() {
    AbstractAction escAction = new AbstractAction() {
        @Override
        public void actionPerformed(ActionEvent e) {
            getFileChooser().cancelSelection();
        }
        @Override
        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;
}
项目:rapidminer    文件:FileChooserUI.java   
protected ActionMap createActions() {
    final AbstractAction escAction = new AbstractAction() {

        private static final long serialVersionUID = -3976059968191425942L;

        @Override
        public void actionPerformed(ActionEvent e) {
            FileChooserUI.this.fileList.stopThumbnailGeneration();
            getFileChooser().cancelSelection();
        }

        @Override
        public boolean isEnabled() {
            return getFileChooser().isEnabled();
        }
    };
    final ActionMap map = new ActionMapUIResource();
    map.put("approveSelection", getApproveSelectionAction());
    map.put("cancelSelection", escAction);
    return map;
}
项目:iBioSim    文件:CloseTabPaneUI.java   
static ActionMap createMyActionMap() {
    ActionMap map = new ActionMapUIResource();
    map.put("navigateNext", new NextAction());
    map.put("navigatePrevious", new PreviousAction());
    map.put("navigateRight", new RightAction());
    map.put("navigateLeft", new LeftAction());
    map.put("navigateUp", new UpAction());
    map.put("navigateDown", new DownAction());
    map.put("navigatePageUp", new PageUpAction());
    map.put("navigatePageDown", new PageDownAction());
    map.put("requestFocus", new RequestFocusAction());
    map.put("requestFocusForVisibleComponent", new RequestFocusForVisibleAction());
    map.put("setSelectedIndex", new SetSelectedIndexAction());
    map.put("scrollTabsForwardAction", new ScrollTabsForwardAction());
    map.put("scrollTabsBackwardAction", new ScrollTabsBackwardAction());
    return map;
}
项目:javify    文件:BasicTextUI.java   
/**
 * Creates an ActionMap to be installed on the text component.
 *
 * @return an ActionMap to be installed on the text component
 */
private ActionMap getActionMap()
{
  // Note: There are no .actionMap entries in the standard L&Fs. However,
  // with the RI it is possible to install action maps via such keys, so
  // we must load them too. It can be observed that when there is no
  // .actionMap entry in the UIManager, one gets installed after a text
  // component of that type has been loaded.
  String prefix = getPropertyPrefix();
  String amName = prefix + ".actionMap";
  ActionMap am = (ActionMap) UIManager.get(amName);
  if (am == null)
    {
      am = createActionMap();
      UIManager.put(amName, am);
    }

  ActionMap map = new ActionMapUIResource();
  map.setParent(am);

  return map;
}
项目:javify    文件:BasicTextUI.java   
/**
 * Creates a default ActionMap for text components that have no UI default
 * for this (the standard for the built-in L&Fs). The ActionMap is copied
 * from the text component's getActions() method.
 *
 * @returna default ActionMap
 */
private ActionMap createActionMap()
{
  ActionMap am = new ActionMapUIResource();
  Action[] actions = textComponent.getActions();
  for (int i = actions.length - 1; i >= 0; i--)
    {
      Action action = actions[i];
      am.put(action.getValue(Action.NAME), action);
    }
  // Add TransferHandler's actions here. They don't seem to be in the
  // JTextComponent's default actions, and I can't make up a better place
  // to add them.
  Action copyAction = TransferHandler.getCopyAction();
  am.put(copyAction.getValue(Action.NAME), copyAction);
  Action cutAction = TransferHandler.getCutAction();
  am.put(cutAction.getValue(Action.NAME), cutAction);
  Action pasteAction = TransferHandler.getPasteAction();
  am.put(pasteAction.getValue(Action.NAME), pasteAction);

  return am;
}
项目:javify    文件:BasicRootPaneUI.java   
/**
 * Installs look and feel keyboard actions on the root pane.
 *
 * @param rp the root pane to install the keyboard actions to
 */
protected void installKeyboardActions(JRootPane rp)
{
  // Install the keyboard actions.
  ActionMapUIResource am = new ActionMapUIResource();
  am.put("press", new DefaultPressAction(rp));
  am.put("release", new DefaultReleaseAction(rp));
  SwingUtilities.replaceUIActionMap(rp, am);

  // Install the input map from the UIManager. It seems like the actual
  // bindings are installed in the JRootPane only when the defaultButton
  // property receives a value. So we also only install an empty
  // input map here, and fill it in propertyChange.
  ComponentInputMapUIResource im = new ComponentInputMapUIResource(rp);
  SwingUtilities.replaceUIInputMap(rp, JComponent.WHEN_IN_FOCUSED_WINDOW,
                                   im);
}
项目:javify    文件:BasicPopupMenuUI.java   
/**
 * Creates the default actions when there are none specified by the L&F.
 *
 * @return the default actions
 */
private ActionMap createDefaultActions()
{
  ActionMapUIResource am = new ActionMapUIResource();
  Action action = new NavigateAction("selectNext");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectPrevious");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectParent");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectChild");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("return");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("cancel");
  am.put(action.getValue(Action.NAME), action);

  return am;
}
项目:javify    文件:BasicTabbedPaneUI.java   
ActionMap createActionMap()
{
  ActionMap map = new ActionMapUIResource();

  map.put("navigatePageDown", new NavigatePageDownAction());
  map.put("navigatePageUp", new NavigatePageUpAction());
  map.put("navigateDown",
          new NavigateAction("navigateDown", SwingConstants.SOUTH));

  map.put("navigateUp",
          new NavigateAction("navigateUp", SwingConstants.NORTH));

  map.put("navigateLeft",
          new NavigateAction("navigateLeft", SwingConstants.WEST));

  map.put("navigateRight",
          new NavigateAction("navigateRight", SwingConstants.EAST));

  map.put("requestFocusForVisibleComponent",
          new RequestFocusForVisibleComponentAction());
  map.put("requestFocus", new RequestFocusAction());

  return map;
}
项目:rapidminer-studio    文件:FileChooserUI.java   
protected ActionMap createActions() {
    final Action escAction = new AbstractAction() {

        private static final long serialVersionUID = -3976059968191425942L;

        @Override
        public void actionPerformed(ActionEvent e) {
            FileChooserUI.this.fileList.stopThumbnailGeneration();
            getFileChooser().cancelSelection();
        }

        @Override
        public boolean isEnabled() {
            return getFileChooser().isEnabled();
        }
    };
    final ActionMap map = new ActionMapUIResource();
    map.put("approveSelection", getApproveSelectionAction());
    map.put("cancelSelection", escAction);
    return map;
}
项目:jvm-stm    文件:BasicTextUI.java   
/**
 * Creates an ActionMap to be installed on the text component.
 * 
 * @return an ActionMap to be installed on the text component
 */
private ActionMap getActionMap()
{
  // Note: There are no .actionMap entries in the standard L&Fs. However,
  // with the RI it is possible to install action maps via such keys, so
  // we must load them too. It can be observed that when there is no
  // .actionMap entry in the UIManager, one gets installed after a text
  // component of that type has been loaded.
  String prefix = getPropertyPrefix();
  String amName = prefix + ".actionMap";
  ActionMap am = (ActionMap) UIManager.get(amName);
  if (am == null)
    {
      am = createActionMap();
      UIManager.put(amName, am);
    }

  ActionMap map = new ActionMapUIResource();
  map.setParent(am);

  return map;
}
项目:jvm-stm    文件:BasicTextUI.java   
/**
 * Creates a default ActionMap for text components that have no UI default
 * for this (the standard for the built-in L&Fs). The ActionMap is copied
 * from the text component's getActions() method.
 *
 * @returna default ActionMap
 */
private ActionMap createActionMap()
{
  ActionMap am = new ActionMapUIResource();
  Action[] actions = textComponent.getActions();
  for (int i = actions.length - 1; i >= 0; i--)
    {
      Action action = actions[i];
      am.put(action.getValue(Action.NAME), action);
    }
  // Add TransferHandler's actions here. They don't seem to be in the
  // JTextComponent's default actions, and I can't make up a better place
  // to add them.
  Action copyAction = TransferHandler.getCopyAction();
  am.put(copyAction.getValue(Action.NAME), copyAction);
  Action cutAction = TransferHandler.getCutAction();
  am.put(cutAction.getValue(Action.NAME), cutAction);
  Action pasteAction = TransferHandler.getPasteAction();
  am.put(pasteAction.getValue(Action.NAME), pasteAction);

  return am;
}
项目:jvm-stm    文件:BasicRootPaneUI.java   
/**
 * Installs look and feel keyboard actions on the root pane.
 *
 * @param rp the root pane to install the keyboard actions to
 */
protected void installKeyboardActions(JRootPane rp)
{
  // Install the keyboard actions.
  ActionMapUIResource am = new ActionMapUIResource();
  am.put("press", new DefaultPressAction(rp));
  am.put("release", new DefaultReleaseAction(rp));
  SwingUtilities.replaceUIActionMap(rp, am);

  // Install the input map from the UIManager. It seems like the actual
  // bindings are installed in the JRootPane only when the defaultButton
  // property receives a value. So we also only install an empty
  // input map here, and fill it in propertyChange.
  ComponentInputMapUIResource im = new ComponentInputMapUIResource(rp);
  SwingUtilities.replaceUIInputMap(rp, JComponent.WHEN_IN_FOCUSED_WINDOW,
                                   im);
}
项目:jvm-stm    文件:BasicPopupMenuUI.java   
/**
 * Creates the default actions when there are none specified by the L&F.
 *
 * @return the default actions
 */
private ActionMap createDefaultActions()
{
  ActionMapUIResource am = new ActionMapUIResource();
  Action action = new NavigateAction("selectNext");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectPrevious");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectParent");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectChild");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("return");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("cancel");
  am.put(action.getValue(Action.NAME), action);

  return am;
}
项目:jvm-stm    文件:BasicTabbedPaneUI.java   
ActionMap createActionMap()
{
  ActionMap map = new ActionMapUIResource();

  map.put("navigatePageDown", new NavigatePageDownAction());
  map.put("navigatePageUp", new NavigatePageUpAction());
  map.put("navigateDown",
          new NavigateAction("navigateDown", SwingConstants.SOUTH));

  map.put("navigateUp",
          new NavigateAction("navigateUp", SwingConstants.NORTH));

  map.put("navigateLeft",
          new NavigateAction("navigateLeft", SwingConstants.WEST));

  map.put("navigateRight",
          new NavigateAction("navigateRight", SwingConstants.EAST));

  map.put("requestFocusForVisibleComponent",
          new RequestFocusForVisibleComponentAction());
  map.put("requestFocus", new RequestFocusAction());

  return map;
}
项目:Desktop    文件:JhromeTabbedPaneUI.java   
ActionMap loadActionMap() {
    ActionMap map = new ActionMapUIResource();
    put(map, new Actions(Actions.NEXT));
    put(map, new Actions(Actions.PREVIOUS));
    put(map, new Actions(Actions.RIGHT));
    put(map, new Actions(Actions.LEFT));
    put(map, new Actions(Actions.UP));
    put(map, new Actions(Actions.DOWN));
    put(map, new Actions(Actions.PAGE_UP));
    put(map, new Actions(Actions.PAGE_DOWN));
    put(map, new Actions(Actions.REQUEST_FOCUS));
    put(map, new Actions(Actions.REQUEST_FOCUS_FOR_VISIBLE));
    put(map, new Actions(Actions.SET_SELECTED));
    put(map, new Actions(Actions.SELECT_FOCUSED));
    put(map, new Actions(Actions.SCROLL_FORWARD));
    put(map, new Actions(Actions.SCROLL_BACKWARD));
    return map;
}
项目:vfsjfilechooser2    文件:BasicVFSFileChooserUI.java   
protected ActionMap createActionMap()
{
    ActionMap map = new ActionMapUIResource();

    Action refreshAction = new AbstractVFSUIAction(VFSFilePane.ACTION_REFRESH)
        {
            public void actionPerformed(ActionEvent evt)
            {
                getFileChooser().rescanCurrentDirectory();
            }
        };

    map.put(VFSFilePane.ACTION_APPROVE_SELECTION,
        getApproveSelectionAction());
    map.put(VFSFilePane.ACTION_CANCEL, getCancelSelectionAction());
    map.put(VFSFilePane.ACTION_REFRESH, refreshAction);
    map.put(VFSFilePane.ACTION_CHANGE_TO_PARENT_DIRECTORY,
        getChangeToParentDirectoryAction());

    return map;
}
项目:cn1    文件:BasicTextUI.java   
final void installUIActionMap() {
    UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults();
    String propertyName = getPropertyPrefix() + ".actionMap";
    ActionMap actionMap1 = new ActionMapUIResource();
    putActionToActionMap(focusAction, actionMap1);
    Object actionMap2 = uiDefaults.get(propertyName);
    if (actionMap2 == null) {
        ActionMapUIResource map = new ActionMapUIResource();
        Action[] actions = component.getActions();
        for (int i = 0; i < actions.length; i++) {
            putActionToActionMap(actions[i], map);
        }
        putActionToActionMap(TransferHandler.getPasteAction(), map);
        putActionToActionMap(TransferHandler.getCutAction(), map);
        putActionToActionMap(TransferHandler.getCopyAction(), map);

        actionMap2 = map;
        if (!(component instanceof JEditorPane)) {
            uiDefaults.put(propertyName, map);
        }
    }
    actionMap1.setParent((ActionMap)actionMap2);
    SwingUtilities.replaceUIActionMap(component, actionMap1);
}
项目:cn1    文件:BasicInternalFrameUI.java   
protected void installKeyboardActions() {
    createInternalFrameListener();
    frame.addInternalFrameListener(internalFrameListener);

    ActionMapUIResource actionMap = new ActionMapUIResource();
    actionMap.put("showSystemMenu", new AbstractAction() {
        public void actionPerformed(final ActionEvent e) {
            if (titlePane != null) {
                titlePane.showSystemMenu();
            }
        }
    });

    actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel())
                        .getAudioActionMap());
    SwingUtilities.replaceUIActionMap(frame, actionMap);
}
项目:vfsjfilechooser    文件:BasicVFSFileChooserUI.java   
protected ActionMap createActionMap() {
    ActionMap map = new ActionMapUIResource();

    Action refreshAction = new AbstractVFSUIAction(VFSFilePane.ACTION_REFRESH) {
        @Override
        public void actionPerformed(ActionEvent evt) {
            getFileChooser().rescanCurrentDirectory();
        }
    };

    map.put(VFSFilePane.ACTION_APPROVE_SELECTION,
            getApproveSelectionAction());
    map.put(VFSFilePane.ACTION_CANCEL, getCancelSelectionAction());
    map.put(VFSFilePane.ACTION_REFRESH, refreshAction);
    map.put(VFSFilePane.ACTION_CHANGE_TO_PARENT_DIRECTORY,
            getChangeToParentDirectoryAction());

    return map;
}
项目:JamVM-PH    文件:BasicTextUI.java   
/**
 * Creates an ActionMap to be installed on the text component.
 * 
 * @return an ActionMap to be installed on the text component
 */
private ActionMap getActionMap()
{
  // Note: There are no .actionMap entries in the standard L&Fs. However,
  // with the RI it is possible to install action maps via such keys, so
  // we must load them too. It can be observed that when there is no
  // .actionMap entry in the UIManager, one gets installed after a text
  // component of that type has been loaded.
  String prefix = getPropertyPrefix();
  String amName = prefix + ".actionMap";
  ActionMap am = (ActionMap) UIManager.get(amName);
  if (am == null)
    {
      am = createActionMap();
      UIManager.put(amName, am);
    }

  ActionMap map = new ActionMapUIResource();
  map.setParent(am);

  return map;
}
项目:JamVM-PH    文件:BasicTextUI.java   
/**
 * Creates a default ActionMap for text components that have no UI default
 * for this (the standard for the built-in L&Fs). The ActionMap is copied
 * from the text component's getActions() method.
 *
 * @returna default ActionMap
 */
private ActionMap createActionMap()
{
  ActionMap am = new ActionMapUIResource();
  Action[] actions = textComponent.getActions();
  for (int i = actions.length - 1; i >= 0; i--)
    {
      Action action = actions[i];
      am.put(action.getValue(Action.NAME), action);
    }
  // Add TransferHandler's actions here. They don't seem to be in the
  // JTextComponent's default actions, and I can't make up a better place
  // to add them.
  Action copyAction = TransferHandler.getCopyAction();
  am.put(copyAction.getValue(Action.NAME), copyAction);
  Action cutAction = TransferHandler.getCutAction();
  am.put(cutAction.getValue(Action.NAME), cutAction);
  Action pasteAction = TransferHandler.getPasteAction();
  am.put(pasteAction.getValue(Action.NAME), pasteAction);

  return am;
}
项目:JamVM-PH    文件:BasicRootPaneUI.java   
/**
 * Installs look and feel keyboard actions on the root pane.
 *
 * @param rp the root pane to install the keyboard actions to
 */
protected void installKeyboardActions(JRootPane rp)
{
  // Install the keyboard actions.
  ActionMapUIResource am = new ActionMapUIResource();
  am.put("press", new DefaultPressAction(rp));
  am.put("release", new DefaultReleaseAction(rp));
  SwingUtilities.replaceUIActionMap(rp, am);

  // Install the input map from the UIManager. It seems like the actual
  // bindings are installed in the JRootPane only when the defaultButton
  // property receives a value. So we also only install an empty
  // input map here, and fill it in propertyChange.
  ComponentInputMapUIResource im = new ComponentInputMapUIResource(rp);
  SwingUtilities.replaceUIInputMap(rp, JComponent.WHEN_IN_FOCUSED_WINDOW,
                                   im);
}
项目:JamVM-PH    文件:BasicPopupMenuUI.java   
/**
 * Creates the default actions when there are none specified by the L&F.
 *
 * @return the default actions
 */
private ActionMap createDefaultActions()
{
  ActionMapUIResource am = new ActionMapUIResource();
  Action action = new NavigateAction("selectNext");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectPrevious");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectParent");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectChild");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("return");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("cancel");
  am.put(action.getValue(Action.NAME), action);

  return am;
}
项目:JamVM-PH    文件:BasicTabbedPaneUI.java   
ActionMap createActionMap()
{
  ActionMap map = new ActionMapUIResource();

  map.put("navigatePageDown", new NavigatePageDownAction());
  map.put("navigatePageUp", new NavigatePageUpAction());
  map.put("navigateDown",
          new NavigateAction("navigateDown", SwingConstants.SOUTH));

  map.put("navigateUp",
          new NavigateAction("navigateUp", SwingConstants.NORTH));

  map.put("navigateLeft",
          new NavigateAction("navigateLeft", SwingConstants.WEST));

  map.put("navigateRight",
          new NavigateAction("navigateRight", SwingConstants.EAST));

  map.put("requestFocusForVisibleComponent",
          new RequestFocusForVisibleComponentAction());
  map.put("requestFocus", new RequestFocusAction());

  return map;
}
项目:classpath    文件:BasicTextUI.java   
/**
 * Creates an ActionMap to be installed on the text component.
 *
 * @return an ActionMap to be installed on the text component
 */
private ActionMap getActionMap()
{
  // Note: There are no .actionMap entries in the standard L&Fs. However,
  // with the RI it is possible to install action maps via such keys, so
  // we must load them too. It can be observed that when there is no
  // .actionMap entry in the UIManager, one gets installed after a text
  // component of that type has been loaded.
  String prefix = getPropertyPrefix();
  String amName = prefix + ".actionMap";
  ActionMap am = (ActionMap) UIManager.get(amName);
  if (am == null)
    {
      am = createActionMap();
      UIManager.put(amName, am);
    }

  ActionMap map = new ActionMapUIResource();
  map.setParent(am);

  return map;
}
项目:classpath    文件:BasicTextUI.java   
/**
 * Creates a default ActionMap for text components that have no UI default
 * for this (the standard for the built-in L&Fs). The ActionMap is copied
 * from the text component's getActions() method.
 *
 * @returna default ActionMap
 */
private ActionMap createActionMap()
{
  ActionMap am = new ActionMapUIResource();
  Action[] actions = textComponent.getActions();
  for (int i = actions.length - 1; i >= 0; i--)
    {
      Action action = actions[i];
      am.put(action.getValue(Action.NAME), action);
    }
  // Add TransferHandler's actions here. They don't seem to be in the
  // JTextComponent's default actions, and I can't make up a better place
  // to add them.
  Action copyAction = TransferHandler.getCopyAction();
  am.put(copyAction.getValue(Action.NAME), copyAction);
  Action cutAction = TransferHandler.getCutAction();
  am.put(cutAction.getValue(Action.NAME), cutAction);
  Action pasteAction = TransferHandler.getPasteAction();
  am.put(pasteAction.getValue(Action.NAME), pasteAction);

  return am;
}
项目:classpath    文件:BasicRootPaneUI.java   
/**
 * Installs look and feel keyboard actions on the root pane.
 *
 * @param rp the root pane to install the keyboard actions to
 */
protected void installKeyboardActions(JRootPane rp)
{
  // Install the keyboard actions.
  ActionMapUIResource am = new ActionMapUIResource();
  am.put("press", new DefaultPressAction(rp));
  am.put("release", new DefaultReleaseAction(rp));
  SwingUtilities.replaceUIActionMap(rp, am);

  // Install the input map from the UIManager. It seems like the actual
  // bindings are installed in the JRootPane only when the defaultButton
  // property receives a value. So we also only install an empty
  // input map here, and fill it in propertyChange.
  ComponentInputMapUIResource im = new ComponentInputMapUIResource(rp);
  SwingUtilities.replaceUIInputMap(rp, JComponent.WHEN_IN_FOCUSED_WINDOW,
                                   im);
}
项目:classpath    文件:BasicPopupMenuUI.java   
/**
 * Creates the default actions when there are none specified by the L&F.
 *
 * @return the default actions
 */
private ActionMap createDefaultActions()
{
  ActionMapUIResource am = new ActionMapUIResource();
  Action action = new NavigateAction("selectNext");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectPrevious");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectParent");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("selectChild");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("return");
  am.put(action.getValue(Action.NAME), action);
  action = new NavigateAction("cancel");
  am.put(action.getValue(Action.NAME), action);

  return am;
}
项目:classpath    文件:BasicTabbedPaneUI.java   
ActionMap createActionMap()
{
  ActionMap map = new ActionMapUIResource();

  map.put("navigatePageDown", new NavigatePageDownAction());
  map.put("navigatePageUp", new NavigatePageUpAction());
  map.put("navigateDown",
          new NavigateAction("navigateDown", SwingConstants.SOUTH));

  map.put("navigateUp",
          new NavigateAction("navigateUp", SwingConstants.NORTH));

  map.put("navigateLeft",
          new NavigateAction("navigateLeft", SwingConstants.WEST));

  map.put("navigateRight",
          new NavigateAction("navigateRight", SwingConstants.EAST));

  map.put("requestFocusForVisibleComponent",
          new RequestFocusForVisibleComponentAction());
  map.put("requestFocus", new RequestFocusAction());

  return map;
}
项目:freeVM    文件:BasicTextUI.java   
final void installUIActionMap() {
    UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults();
    String propertyName = getPropertyPrefix() + ".actionMap";
    ActionMap actionMap1 = new ActionMapUIResource();
    putActionToActionMap(focusAction, actionMap1);
    Object actionMap2 = uiDefaults.get(propertyName);
    if (actionMap2 == null) {
        ActionMapUIResource map = new ActionMapUIResource();
        Action[] actions = component.getActions();
        for (int i = 0; i < actions.length; i++) {
            putActionToActionMap(actions[i], map);
        }
        putActionToActionMap(TransferHandler.getPasteAction(), map);
        putActionToActionMap(TransferHandler.getCutAction(), map);
        putActionToActionMap(TransferHandler.getCopyAction(), map);

        actionMap2 = map;
        if (!(component instanceof JEditorPane)) {
            uiDefaults.put(propertyName, map);
        }
    }
    actionMap1.setParent((ActionMap)actionMap2);
    SwingUtilities.replaceUIActionMap(component, actionMap1);
}
项目:freeVM    文件:BasicInternalFrameUI.java   
protected void installKeyboardActions() {
    createInternalFrameListener();
    frame.addInternalFrameListener(internalFrameListener);

    ActionMapUIResource actionMap = new ActionMapUIResource();
    actionMap.put("showSystemMenu", new AbstractAction() {
        public void actionPerformed(final ActionEvent e) {
            if (titlePane != null) {
                titlePane.showSystemMenu();
            }
        }
    });

    actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel())
                        .getAudioActionMap());
    SwingUtilities.replaceUIActionMap(frame, actionMap);
}
项目:freeVM    文件:BasicTextUI.java   
final void installUIActionMap() {
    UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults();
    String propertyName = getPropertyPrefix() + ".actionMap";
    ActionMap actionMap1 = new ActionMapUIResource();
    putActionToActionMap(focusAction, actionMap1);
    Object actionMap2 = uiDefaults.get(propertyName);
    if (actionMap2 == null) {
        ActionMapUIResource map = new ActionMapUIResource();
        Action[] actions = component.getActions();
        for (int i = 0; i < actions.length; i++) {
            putActionToActionMap(actions[i], map);
        }
        putActionToActionMap(TransferHandler.getPasteAction(), map);
        putActionToActionMap(TransferHandler.getCutAction(), map);
        putActionToActionMap(TransferHandler.getCopyAction(), map);

        actionMap2 = map;
        if (!(component instanceof JEditorPane)) {
            uiDefaults.put(propertyName, map);
        }
    }
    actionMap1.setParent((ActionMap)actionMap2);
    SwingUtilities.replaceUIActionMap(component, actionMap1);
}
项目:freeVM    文件:BasicInternalFrameUI.java   
protected void installKeyboardActions() {
    createInternalFrameListener();
    frame.addInternalFrameListener(internalFrameListener);

    ActionMapUIResource actionMap = new ActionMapUIResource();
    actionMap.put("showSystemMenu", new AbstractAction() {
        public void actionPerformed(final ActionEvent e) {
            if (titlePane != null) {
                titlePane.showSystemMenu();
            }
        }
    });

    actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel())
                        .getAudioActionMap());
    SwingUtilities.replaceUIActionMap(frame, actionMap);
}
项目:rapidminer-5    文件:FileChooserUI.java   
protected ActionMap createActions() {
    final AbstractAction escAction = new AbstractAction() {

        private static final long serialVersionUID = -3976059968191425942L;

        public void actionPerformed(ActionEvent e) {
            FileChooserUI.this.fileList.stopThumbnailGeneration();
            getFileChooser().cancelSelection();
        }

        @Override
        public boolean isEnabled() {
            return getFileChooser().isEnabled();
        }
    };
    final ActionMap map = new ActionMapUIResource();
    map.put("approveSelection", getApproveSelectionAction());
    map.put("cancelSelection", escAction);
    return map;
}
项目:nextreports-designer    文件:BasicGridUI.java   
private ActionMap createActionMap() {
    ActionMap map = new ActionMapUIResource();

    map.put("selectNextColumn", new NavigationAction(1, 0));
    map.put("selectPreviousColumn", new NavigationAction(-1, 0));
    map.put("selectNextRow", new NavigationAction(0, 1));
    map.put("selectPreviousRow", new NavigationAction(0, -1));

    map.put("selectNextColumnExtendSelection", new NavigationAction(1, 0, true));
    map.put("selectPreviousColumnExtendSelection", new NavigationAction(-1, 0, true));
    map.put("selectNextRowExtendSelection", new NavigationAction(0, 1, true));
    map.put("selectPreviousRowExtendSelection", new NavigationAction(0, -1, true));

    map.put("startEditing", new StartEditingAction());
    map.put("cancel", new CancelEditingAction());
    map.put("clearCell", new ClearCellAction());
    map.put("cutCell", new CutAction());
    map.put("copyCell", new CopyAction());
    map.put("pasteCell", new PasteAction());

    return map;
}
项目:Equella    文件:FlatterSpinnerUI.java   
private ActionMap createActionMap()
{
    ActionMap map = new ActionMapUIResource();

    map.put("increment", nextButtonHandler);
    map.put("decrement", previousButtonHandler);
    return map;
}
项目:OpenJSharp    文件:SynthFileChooserUIImpl.java   
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;
}
项目:jdk8u-jdk    文件:SynthFileChooserUIImpl.java   
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;
}
项目:openjdk-jdk10    文件:SynthFileChooserUIImpl.java   
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;
}
项目:openjdk9    文件:SynthFileChooserUIImpl.java   
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;
}