static { if (Configuration.isMacOS()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name", APP_NAME); System.setProperty("com.apple.mrj.application.growbox.intrudes", "false"); } }
/** * Initialize configuration options for WorldWind to operate correctly. * * @param globeTypeClass */ protected void initconfig(Class<? extends Globe> globeTypeClass) { // Configuration.setValue(AVKey.GLOBE_CLASS_NAME, EarthFlat.class.getName()); Configuration.setValue(AVKey.GLOBE_CLASS_NAME, globeTypeClass.getName()); Configuration.setValue(AVKey.VIEW_CLASS_NAME, FlatOrbitView.class.getName()); Configuration.setValue( AVKey.LAYERS_CLASS_NAMES, "gov.nasa.worldwind.layers.CompassLayer," + "gov.nasa.worldwind.layers.Earth.NASAWFSPlaceNameLayer," + "gov.nasa.worldwind.layers.Earth.CountryBoundariesLayer," + "gov.nasa.worldwind.layers.Earth.BMNGOneImage," + "gov.nasa.worldwind.layers.Earth.BMNGWMSLayer," + "gov.nasa.worldwind.layers.Earth.LandsatI3WMSLayer," + "gov.nasa.worldwind.layers.Earth.USGSUrbanAreaOrtho," + "gov.nasa.worldwind.layers.Earth.MSVirtualEarthLayer"); System.setProperty("java.net.useSystemProxies", "true"); if (Configuration.isMacOS()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "World Wind Application"); System.setProperty("com.apple.mrj.application.growbox.intrudes", "false"); System.setProperty("apple.awt.brushMetalLook", "true"); } else if (Configuration.isWindowsOS()) { // Prevent flashing during window resizing System.setProperty("sun.awt.noerasebackground", "true"); } }
protected static String determineSingleUserLocation() { String home = getUserHomeDir(); if (home == null) { Logging.logger().warning("generic.UsersHomeDirectoryNotKnown"); return null; } String path = null; if (gov.nasa.worldwind.Configuration.isMacOS()) { path = "/Library/Caches"; } else if (gov.nasa.worldwind.Configuration.isWindowsOS()) { // This produces an incorrect path with duplicate parts, // like "C:\Users\PatC:\Users\Pat\Application Data". // path = System.getenv("USERPROFILE"); // if (path == null) // { // Logging.logger().fine("generic.UsersWindowsProfileNotKnown"); // return null; // } // path += "\\Application Data"; path = "\\Application Data"; } else if (gov.nasa.worldwind.Configuration.isLinuxOS() || gov.nasa.worldwind.Configuration.isUnixOS() || gov.nasa.worldwind.Configuration.isSolarisOS()) { path = "/var/cache/"; } else { Logging.logger().fine("generic.UnknownOperatingSystem"); } if (path == null) return null; return home + path; }
static { if (gov.nasa.worldwind.Configuration.isMacOS()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty( "com.apple.mrj.application.apple.menu.about.name", "World Wind Multi-Window Analysis"); System.setProperty("com.apple.mrj.application.growbox.intrudes", "false"); } }
public static void main(String[] args) { if (Configuration.isMacOS()) { System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Hello World Wind"); } java.awt.EventQueue.invokeLater( new Runnable() { public void run() { // Create an AppFrame and immediately make it visible. As per Swing convention, this // is done within an invokeLater call so that it executes on an AWT thread. new AppFrame().setVisible(true); } }); }
protected static String makeFullLibName(String libName) { if (WWUtil.isEmpty(libName)) return null; if (gov.nasa.worldwind.Configuration.isWindowsOS()) { if (!libName.toLowerCase().endsWith(".dll")) return libName + ".dll"; } else if (gov.nasa.worldwind.Configuration.isMacOS()) { if (!libName.toLowerCase().endsWith(".jnilib") && !libName.toLowerCase().startsWith("lib")) return "lib" + libName + ".jnilib"; } else if (gov.nasa.worldwind.Configuration.isUnixOS()) // covers Solaris and Linux { if (!libName.toLowerCase().endsWith(".so") && !libName.toLowerCase().startsWith("lib")) return "lib" + libName + ".so"; } return libName; }
protected static String determineAllUserLocation() { if (gov.nasa.worldwind.Configuration.isMacOS()) { return "/Library/Caches"; } else if (gov.nasa.worldwind.Configuration.isWindowsOS()) { String path = System.getenv("ALLUSERSPROFILE"); if (path == null) { Logging.logger().severe("generic.AllUsersWindowsProfileNotKnown"); return null; } return path + (Configuration.isWindows7OS() ? "" : "\\Application Data"); } else if (gov.nasa.worldwind.Configuration.isLinuxOS() || gov.nasa.worldwind.Configuration.isUnixOS() || gov.nasa.worldwind.Configuration.isSolarisOS()) { return "/var/cache/"; } else { Logging.logger().warning("generic.UnknownOperatingSystem"); return null; } }
protected void setDeviceModifierActionMaps() { // Mouse Wheel Vertical Translation Event if (Configuration.isMacOS()) { this.addAction( DEVICE_MOUSE_WHEEL, ActionAttributes.NO_MODIFIER, VIEW_VERTICAL_TRANSLATE, new ActionAttributes( verticalTransMouseWheelEvents, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_OSX, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_OSX, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); } else { this.addAction( DEVICE_MOUSE_WHEEL, ActionAttributes.NO_MODIFIER, VIEW_VERTICAL_TRANSLATE, new ActionAttributes( verticalTransMouseWheelEvents, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); } // Mouse Button Move To Events this.addAction( DEVICE_MOUSE, ActionAttributes.NO_MODIFIER, VIEW_MOVE_TO, new ActionAttributes( moveToMouseEvents, ActionAttributes.ActionTrigger.ON_PRESS, DEFAULT_MOUSE_MOVE_TO_MIN_VALUE, DEFAULT_MOUSE_MOVE_TO_MAX_VALUE, DEFAULT_MOVE_TO_SMOOTHING_ENABLED, DEFAULT_MOVE_TO_SMOOTHING_VALUE)); this.addAction( DEVICE_MOUSE, KeyEvent.ALT_DOWN_MASK, VIEW_MOVE_TO_SLOW, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_MOUSE, VIEW_MOVE_TO), DEFAULT_SLOW_VALUE)); // Mouse Button Rotate Events this.addAction( DEVICE_MOUSE, ActionAttributes.NO_MODIFIER, VIEW_ROTATE, new ActionAttributes( rotateMouseEvents, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_ROTATE_MIN_VALUE, DEFAULT_MOUSE_ROTATE_MAX_VALUE, DEFAULT_ROTATE_SMOOTHING_ENABLED, DEFAULT_ROTATE_SMOOTHING_VALUE)); this.addAction( DEVICE_MOUSE, KeyEvent.SHIFT_DOWN_MASK, VIEW_ROTATE_SHIFT, new ActionAttributes( rotateMouseEventsShift, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_ROTATE_MIN_VALUE, DEFAULT_MOUSE_ROTATE_MAX_VALUE, DEFAULT_ROTATE_SMOOTHING_ENABLED, DEFAULT_ROTATE_SMOOTHING_VALUE)); // Mouse Button Horizontal Translate Events this.addAction( DEVICE_MOUSE, ActionAttributes.NO_MODIFIER, VIEW_HORIZONTAL_TRANSLATE, new ActionAttributes( horizontalTransMouseEvents, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_HORIZONTAL_TRANSLATE_MIN_VALUE, DEFAULT_MOUSE_HORIZONTAL_TRANSLATE_MAX_VALUE, DEFAULT_HORIZONTAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_HORIZONTAL_TRANSLATE_SMOOTHING_VALUE)); // Mouse Button Vertical Translate Events this.addAction( DEVICE_MOUSE, ActionAttributes.NO_MODIFIER, VIEW_VERTICAL_TRANSLATE, new ActionAttributes( verticalTransMouseEvents, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_VERTICAL_TRANSLATE_VALUE, DEFAULT_MOUSE_VERTICAL_TRANSLATE_VALUE, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); this.addAction( DEVICE_MOUSE, KeyEvent.CTRL_DOWN_MASK, VIEW_VERTICAL_TRANSLATE_CTRL, new ActionAttributes( verticalTransMouseEventsCtrl, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_VERTICAL_TRANSLATE_VALUE, DEFAULT_MOUSE_VERTICAL_TRANSLATE_VALUE, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); this.addAction( DEVICE_MOUSE, KeyEvent.META_DOWN_MASK, VIEW_VERTICAL_TRANSLATE_CTRL, new ActionAttributes( verticalTransMouseEventsCtrl, ActionAttributes.ActionTrigger.ON_DRAG, DEFAULT_MOUSE_VERTICAL_TRANSLATE_VALUE, DEFAULT_MOUSE_VERTICAL_TRANSLATE_VALUE, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); // Keyboard Rotation Actions this.addAction( DEVICE_KEYBOARD, KeyEvent.SHIFT_DOWN_MASK, VIEW_ROTATE_KEYS_SHIFT, new ActionAttributes( rotationKeyEvents, ActionAttributes.ActionTrigger.ON_KEY_DOWN, KeyEvent.SHIFT_DOWN_MASK, DEFAULT_KEY_ROTATE_MIN_VALUE, DEFAULT_KEY_ROTATE_MAX_VALUE, DEFAULT_ROTATE_SMOOTHING_ENABLED, DEFAULT_ROTATE_SMOOTHING_VALUE)); this.addAction( DEVICE_KEYBOARD, ActionAttributes.NO_MODIFIER, VIEW_ROTATE_KEYS, new ActionAttributes( rotationKeyEventsPage, ActionAttributes.ActionTrigger.ON_KEY_DOWN, ActionAttributes.NO_MODIFIER, DEFAULT_KEY_ROTATE_MIN_VALUE, DEFAULT_KEY_ROTATE_MAX_VALUE, DEFAULT_ROTATE_SMOOTHING_ENABLED, DEFAULT_ROTATE_SMOOTHING_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.SHIFT_DOWN_MASK | KeyEvent.ALT_DOWN_MASK, VIEW_ROTATE_KEYS_SHIFT_SLOW, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_KEYBOARD, VIEW_ROTATE_KEYS_SHIFT), DEFAULT_SLOW_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.ALT_DOWN_MASK, VIEW_ROTATE_SLOW, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_KEYBOARD, VIEW_ROTATE_KEYS), DEFAULT_SLOW_VALUE)); // Keyboard Roll Actions this.addAction( DEVICE_KEYBOARD, KeyEvent.CTRL_DOWN_MASK, VIEW_ROLL_KEYS, new ActionAttributes( rollKeyEvents, ActionAttributes.ActionTrigger.ON_KEY_DOWN, KeyEvent.CTRL_DOWN_MASK, DEFAULT_KEY_ROLL_MIN_VALUE, DEFAULT_KEY_ROLL_MAX_VALUE, DEFAULT_ROLL_SMOOTHING_ENABLED, DEFAULT_ROLL_SMOOTHING_VALUE)); // Keyboard Horizontal Translation Actions this.addAction( DEVICE_KEYBOARD, ActionAttributes.NO_MODIFIER, VIEW_HORIZONTAL_TRANS_KEYS, new ActionAttributes( horizontalTransKeyEvents, ActionAttributes.ActionTrigger.ON_KEY_DOWN, 0, DEFAULT_KEY_HORIZONTAL_TRANSLATE_MIN_VALUE, DEFAULT_KEY_HORIZONTAL_TRANSLATE_MAX_VALUE, DEFAULT_HORIZONTAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_HORIZONTAL_TRANSLATE_SMOOTHING_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.ALT_DOWN_MASK, VIEW_HORIZONTAL_TRANSLATE_SLOW, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_KEYBOARD, VIEW_HORIZONTAL_TRANS_KEYS), DEFAULT_SLOW_VALUE)); // Vertical Translation Actions this.addAction( DEVICE_KEYBOARD, ActionAttributes.NO_MODIFIER, VIEW_VERTICAL_TRANS_KEYS, new ActionAttributes( verticalTransKeyEvents, ActionAttributes.ActionTrigger.ON_KEY_DOWN, 0, DEFAULT_KEY_VERTICAL_TRANSLATE_VALUE, DEFAULT_KEY_VERTICAL_TRANSLATE_VALUE, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.ALT_DOWN_MASK, VIEW_VERTICAL_TRANS_KEYS_SLOW, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_KEYBOARD, VIEW_VERTICAL_TRANS_KEYS), DEFAULT_SLOW_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.CTRL_DOWN_MASK, VIEW_VERTICAL_TRANS_KEYS_CTRL, new ActionAttributes( verticalTransKeyEventsCtrl, ActionAttributes.ActionTrigger.ON_KEY_DOWN, (KeyEvent.CTRL_DOWN_MASK), DEFAULT_KEY_VERTICAL_TRANSLATE_VALUE, DEFAULT_KEY_VERTICAL_TRANSLATE_VALUE, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_ENABLED, DEFAULT_VERTICAL_TRANSLATE_SMOOTHING_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.META_DOWN_MASK, VIEW_VERTICAL_TRANS_KEYS_META, this.getActionAttributes(DEVICE_KEYBOARD, VIEW_VERTICAL_TRANS_KEYS)); this.addAction( DEVICE_KEYBOARD, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK, VIEW_VERTICAL_TRANS_KEYS_SLOW_CTRL, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_KEYBOARD, VIEW_VERTICAL_TRANS_KEYS_CTRL), DEFAULT_SLOW_VALUE)); this.addAction( DEVICE_KEYBOARD, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK, VIEW_VERTICAL_TRANS_KEYS_SLOW_META, this.makeSlowActionAttributes( this.getActionAttributes(DEVICE_KEYBOARD, VIEW_VERTICAL_TRANS_KEYS_CTRL), DEFAULT_SLOW_VALUE)); // Reset Heading Action this.addAction( DEVICE_KEYBOARD, ActionAttributes.NO_MODIFIER, VIEW_RESET_HEADING, new ActionAttributes( resetHeadingEvents, ActionAttributes.ActionTrigger.ON_PRESS, 0, DEFAULT_KEY_ROTATE_MIN_VALUE, DEFAULT_KEY_ROTATE_MAX_VALUE, DEFAULT_ROTATE_SMOOTHING_ENABLED, DEFAULT_ROTATE_SMOOTHING_VALUE)); // Reset Heading, Pitch, and Roll Action this.addAction( DEVICE_KEYBOARD, ActionAttributes.NO_MODIFIER, VIEW_RESET_HEADING_PITCH_ROLL, new ActionAttributes( resetHeadingPitchRollEvents, ActionAttributes.ActionTrigger.ON_PRESS, 0, DEFAULT_KEY_ROTATE_MIN_VALUE, DEFAULT_KEY_ROTATE_MAX_VALUE, DEFAULT_ROTATE_SMOOTHING_ENABLED, DEFAULT_ROTATE_SMOOTHING_VALUE)); // Stop View Action this.addAction( DEVICE_KEYBOARD, ActionAttributes.NO_MODIFIER, VIEW_STOP_VIEW, new ActionAttributes( stopViewEvents, ActionAttributes.ActionTrigger.ON_PRESS, 0, 0.1, 0.1, false, 0.1)); }
public FlyViewInputHandler() { // Mouse Button Horizontal Translate Events // Button 1 this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_HORIZONTAL_TRANSLATE, DEFAULT_MOUSE_HORIZONTAL_TRANSLATE_MIN_VALUE, DEFAULT_MOUSE_HORIZONTAL_TRANSLATE_MAX_VALUE); this.getAttributes() .setActionTrigger( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_HORIZONTAL_TRANSLATE, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_KEY_DOWN); // Mouse Button Rotate Events // Button 1 + SHIFT this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_ROTATE_SHIFT, DEFAULT_MOUSE_ROTATE_MIN_VALUE, DEFAULT_MOUSE_ROTATE_MAX_VALUE); this.getAttributes() .setActionTrigger( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_ROTATE_SHIFT, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_KEY_DOWN); // Button 3 this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_ROTATE, DEFAULT_MOUSE_ROTATE_MIN_VALUE, DEFAULT_MOUSE_ROTATE_MAX_VALUE); this.getAttributes() .setActionTrigger( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_ROTATE, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_KEY_DOWN); // Mouse Vertical Translate // Button 2 this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_VERTICAL_TRANSLATE, DEFAULT_MOUSE_VERTICAL_TRANSLATE_MIN_VALUE, DEFAULT_MOUSE_VERTICAL_TRANSLATE_MAX_VALUE); this.getAttributes() .setActionTrigger( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_VERTICAL_TRANSLATE, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_KEY_DOWN); // Button 1 + CTRL this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_VERTICAL_TRANSLATE_CTRL, DEFAULT_MOUSE_VERTICAL_TRANSLATE_MIN_VALUE, DEFAULT_MOUSE_VERTICAL_TRANSLATE_MAX_VALUE); this.getAttributes() .setActionTrigger( ViewInputAttributes.DEVICE_MOUSE, ViewInputAttributes.VIEW_VERTICAL_TRANSLATE_CTRL, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_KEY_DOWN); // Arrow keys rotate // ----------------------------------Key Roll -------------------------------------------- RollActionListener rollActionListener = new RollActionListener(); this.getAttributes() .setActionListener( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_ROLL_KEYS, rollActionListener); // Arrow Keys horizontal translate this.getAttributes() .setValues( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_HORIZONTAL_TRANS_KEYS, DEFAULT_KEY_HORIZONTAL_TRANSLATE_MIN_VALUE, DEFAULT_KEY_HORIZONTAL_TRANSLATE_MAX_VALUE); this.getAttributes() .getActionAttributes( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_HORIZONTAL_TRANS_KEYS) .setSmoothingValue(DEFAULT_KEY_TRANSLATE_SMOOTHING_VALUE); this.getAttributes() .setValues( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_HORIZONTAL_TRANSLATE_SLOW, DEFAULT_KEY_HORIZONTAL_TRANSLATE_MIN_VALUE_SLOW, DEFAULT_KEY_HORIZONTAL_TRANSLATE_MAX_VALUE_SLOW); /* this.getAttributes().setActionTrigger(ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_HORIZONTAL_TRANSLATE_SLOW, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_KEY_DOWN); */ // +- Keys vertical translate this.getAttributes() .setValues( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_VERTICAL_TRANS_KEYS, DEFAULT_KEY_VERTICAL_TRANSLATE_MIN_VALUE, DEFAULT_KEY_VERTICAL_TRANSLATE_MAX_VALUE); // Arrow keys vertical translate this.getAttributes() .setValues( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_VERTICAL_TRANS_KEYS_META, DEFAULT_KEY_VERTICAL_TRANSLATE_MIN_VALUE, DEFAULT_KEY_VERTICAL_TRANSLATE_MAX_VALUE); this.getAttributes() .setValues( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.VIEW_VERTICAL_TRANS_KEYS_CTRL, DEFAULT_KEY_VERTICAL_TRANSLATE_MIN_VALUE, DEFAULT_KEY_VERTICAL_TRANSLATE_MAX_VALUE); // Mouse Wheel vertical translate if (Configuration.isMacOS()) { this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE_WHEEL, ViewInputAttributes.VIEW_VERTICAL_TRANSLATE, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MIN_OSX, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MAX_OSX); } else { this.getAttributes() .setValues( ViewInputAttributes.DEVICE_MOUSE_WHEEL, ViewInputAttributes.VIEW_VERTICAL_TRANSLATE, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MIN, DEFAULT_MOUSE_WHEEL_VERTICAL_TRANSLATE_VALUE_MAX); } // P Key Reset Pitch this.getAttributes() .addAction( ViewInputAttributes.DEVICE_KEYBOARD, ViewInputAttributes.ActionAttributes.NO_MODIFIER, ACTION_RESET_PITCH, new ViewInputAttributes.ActionAttributes( resetPitchEvents, ViewInputAttributes.ActionAttributes.ActionTrigger.ON_PRESS, 0, 0.1, 0.1, false, 0.1)); // Reset Pitch ViewInputAttributes.ActionAttributes actionAttrs = this.getAttributes() .getActionMap(ViewInputAttributes.DEVICE_KEYBOARD) .getActionAttributes(ACTION_RESET_PITCH); actionAttrs.setActionListener(new ResetPitchActionListener()); }