use of org.freeplane.core.ui.components.FreeplaneMenuBar in project freeplane by freeplane.
the class MainView method processKeyBinding.
/*
* (non-Javadoc)
* @see javax.swing.JComponent#processKeyBinding(javax.swing.KeyStroke,
* java.awt.event.KeyEvent, int, boolean)
*/
@Override
protected boolean processKeyBinding(final KeyStroke ks, final KeyEvent e, final int condition, final boolean pressed) {
if (super.processKeyBinding(ks, e, condition, pressed)) {
return true;
}
final MapView mapView = (MapView) SwingUtilities.getAncestorOfClass(MapView.class, this);
final FreeplaneMenuBar freeplaneMenuBar = mapView.getModeController().getController().getViewController().getFreeplaneMenuBar();
return !freeplaneMenuBar.isVisible() && freeplaneMenuBar.processKeyBinding(ks, e, JComponent.WHEN_IN_FOCUSED_WINDOW, pressed);
}
Aggregations