Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
c6b06ad0
by Tony Chemit at 2020-12-24T11:47:38+01:00
-
c95a8b97
by Tony Chemit at 2020-12-24T11:59:04+01:00
2 changed files:
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/actions/GoToTab.java
Changes:
| ... | ... | @@ -70,6 +70,7 @@ import org.nuiton.jaxx.widgets.text.NormalTextEditor; |
| 70 | 70 |
import org.nuiton.jaxx.widgets.text.UrlEditor;
|
| 71 | 71 |
|
| 72 | 72 |
import javax.swing.ActionMap;
|
| 73 |
+import javax.swing.InputMap;
|
|
| 73 | 74 |
import javax.swing.JComboBox;
|
| 74 | 75 |
import javax.swing.JComponent;
|
| 75 | 76 |
import javax.swing.JLabel;
|
| ... | ... | @@ -430,6 +431,8 @@ public class ContentUIInitializer<UI extends ContentUI> extends UIInitializerSup |
| 430 | 431 |
initializerContext.checkFirstPass();
|
| 431 | 432 |
editor.setLocale(getClientConfig().getLocale());
|
| 432 | 433 |
editor.init();
|
| 434 |
+ InputMap pickerInputMap = editor.getDateEditor().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
|
| 435 |
+ pickerInputMap.put(KeyStroke.getKeyStroke("pressed DOWN"), "TOGGLE_POPUP");
|
|
| 433 | 436 |
JTextComponents.addAutoSelect(editor.getDateEditor().getEditor());
|
| 434 | 437 |
}
|
| 435 | 438 |
|
| ... | ... | @@ -56,7 +56,7 @@ public class GoToTab extends ContentUIActionSupport<ContentUI> { |
| 56 | 56 |
int tabCount = tabbedPane.getTabCount();
|
| 57 | 57 |
for (int i = 0; i < tabCount; i++) {
|
| 58 | 58 |
String titleAt = tabbedPane.getTitleAt(i);
|
| 59 |
- KeyStroke keyStroke = Objects.requireNonNull(KeyStroke.getKeyStroke(keyStrokePrefix + (i + 6)));
|
|
| 59 |
+ KeyStroke keyStroke = Objects.requireNonNull(KeyStroke.getKeyStroke(keyStrokePrefix + (i + 1)));
|
|
| 60 | 60 |
tabbedPane.setTitleAt(i, titleAt + ObserveKeyStrokesSupport.keyStrokeToStr(keyStroke));
|
| 61 | 61 |
GoToTab action = new GoToTab(tabbedPaneName, i, keyStroke);
|
| 62 | 62 |
init(ui, null, action);
|