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(); }