ActionMap actionMap = this.getActionMap();
actionMap.put("toggleMinimized", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
JRibbonFrame ribbonFrame = (JRibbonFrame) SwingUtilities
.getWindowAncestor(JRibbonRootPane.this);
JRibbon ribbon = ribbonFrame.getRibbon();
ribbon.setMinimized(!ribbon.isMinimized());
}
});
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, Event.CTRL_MASK),
"toggleMinimized");