A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
MitchBuell
- Posts: 47
- Joined: Thu Dec 11, 2008 7:59 pm
Post
by MitchBuell » Tue Oct 13, 2009 8:59 pm
I apologize for using this Forum instead of SourceForge, but I'm having issues with our network reaching SourceForge.
There may be a better way to change the PanMask in ChartPanel for different operating systems. Java provides a method that takes into account different key modifiers on different operating systems.
Code: Select all
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
Determines which modifier key is the appropriate accelerator key for menu shortcuts. By default, this method returns Event.CTRL_MASK. On a Mac, this returns COMMAND (Cloverleaf) which is the system wide modifier key.
While you're not accessing a menu, it is something to consider. Apple discusses it here:
http://developer.apple.com/mac/library/ ... ation.html
-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Thu Oct 15, 2009 9:27 pm
Thanks for the tip. I'm not 100% familiar with the Mac (I have one at home, but it is mainly used by my children and I just test JFreeChart on it from time to time), so I don't know what is the preferred way to handle this...but I'm sure the current setup isn't optimal. Seems to work alright though.