Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to change modifiers for panning and zooming #172

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

stachenov
Copy link
Contributor

For some applications, the defaults were inconvenient. For example, sometimes it is better to pan by default because users need it more often than zoom. In my application, I had to alter events with reflection to get the behavior I wanted, which is ugly, to say the least.

Also, switch to getModifiersEx() instead of getModifiers() because getModifiers() is long deprecated.

Compatibility warning: panMask is protected, so whatever subclases expected to find old-style modifiers there (getModifiers()) will fail to do so (because it is now in getModifiersEx() language). Perhaps it was a wrong decision to switch to getModifiers(), but doing otherwise would force users to use deprecated constants. Anyway, the only thing possible subclasses could do with panMask is to change pan modifiers, say, from Ctrl to Shift, but not to zero because they would conflict with zoom then.

For some applications, the defaults were inconvenient.
For example, sometimes it is better to pan by default
because users need it more often than zoom.

Also, switch to getModifiersEx() instead of getModifiers().

Compatibility warning: panMask is protected, so whatever
subclases expected to find old-style modifiers there
(getModifiers()) will fail to do so (because it is now
in getModifiersEx() language).
@jfree jfree merged commit ac838c3 into jfree:master Nov 10, 2020
@jfree
Copy link
Owner

jfree commented Nov 10, 2020

Looks good, thanks!

@stachenov stachenov deleted the zoom-pan-modifiers branch November 10, 2020 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants