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

下面列出了怎么用javax.swing.plaf.ActionMapUIResource的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: 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;
}
 
源代码2 项目: 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;
}
 
源代码3 项目: 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;
}
 
源代码4 项目: 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;
}
 
源代码5 项目: diirt   文件: CompareResultImages.java
/**
 * Creates new form CompareResultImages
 */
public CompareResultImages() {
    initComponents();
    toReviewList.setModel(new DefaultListModel());
    fillList();
    setSize(800, 600);
    setExtendedState(getExtendedState() | MAXIMIZED_BOTH);
    actualImage.setStretch(false);
    referenceImage.setStretch(false);
    acceptAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("control D"));

    InputMap keyMap = new ComponentInputMap(acceptButton);
    keyMap.put(KeyStroke.getKeyStroke("control D"), "accept");

    ActionMap actionMap = new ActionMapUIResource();
    actionMap.put("accept", acceptAction);

    SwingUtilities.replaceUIActionMap(acceptButton, actionMap);
    SwingUtilities.replaceUIInputMap(acceptButton, JComponent.WHEN_IN_FOCUSED_WINDOW, keyMap);
}
 
源代码6 项目: dragonwell8_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;
}
 
源代码7 项目: TencentKona-8   文件: 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;
}
 
源代码8 项目: jdk8u60   文件: 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;
}
 
源代码9 项目: openjdk-jdk8u   文件: 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;
}
 
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;
}
 
源代码11 项目: Bytecoder   文件: 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;
}
 
源代码12 项目: openjdk-jdk9   文件: 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;
}
 
源代码13 项目: 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;
}
 
源代码14 项目: hottub   文件: 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;
}
 
源代码15 项目: openjdk-8-source   文件: 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;
}
 
源代码16 项目: openjdk-8   文件: 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;
}
 
源代码17 项目: 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;
}
 
源代码18 项目: 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;
}
 
源代码19 项目: seaglass   文件: SeaGlassInternalFrameTitlePane.java
/**
 * Create the action map for the system menu.
 *
 * @return the action map.
 */
ActionMap createActionMap() {
    ActionMap map = new ActionMapUIResource();

    map.put("showSystemMenu", new ShowSystemMenuAction(true));
    map.put("hideSystemMenu", new ShowSystemMenuAction(false));

    return map;
}
 
源代码20 项目: seaglass   文件: SeaGlassTitlePane.java
/**
 * Create the action map for the system menu.
 *
 * @return the action map.
 */
ActionMap createActionMap() {
    ActionMap map = new ActionMapUIResource();

    map.put("showSystemMenu", new ShowSystemMenuAction(true));
    map.put("hideSystemMenu", new ShowSystemMenuAction(false));

    return map;
}
 
源代码21 项目: jdk8u-dev-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;
}
 
源代码22 项目: darklaf   文件: DarkFileChooserUIBridge.java
/**
 * Constructs an instance of {@code ActionMap}.
 *
 * @return an instance of {@code ActionMap}
 */
protected ActionMap createActionMap() {
    ActionMap map = new ActionMapUIResource();
    FilePane.addActionsToMap(map, filePane.getActions());
    return map;
}
 
源代码23 项目: dragonwell8_jdk   文件: Test4856008.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
源代码24 项目: dragonwell8_jdk   文件: Test6978482.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
源代码25 项目: TencentKona-8   文件: Test4856008.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
源代码26 项目: TencentKona-8   文件: Test6978482.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
源代码27 项目: jdk8u60   文件: Test4856008.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
源代码28 项目: jdk8u60   文件: Test6978482.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
源代码29 项目: radiance   文件: BasicPopupPanelUI.java
/**
 * Installs the maps on the root pane of the originating component of
 * the first popup panel of the specified sequence to trace the ESC key
 * and dismiss the shown popup panels.
 *
 * @param shownPath Popup panel sequence.
 */
private void traceRootPane(List<PopupPanelManager.PopupInfo> shownPath) {
    JComponent originator = shownPath.get(0).getPopupOriginator();
    this.tracedRootPane = SwingUtilities.getRootPane(originator);

    if (this.tracedRootPane != null) {
        newInputMap = new ComponentInputMapUIResource(tracedRootPane);
        newInputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
                "hidePopupPanel");

        newActionMap = new ActionMapUIResource();
        newActionMap.put("hidePopupPanel", new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                // Hide the last sequence popup for every ESC keystroke.
                // There is special case - if the keytips are shown
                // for the *second* panel of the app menu popup panel,
                // do not dismiss the popup
                List<PopupPanelManager.PopupInfo> popups = PopupPanelManager
                        .defaultManager().getShownPath();
                if (popups.size() > 0) {
                    PopupPanelManager.PopupInfo lastPopup = popups
                            .get(popups.size() - 1);
                    if (lastPopup.getPopupPanel() instanceof JRibbonApplicationMenuPopupPanel) {
                        JRibbonApplicationMenuPopupPanel appMenuPopupPanel =
                                (JRibbonApplicationMenuPopupPanel) lastPopup
                                        .getPopupPanel();
                        KeyTipManager.KeyTipChain currentlyShownKeyTipChain = KeyTipManager
                                .defaultManager().getCurrentlyShownKeyTipChain();
                        if ((currentlyShownKeyTipChain != null)
                                && (currentlyShownKeyTipChain.chainParentComponent == appMenuPopupPanel
                                .getPanelLevel2()))
                            return;
                    }
                }
                PopupPanelManager.defaultManager().hideLastPopup();
            }
        });

        addUIInputMap(tracedRootPane, newInputMap);
        addUIActionMap(tracedRootPane, newActionMap);
    }
}
 
源代码30 项目: openjdk-jdk8u   文件: Test4856008.java
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
 类所在包
 类方法
 同包方法