Code example for Preferences

Methods: node

0
         
        return getPref(Preferences.systemRoot(), key ,def);
    } 
 
    private static int getPref(Preferences root, String key, int def) {
        return root.node(SEL_KEY_NODE).getInt(key, def);
    } 
     
    static  void selectIM(KeyEvent ke, InputMethodContext imc, Window parent) {
        int def = KeyEvent.VK_UNDEFINED;
        int keyCode = getPref("keyCode", def); //$NON-NLS-1$
        if (keyCode != def) {
            int modifiers = getPref("modifiers", 0); //$NON-NLS-1$
            if ((ke.getKeyCode() == keyCode)
                    && (ke.getModifiers() == modifiers)) {
                IMManager.showIMPopup(imc, parent);
                 
            } 
        } 
    }