public ActionListener createActionListener(final String trigger) {
        return new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Command command = map.get(trigger);
                if (command == null)
                    return;
                command.execute();
            }
        };
    }