I finally figured out how to deal with the e.getModifiers() deprecation warning and decided to get it done. It's a little confusing because you have to understand the different event types and ways of checking which buttons are down.
e.getButton(): Which buttons have changed state.
e.getModifiers(): Which modifiers have changed state. (deprecated)
e.getModifiersEx(): Current state of the modifiers.
The fact that e.getModifiers() behaves closer to e.getButton() is why it's not always correct to use the recommended e.getModifiersEx() in place of the deprecated one. This is the case for mouse motion events which would behave differently if we were trying to check that a button was being held during drag using e.getButton() because the button would only change state once, we would need e.getModifiersEx() to check that said button was held continuously.
Changed event panel action event to use correct mask from ActionEvent which is not deprecated. Removed unused imports that are no longer needed. Pulled and updated JoshEdit submodule with similar fixes. Tested and verified all of this continues to behave exactly as before. Now down to 62 warnings.
I finally figured out how to deal with the
e.getModifiers()
deprecation warning and decided to get it done. It's a little confusing because you have to understand the different event types and ways of checking which buttons are down.e.getButton()
: Which buttons have changed state.e.getModifiers()
: Which modifiers have changed state. (deprecated)e.getModifiersEx()
: Current state of the modifiers.The fact that
e.getModifiers()
behaves closer toe.getButton()
is why it's not always correct to use the recommendede.getModifiersEx()
in place of the deprecated one. This is the case for mouse motion events which would behave differently if we were trying to check that a button was being held during drag usinge.getButton()
because the button would only change state once, we would neede.getModifiersEx()
to check that said button was held continuously.Changed event panel action event to use correct mask from
ActionEvent
which is not deprecated. Removed unused imports that are no longer needed. Pulled and updated JoshEdit submodule with similar fixes. Tested and verified all of this continues to behave exactly as before. Now down to 62 warnings.