Package net.sourceforge.hibernateswt.widget.window.hotkey.exception

Examples of net.sourceforge.hibernateswt.widget.window.hotkey.exception.DuplicateHotKeyDefinitionExcpetion


     */
    public void registerHotKey(int key, int modifier, Runnable action, String description) {
        log.trace("Registering Hotkey: " + key +" mod:" + modifier);
        HotKey hkey = new HotKey(key, modifier, action, description);
        if( hotKeyMap.containsKey(hkey.hashCode()) )
            throw new DuplicateHotKeyDefinitionExcpetion("Attempted to add duplicate global hot key listener. " + key + " - mod: " + modifier);

        hotKeyMap.put(hkey.hashCode(), new HotKey(key, modifier, action, description));
        display.addFilter(SWT.KeyUp, hkey.listener);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.hibernateswt.widget.window.hotkey.exception.DuplicateHotKeyDefinitionExcpetion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.