/** * * @param graphComponent */ public mxKeyboardHandler(mxGraphComponent graphComponent) { installKeyboardActions(graphComponent); }
/** * Invoked as part from the boilerplate install block. */ protected void installKeyboardActions(mxGraphComponent graphComponent) { InputMap inputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); SwingUtilities.replaceUIInputMap(graphComponent, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, inputMap); inputMap = getInputMap(JComponent.WHEN_FOCUSED); SwingUtilities.replaceUIInputMap(graphComponent, JComponent.WHEN_FOCUSED, inputMap); SwingUtilities.replaceUIActionMap(graphComponent, createActionMap()); }
/** * Invoked as part from the boilerplate install block. */ protected void installKeyboardActions(mxGraphComponent graphComponent) { InputMap inputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); SwingUtilities.replaceUIInputMap(graphComponent, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, inputMap); inputMap = getInputMap(JComponent.WHEN_FOCUSED); SwingUtilities.replaceUIInputMap(graphComponent, JComponent.WHEN_FOCUSED, inputMap); SwingUtilities.replaceUIActionMap(graphComponent, createActionMap()); }
/** * * @param graphComponent */ public mxKeyboardHandler(mxGraphComponent graphComponent) { installKeyboardActions(graphComponent); }