@Override public void clear() { version++; inputMap.clear(); }
/** * Resets the mnemonics bindings to an empty state. */ private void resetMnemonics() { if (mnemonicToIndexMap != null) { mnemonicToIndexMap.clear(); mnemonicInputMap.clear(); } }
/** * Resets the mnemonics bindings to an empty state. */ private void resetMnemonics() { if (mnemonicToIndexMap != null) { mnemonicToIndexMap.clear(); mnemonicInputMap.clear(); } }
/** * Resets the mnemonics bindings to an empty state. */ private void resetMnemonics() { if (_mnemonicToIndexMap != null) { _mnemonicToIndexMap.clear(); _mnemonicInputMap.clear(); } }
/** * @param inputMap */ private void uninstallKeyBindings(int type) { InputMap inputMap = monthView.getInputMap(type); inputMap.clear(); }
/** * @param inputMap */ private void uninstallKeyBindings(int type) { InputMap inputMap = monthView.getInputMap(type); inputMap.clear(); }
/** * @param inputMap */ private void uninstallKeyBindings(int type) { InputMap inputMap = monthView.getInputMap(type); inputMap.clear(); }
/** * @param inputMap */ private void uninstallKeyBindings(int type) { InputMap inputMap = monthView.getInputMap(type); inputMap.clear(); }
/** * @param inputMap */ private void uninstallKeyBindings(int type) { InputMap inputMap = monthView.getInputMap(type); inputMap.clear(); }
@Override public void deinstall(JEditorPane editorPane) { List<SyntaxComponent> l = editorComponents.get(editorPane); for (SyntaxComponent c : editorComponents.get(editorPane)) { c.deinstall(editorPane); } editorComponents.clear(); editorPane.getInputMap().clear(); editorPane.getActionMap().clear(); }
/** * Disables all the JSPlitPane accessibility shortcuts that are registered by default: * <ul> * <li>Navigate in - Tab * <li>Navigate out - Ctrl+Tab, Ctrl+Shift+Tab * <li>Navigate between - Tab, F6 * <li>Give focus spliter bar - F8 * <li>Change size - Arrow keys, home, and end (moves the pane splitter appropriately) * </ul> */ public void disableAccessibilityShortcuts() { InputMap inputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); inputMap.clear(); inputMap.setParent(null); }
void updateAcceleratorBinding() { KeyStroke accelerator = menuItem.getAccelerator(); if(windowInputMap != null) { windowInputMap.clear(); } if(accelerator != null) { if(windowInputMap == null) { windowInputMap = createInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, windowInputMap); } windowInputMap.put(accelerator, "doClick"); } }
void updateAcceleratorBinding() { KeyStroke accelerator = menuItem.getAccelerator(); if (windowInputMap != null) { windowInputMap.clear(); } if (accelerator != null) { if (windowInputMap == null) { windowInputMap = createInputMap(JComponent. WHEN_IN_FOCUSED_WINDOW); SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, windowInputMap); } windowInputMap.put(accelerator, "doClick"); } }
void updateAcceleratorBinding() { KeyStroke accelerator = menuItem.getAccelerator(); if (windowInputMap != null) { windowInputMap.clear(); } if (accelerator != null) { if (windowInputMap == null) { windowInputMap = createInputMap(JComponent. WHEN_IN_FOCUSED_WINDOW); SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, windowInputMap); } windowInputMap.put(accelerator, "doClick"); } }
void updateAcceleratorBinding() { KeyStroke accelerator = menuItem.getAccelerator(); if (windowInputMap != null) { windowInputMap.clear(); } if (accelerator != null) { if (windowInputMap == null) { windowInputMap = createInputMap(JComponent. WHEN_IN_FOCUSED_WINDOW); SwingUtilities.replaceUIInputMap(menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, windowInputMap); } windowInputMap.put(accelerator, "doClick"); } }
public void close() { textComponent.getActionMap().clear(); textComponent.getInputMap().clear(); textComponent = null; }
/** Updates the accelerator bindings for the associated menu item * (in the case that they have changed). */ void updateMyAcceleratorBinding() { KeyStroke accelerator= menuItem.getAccelerator(); if (windowInputMap != null) { windowInputMap.clear(); } if (accelerator != null) { if (windowInputMap == null) { windowInputMap= createMyInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); SwingUtilities.replaceUIInputMap( menuItem, JComponent.WHEN_IN_FOCUSED_WINDOW, windowInputMap); } windowInputMap.put(accelerator, "doClick"); } }
private void updateKeyStrokes(JComponent c) { c.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).clear(); Map<KeyStroke, MacroButton> keyStrokeMap = MacroButtonHotKeyManager.getKeyStrokeMap(); if (c.getActionMap().keys() != null) { for (Object o : c.getActionMap().keys()) { // We're looking for MacroButton here, but we're adding AbstractActions below... Is this right? XXX if (o instanceof MacroButton) { if (log.isInfoEnabled()) log.info("Removing MacroButton " + ((MacroButton) o).getButtonText()); c.getActionMap().remove(o); } } } for (KeyStroke keyStroke : keyStrokeMap.keySet()) { final MacroButton button = keyStrokeMap.get(keyStroke); if (button != null) { c.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(keyStroke, button); c.getActionMap().put(button, new MTButtonHotKeyAction(button)); } else { // This shouldn't be possible... log.error("No MacroButton found for keyStroke " + keyStroke.toString()); } } }
@Override public void deinstall(JEditorPane editorPane) { for (SyntaxComponent c : editorComponents.get(editorPane)) { c.deinstall(editorPane); } editorComponents.clear(); editorPane.getInputMap().clear(); ActionMap m = editorPane.getActionMap(); for (Object key : editorPane.getActionMap().keys()) { Action a = m.get(key); if (a instanceof SyntaxAction) { ((SyntaxAction) a).deinstall(editorPane); } } m.clear(); }