Package muntjac :: Package ui :: Module abstract_field :: Class FocusShortcut
[hide private]
[frames] | no frames]

Class FocusShortcut

source code

                      object --+            
                               |            
             event.action.Action --+        
                                   |        
event.shortcut_action.ShortcutAction --+    
                                       |    
                          object --+   |    
                                   |   |    
              event.action.IListener --+    
                                       |    
event.shortcut_listener.ShortcutListener --+
                                           |
                                          FocusShortcut

A ready-made ShortcutListener that focuses the given Focusable (usually a IField) when the keyboard shortcut is invoked.

Instance Methods [hide private]
 
__init__(self, *args)
Creates a keyboard shortcut for focusing the given IFocusable using either the shorthand notation defined in ShortcutAction, or the given key code.
source code
 
handleAction(self, sender, target) source code

Inherited from event.shortcut_action.ShortcutAction: getKeyCode, getModifiers

Inherited from event.action.Action: __eq__, getCaption, getIcon, setCaption, setIcon

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from event.shortcut_action.ShortcutAction: SHORTHAND_CHAR_ALT, SHORTHAND_CHAR_CTRL, SHORTHAND_CHAR_SHIFT

Instance Variables [hide private]

Inherited from event.action.Action (private): _caption, _icon

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

Creates a keyboard shortcut for focusing the given IFocusable using either the shorthand notation defined in ShortcutAction, or the given key code.

Parameters:
  • args - tuple of the form
    • (focusable, shorthandCaption)
      1. to b efocused when the shortcut is invoked
      2. caption with keycode and modifiers indicated
    • (focusable, keyCode, modifiers)
      1. to be focused when the shortcut is invoked
      2. keycode that invokes the shortcut
      3. modifiers required to invoke the shortcut
    • (focusable, keyCode)
      1. to focused when the shortcut is invoked
      2. keycode that invokes the shortcut
Overrides: object.__init__

handleAction(self, sender, target)

source code 
Overrides: event.action.IListener.handleAction