public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CommandNode)) return false; final CommandNode node = (CommandNode)o; return flags == node.flags && type == node.type && actionId.equals(node.actionId) && action.equals(node.action) && key.equals(node.key); }
private boolean isExitInsertMode(@NotNull KeyStroke keyStroke) { for (List<KeyStroke> keys : InsertExitModeAction.getInstance().getKeyStrokesSet()) { // XXX: Currently we cannot handle <C-\><C-N> because of the importance of <C-N> for the IDE on Linux if (keys.size() == 1 && keyStroke.equals(keys.get(0))) { return true; } } return false; }
private boolean isOverlapingSequence(KeyStroke[] s1, KeyStroke[] s2) { int l = Math.min(s1.length, s2.length); if (l == 0) return false; while (l-- > 0) if (!s1[l].equals(s2[l])) return false; return true; } }
private boolean isOverlapingSequence( KeyStroke[] s1, KeyStroke[] s2 ) { int l = Math.min( s1.length, s2.length ); if (l == 0) return false; while( l-- > 0 ) if( !s1[l].equals( s2[l] ) ) return false; return true; } }
@Nullable public List<Keybind> matchKeybind(List<Keybind> keybinds, KeyStroke pressedKeyStroke) { List<Keybind> pendingKeybinds = new ArrayList<>(); for (Keybind keybind : keybinds) { List<KeyStroke> keyStrokes = keybind.getKeyStrokes(); KeyStroke keyStroke = keyStrokes.get(0); if (keyStroke.equals(pressedKeyStroke)) { pendingKeybinds.add(keybind); } } return pendingKeybinds; }
private Hotkey getHotkeyForKeyStroke(KeyStroke keyStroke) { for (int i=0;i<data.getRowCount();i++) { Hotkey hotkey = data.get(i); if (hotkey.keyStroke.equals(keyStroke)) { return hotkey; } } return null; }
@Override public void keyPressed(KeyEvent e) { if (CANCEL_KEY.equals(KeyStroke.getKeyStroke(e.getKeyCode(), e.getModifiers()))) { getCancelAction().actionPerformed( new ActionEvent(JXSearchField.this, e.getID(), KeyEvent.getKeyText(e.getKeyCode()))); } } });
@Override protected boolean checkTrigger( KeyEvent event ) { return !KeyStroke.getKeyStrokeForEvent( event ).equals( keyStrokeMaximizeChange.getValue()); } }
private boolean isCancelKeyStroke( KeyEvent event ) { KeyStroke keyStroke = control.getProperty( CControl.KEY_CANCEL_OPERATION ); if( keyStroke == null ) { return false; } KeyStroke observedKeyStroke = KeyStroke.getKeyStrokeForEvent( event ); return keyStroke.equals( observedKeyStroke ); }
private boolean isModifierChanged() { return !modifierField.getKeyStroke().equals(CommandBarAttributes.getModifier()); }
public Command myKeyEvent(javax.swing.KeyStroke stroke) { if (stroke.equals(markStroke)) { ChangeTracker c = new ChangeTracker(this); hasMoved = !hasMoved; return c.getChangeCommand(); } else { return null; } }
public void keyPressed( KeyEvent event ) { if( event.isConsumed() ) return; if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){ select(); event.consume(); } }
public void keyTyped( KeyEvent event ) { if( event.isConsumed() ) return; if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){ select(); event.consume(); } }
public void keyReleased( KeyEvent event ) { if( event.isConsumed() ) return; if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){ select(); event.consume(); } }
public void keyTyped( KeyEvent event ) { if( event.isConsumed() ) return; if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){ select(); event.consume(); } }
public void keyPressed( KeyEvent event ) { if( event.isConsumed() ) return; if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){ select(); event.consume(); } }
public void keyReleased(KeyEvent e) { if (!map.isPiecesVisible() && KeyStroke.getKeyStrokeForEvent(e).equals(KeyStroke.getKeyStroke(KeyEvent.VK_F10, KeyEvent.SHIFT_MASK, true))) { Configurer config = GameModule.getGameModule().getPrefs().getOption(DRAW_HINDRANCES); config.setValue(Boolean.TRUE.equals(config.getValue()) ? Boolean.FALSE : Boolean.TRUE); map.getView().repaint(); } }