class MenuCommonFunctions {

    public static void setMnemonic(Action action) {
        String actionLabel = (String)action.getValue(Action.NAME);
        if(actionLabel!=null) {
            int charPosition=getMnemonicCharPos(actionLabel);
            if(charPosition>=0) {
                action.putValue(Action.MNEMONIC_KEY,new Integer(Character.toUpperCase(actionLabel.charAt(charPosition+1))));
                // Update Name
                action.putValue(Action.NAME,clearMnemonic(charPosition,actionLabel));
            }
        }
    }

    private  MenuCommonFunctions();

}