Influence Focus as it was possible with setFocusTraversalPolicy and DefaultKeyboardFocusManager [message #1842723] |
Tue, 29 June 2021 12:04  |
Eclipse User |
|
|
|
In AWT/Swing it was possible to call setFocusTraversalPolicy on your container to influence how Focus was handled in your application.
E.g. if I wanted a focuschange on ENTER and not only on TAB I could do something like
HashSet<KeyStroke> forwardSet = new HashSet<KeyStroke>();
forwardSet.add(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false));
forwardSet.add(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0, false));
setDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.unmodifiableSet(forwardSet));
Now for a Eclipse RCP Client I would need to do the same thing aka a way to globally enable focus change on ENTER throughout the application. So far I have found no way to do this so I'm asking, is there a way?
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.12474 seconds