/** * * @param key * @param enabled */ private void setActionEnabled(String key, boolean enabled) { Action action = datePicker.getActionMap().get(key); if (action != null) { action.setEnabled(enabled); } }
/** * * @param key * @param enabled */ private void setActionEnabled(String key, boolean enabled) { Action action = datePicker.getActionMap().get(key); if (action != null) { action.setEnabled(enabled); } }
/** * * @param key * @param enabled */ private void setActionEnabled(String key, boolean enabled) { Action action = datePicker.getActionMap().get(key); if (action != null) { action.setEnabled(enabled); } }
/** * * @param key * @param enabled */ private void setActionEnabled(String key, boolean enabled) { Action action = datePicker.getActionMap().get(key); if (action != null) { action.setEnabled(enabled); } }
/** * * @param key * @param enabled */ private void setActionEnabled(String key, boolean enabled) { Action action = datePicker.getActionMap().get(key); if (action != null) { action.setEnabled(enabled); } }
protected void installKeyboardActions() { // install picker's actions ActionMap pickerMap = datePicker.getActionMap(); pickerMap.put(JXDatePicker.CANCEL_KEY, createCancelAction()); pickerMap.put(JXDatePicker.COMMIT_KEY, createCommitAction()); pickerMap.put(JXDatePicker.HOME_NAVIGATE_KEY, createHomeAction(false)); pickerMap.put(JXDatePicker.HOME_COMMIT_KEY, createHomeAction(true)); TogglePopupAction popupAction = createTogglePopupAction(); pickerMap.put("TOGGLE_POPUP", popupAction); InputMap pickerInputMap = datePicker.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); pickerInputMap.put(KeyStroke.getKeyStroke("ENTER"), JXDatePicker.COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("ESCAPE"), JXDatePicker.CANCEL_KEY); // PENDING: get from LF pickerInputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("alt DOWN"), "TOGGLE_POPUP"); installLinkPanelKeyboardActions(); }
protected void installKeyboardActions() { // install picker's actions ActionMap pickerMap = datePicker.getActionMap(); pickerMap.put(JXDatePicker.CANCEL_KEY, createCancelAction()); pickerMap.put(JXDatePicker.COMMIT_KEY, createCommitAction()); pickerMap.put(JXDatePicker.HOME_NAVIGATE_KEY, createHomeAction(false)); pickerMap.put(JXDatePicker.HOME_COMMIT_KEY, createHomeAction(true)); TogglePopupAction popupAction = createTogglePopupAction(); pickerMap.put("TOGGLE_POPUP", popupAction); InputMap pickerInputMap = datePicker.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); pickerInputMap.put(KeyStroke.getKeyStroke("ENTER"), JXDatePicker.COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("ESCAPE"), JXDatePicker.CANCEL_KEY); // PENDING: get from LF pickerInputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("alt DOWN"), "TOGGLE_POPUP"); installLinkPanelKeyboardActions(); }
protected void installKeyboardActions() { // install picker's actions ActionMap pickerMap = datePicker.getActionMap(); pickerMap.put(JXDatePicker.CANCEL_KEY, createCancelAction()); pickerMap.put(JXDatePicker.COMMIT_KEY, createCommitAction()); pickerMap.put(JXDatePicker.HOME_NAVIGATE_KEY, createHomeAction(false)); pickerMap.put(JXDatePicker.HOME_COMMIT_KEY, createHomeAction(true)); TogglePopupAction popupAction = createTogglePopupAction(); pickerMap.put("TOGGLE_POPUP", popupAction); InputMap pickerInputMap = datePicker.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); pickerInputMap.put(KeyStroke.getKeyStroke("ENTER"), JXDatePicker.COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("ESCAPE"), JXDatePicker.CANCEL_KEY); // PENDING: get from LF pickerInputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("alt DOWN"), "TOGGLE_POPUP"); installLinkPanelKeyboardActions(); }
protected void installKeyboardActions() { // install picker's actions ActionMap pickerMap = datePicker.getActionMap(); pickerMap.put(JXDatePicker.CANCEL_KEY, createCancelAction()); pickerMap.put(JXDatePicker.COMMIT_KEY, createCommitAction()); pickerMap.put(JXDatePicker.HOME_NAVIGATE_KEY, createHomeAction(false)); pickerMap.put(JXDatePicker.HOME_COMMIT_KEY, createHomeAction(true)); TogglePopupAction popupAction = createTogglePopupAction(); pickerMap.put("TOGGLE_POPUP", popupAction); InputMap pickerInputMap = datePicker.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); pickerInputMap.put(KeyStroke.getKeyStroke("ENTER"), JXDatePicker.COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("ESCAPE"), JXDatePicker.CANCEL_KEY); // PENDING: get from LF pickerInputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("alt DOWN"), "TOGGLE_POPUP"); installLinkPanelKeyboardActions(); }
protected void installKeyboardActions() { // install picker's actions ActionMap pickerMap = datePicker.getActionMap(); pickerMap.put(JXDatePicker.CANCEL_KEY, createCancelAction()); pickerMap.put(JXDatePicker.COMMIT_KEY, createCommitAction()); pickerMap.put(JXDatePicker.HOME_NAVIGATE_KEY, createHomeAction(false)); pickerMap.put(JXDatePicker.HOME_COMMIT_KEY, createHomeAction(true)); TogglePopupAction popupAction = createTogglePopupAction(); pickerMap.put("TOGGLE_POPUP", popupAction); InputMap pickerInputMap = datePicker.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); pickerInputMap.put(KeyStroke.getKeyStroke("ENTER"), JXDatePicker.COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("ESCAPE"), JXDatePicker.CANCEL_KEY); // PENDING: get from LF pickerInputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); pickerInputMap.put(KeyStroke.getKeyStroke("alt DOWN"), "TOGGLE_POPUP"); installLinkPanelKeyboardActions(); }
/** * Installs actions and key bindings on the datePicker's linkPanel. Does * nothing if the linkPanel is null. * * PRE: keybindings installed on picker. */ protected void installLinkPanelKeyboardActions() { if (datePicker.getLinkPanel() == null) return; ActionMap map = datePicker.getLinkPanel().getActionMap(); map.put(JXDatePicker.HOME_COMMIT_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_COMMIT_KEY)); map.put(JXDatePicker.HOME_NAVIGATE_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_NAVIGATE_KEY)); InputMap inputMap = datePicker.getLinkPanel().getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW); // PENDING: get from LF inputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); inputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); }
/** * Installs actions and key bindings on the datePicker's linkPanel. Does * nothing if the linkPanel is null. * * PRE: keybindings installed on picker. */ protected void installLinkPanelKeyboardActions() { if (datePicker.getLinkPanel() == null) return; ActionMap map = datePicker.getLinkPanel().getActionMap(); map.put(JXDatePicker.HOME_COMMIT_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_COMMIT_KEY)); map.put(JXDatePicker.HOME_NAVIGATE_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_NAVIGATE_KEY)); InputMap inputMap = datePicker.getLinkPanel().getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW); // PENDING: get from LF inputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); inputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); }
/** * Installs actions and key bindings on the datePicker's linkPanel. Does * nothing if the linkPanel is null. * * PRE: keybindings installed on picker. */ protected void installLinkPanelKeyboardActions() { if (datePicker.getLinkPanel() == null) return; ActionMap map = datePicker.getLinkPanel().getActionMap(); map.put(JXDatePicker.HOME_COMMIT_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_COMMIT_KEY)); map.put(JXDatePicker.HOME_NAVIGATE_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_NAVIGATE_KEY)); InputMap inputMap = datePicker.getLinkPanel().getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW); // PENDING: get from LF inputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); inputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); }
/** * Installs actions and key bindings on the datePicker's linkPanel. Does * nothing if the linkPanel is null. * * PRE: keybindings installed on picker. */ protected void installLinkPanelKeyboardActions() { if (datePicker.getLinkPanel() == null) return; ActionMap map = datePicker.getLinkPanel().getActionMap(); map.put(JXDatePicker.HOME_COMMIT_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_COMMIT_KEY)); map.put(JXDatePicker.HOME_NAVIGATE_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_NAVIGATE_KEY)); InputMap inputMap = datePicker.getLinkPanel().getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW); // PENDING: get from LF inputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); inputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); }
/** * Installs actions and key bindings on the datePicker's linkPanel. Does * nothing if the linkPanel is null. * * PRE: keybindings installed on picker. */ protected void installLinkPanelKeyboardActions() { if (datePicker.getLinkPanel() == null) return; ActionMap map = datePicker.getLinkPanel().getActionMap(); map.put(JXDatePicker.HOME_COMMIT_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_COMMIT_KEY)); map.put(JXDatePicker.HOME_NAVIGATE_KEY, datePicker.getActionMap().get( JXDatePicker.HOME_NAVIGATE_KEY)); InputMap inputMap = datePicker.getLinkPanel().getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW); // PENDING: get from LF inputMap.put(KeyStroke.getKeyStroke("F5"), JXDatePicker.HOME_COMMIT_KEY); inputMap.put(KeyStroke.getKeyStroke("shift F5"), JXDatePicker.HOME_NAVIGATE_KEY); }