Interface DisableShortcutsOnFocusGainedComponent
- All Superinterfaces:
EventListener,FocusListener
- All Known Implementing Classes:
DisableShortcutsOnFocusGainedTextField,FilterField
An interface for components with code that can be used for disabling shortcuts while they hold focus.
- Since:
- 18285 (code extracted for
DisableShortcutsOnFocusGainedTextField
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidDisables all relevant menu actions.default voiddefault voidGet the disabled menu action list This should not be used outside theDisableShortcutsOnFocusGainedComponentinterface.Get the unregistered action shortcuts.default booleanReturns true if the given shortcut has Shift modifier or no modifier and is not an actions key.static booleanisOnlyShift(int modifiers) Check if the modifiers is only shift Note: This was privatedefault voidRestore all action shortcuts previously unregistered Note: This was protecteddefault voidRestore all actions previously disabled Note: This was protecteddefault voidUnregisters all relevant action shortcuts.
-
Method Details
-
focusGained
- Specified by:
focusGainedin interfaceFocusListener
-
focusLost
- Specified by:
focusLostin interfaceFocusListener
-
getUnregisteredActionShortcuts
Get the unregistered action shortcuts. This should not be used outside theDisableShortcutsOnFocusGainedComponentinterface.- Returns:
- The list of unregistered action shortcuts (modifiable)
-
getDisabledMenuActions
Get the disabled menu action list This should not be used outside theDisableShortcutsOnFocusGainedComponentinterface.- Returns:
- The list of disabled menu actions (modifiable)
-
disableMenuActions
Disables all relevant menu actions. Note: This was protected- See Also:
-
unregisterActionShortcuts
Unregisters all relevant action shortcuts. Note: This was protected- See Also:
-
hasToBeDisabled
Returns true if the given shortcut has Shift modifier or no modifier and is not an actions key. Note: This was protected- Parameters:
ks- key stroke- Returns:
trueif the given shortcut has to be disabled- See Also:
-
isOnlyShift
Check if the modifiers is only shift Note: This was private- Parameters:
modifiers- The modifiers to check- Returns:
trueif the only modifier isInputEvent.SHIFT_DOWN_MASK
-
restoreMenuActions
Restore all actions previously disabled Note: This was protected -
restoreActionShortcuts
Restore all action shortcuts previously unregistered Note: This was protected
-