javax.swing.plaf.ActionMapUIResource Java Examples

The following examples show how to use javax.swing.plaf.ActionMapUIResource. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CompareResultImages.java    From diirt with MIT License 6 votes vote down vote up
/**
 * 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);
}
 
Example #2
Source File: DirectoryChooserUI.java    From netbeans with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example #3
Source File: CloseTabPaneUI.java    From iBioSim with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example #4
Source File: FileChooserUI.java    From rapidminer-studio with GNU Affero General Public License v3.0 6 votes vote down vote up
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;
}
 
Example #5
Source File: BasicGridUI.java    From nextreports-designer with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example #6
Source File: SeaGlassTitlePane.java    From seaglass with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #7
Source File: SeaGlassInternalFrameTitlePane.java    From seaglass with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #8
Source File: SynthFileChooserUIImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #9
Source File: SynthFileChooserUIImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #10
Source File: SynthFileChooserUIImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #11
Source File: SynthFileChooserUIImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #12
Source File: SynthFileChooserUIImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #13
Source File: SynthFileChooserUIImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #14
Source File: SynthFileChooserUIImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #15
Source File: SynthFileChooserUIImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #16
Source File: SynthFileChooserUIImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #17
Source File: SynthFileChooserUIImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #18
Source File: SynthFileChooserUIImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #19
Source File: SynthFileChooserUIImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #20
Source File: SynthFileChooserUIImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #21
Source File: SynthFileChooserUIImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example #22
Source File: Test4856008.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #23
Source File: Test6978482.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #24
Source File: Test6978482.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #25
Source File: Test4856008.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #26
Source File: Test6978482.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #27
Source File: Test4856008.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #28
Source File: Test6978482.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #29
Source File: Test4856008.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}
 
Example #30
Source File: Test6978482.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected ActionMap createActionMap() {
    return new ActionMapUIResource();
}