Since Apple abandoned Java, I don't think the built-in method detects whether natural scrolling is enabled. However, you can read in the .plist files to customize the behavior of the mouse / touchpad (which is the base xml file) and look for a property to enable natural scrolling, set to true or false.
Here you can find the necessary .plist files:
User / Library / Preferences / <- This folder is hidden in Lion!
com.apple.driver.AppleBluetoothMultitouch.mouse.plist
com.apple.driver.AppleHIDMouse.plist
Edit:
You cannot read in the plist file with the standard Java Framework, since Mac OS 10.4 all .plists are saved in binary format. See My other answer for the correct solution.
source share