1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00
Matthijs Kooijman c945b6c30a Let EditorToolbar use the global KeyboardFocusManager
For some toolbar buttons, when it is clicked while shift is pressed, its
function changes. When handling the click event, this information is
directly taken from KeyEvent.isShiftDown(). However, to also show the
proper tooltip *before* clicking, EditorToolbar listened to key events
on the main text area, to know when shift is (not) pressed.

This approach means that pressing shift while the text area is not
focused will not change the tooltip, and creates some unwanted coupling
between the toolbar and the text area.

This commit changes this approach to instead use the global
KeyboardFocusManager. Any key presses pass through there before being
dispatched to the currently focused component, so this makes sure that
any shift presses are caught, as well as making EditorToolbar a bit more
self-contained.
2016-08-26 16:42:44 +02:00
..
2015-06-25 12:47:38 +02:00
2016-01-26 12:09:56 +01:00
2016-01-26 12:09:56 +01:00