Class FlatComponentsGlobalSettings
java.lang.Object
org.jjazz.flatcomponents.api.FlatComponentsGlobalSettings
Manage global settings for the UI components of this module.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic FlatComponentsGlobalSettingsvoidinstallChangeValueWithMouseWheelSupport(JComponent comp, MouseWheelListener compListener) Install or uninstall a MouseWheelListener depending on isChangeValueWithMouseWheelEnabled() value.booleanvoidvoidsetChangeValueWithMouseWheelEnabled(boolean b) Users with trackpad or "touch motion" mouse like the Apple Magic mouse should set this to false.
-
Field Details
-
PROP_VALUE_CHANGE_WITH_MOUSE_WHEEL
- See Also:
-
-
Method Details
-
getInstance
-
installChangeValueWithMouseWheelSupport
public void installChangeValueWithMouseWheelSupport(JComponent comp, MouseWheelListener compListener) Install or uninstall a MouseWheelListener depending on isChangeValueWithMouseWheelEnabled() value.This component keeps track of the passed components (via a WeakReference) so that MouseWheelListener can be installed or uninstalled if setChangeValueWithMouseWheelEnabled() changes later.
- Parameters:
comp-compListener-- See Also:
-
setChangeValueWithMouseWheelEnabled
public void setChangeValueWithMouseWheelEnabled(boolean b) Users with trackpad or "touch motion" mouse like the Apple Magic mouse should set this to false.Because these devices don't have a "unitary" scroll unit, using the mouse wheel to change value e.g. a JSpinner does not work well.
- Parameters:
b-- See Also:
-
isChangeValueWithMouseWheelEnabled
public boolean isChangeValueWithMouseWheelEnabled() -
addPropertyChangeListener
-
removePropertyChangeListener
-