Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.globalshortcut
Interface GlobalShortcutService

All Known Implementing Classes:
GlobalShortcutServiceImpl

public interface GlobalShortcutService

This global shortcut service permits to register listeners for global shortcut (i.e. keystroke even if application is not foreground).

Author:
Sebastien Vincent

Field Summary
static int SPECIAL_KEY_MODIFIERS
          Value for AWTKeyStroke's modifiers that specify a "special" key shortcut.
 
Method Summary
 AWTKeyStroke getSpecialKey()
          Get special keystroke or null if not supported or user cancels.
 void registerShortcut(GlobalShortcutListener l, AWTKeyStroke keyStroke)
          Registers an action to execute when the keystroke is typed.
 void reloadGlobalShortcuts()
          Reload global shortcuts.
 void setEnable(boolean enable)
          Enable or not global shortcut.
 void setSpecialKeyDetection(boolean enable, GlobalShortcutListener callback)
          Enable or disable special key detection.
 void unregisterShortcut(GlobalShortcutListener l, AWTKeyStroke keyStroke)
          Unregisters an action to execute when the keystroke is typed.
 

Field Detail

SPECIAL_KEY_MODIFIERS

static final int SPECIAL_KEY_MODIFIERS
Value for AWTKeyStroke's modifiers that specify a "special" key shortcut.

See Also:
Constant Field Values
Method Detail

registerShortcut

void registerShortcut(GlobalShortcutListener l,
                      AWTKeyStroke keyStroke)
Registers an action to execute when the keystroke is typed.

Parameters:
l - listener to notify when keystroke is typed
keyStroke - keystroke that will trigger the action

unregisterShortcut

void unregisterShortcut(GlobalShortcutListener l,
                        AWTKeyStroke keyStroke)
Unregisters an action to execute when the keystroke is typed.

Parameters:
l - listener to remove
keyStroke - keystroke that will trigger the action

setSpecialKeyDetection

void setSpecialKeyDetection(boolean enable,
                            GlobalShortcutListener callback)
Enable or disable special key detection.

Parameters:
enable - enable or not special key detection.
callback - object to be notified

getSpecialKey

AWTKeyStroke getSpecialKey()
Get special keystroke or null if not supported or user cancels.

Returns:
special keystroke or null if not supported or user cancels

reloadGlobalShortcuts

void reloadGlobalShortcuts()
Reload global shortcuts.


setEnable

void setEnable(boolean enable)
Enable or not global shortcut.

Parameters:
enable - enable or not global shortcut

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.