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

Added new functionality to RangeSlider via SWT style values. #62

Merged
merged 8 commits into from
May 25, 2017

Conversation

hb91546
Copy link
Contributor

@hb91546 hb91546 commented Feb 2, 2017

No description provided.

hb91546 and others added 8 commits February 2, 2017 12:32
These styles are off by default, so current behavior prevails.

ON - Indicates that selection listeners are notified continuously during thumb drag events [like Scale widget]. Otherwise, notification occurs only after the drag event terminates on mouse up [current behavior].
CONTROL - Allow key and mouse manipulation to control both lower and upper value thumbs simultaneously. Otherwise, only one thumb at a time is eligible control via key and mouse [current behavior].
HIGH - Indicates high quality tick marks are generated dynamically to a factor of the pageIncrement or increment. Otherwise, tick marks divide the scale evenly into ten parts [current behavior]
SMOOTH - Indicates mouse manipulation of upper and lower values are computed smoothly from the exact mouse cursor position disregarding the increment value [like Scale widget]. Otherwise, values are constrained to an incremental value. [current behavior]

These are existing SWT style values and somewhat awkward for this usage.  No other existing SWT style value is any better. Specific RangeSlider class style values should be considered.

Mods to handleKeyDown key listener:
1.	Changed up/down and left/right movement to be consistent with SWT Scale widget. E.g. page up moves thumb up on vertical slider instead of down as it was.
2.	Move mouse cursor when dragInProgress for precision movement
3.	Enable escape from dragInProgress
4.	Added Tab traversal
5.	Enhanced Home and End. 
6.	Added SHIFT and CTRL accelerators to key and wheel events.

Other assorted mods:
1.	Added MouseDoubleClick and MouseHover event handling
2.	Added Resize and Focus listeners
3.	Notify listeners for all selection changes. Not just mouse up event
4.	Thumb image selection based more fuzzily on collective states
5.	Added API method setExtrema(int min, int max)
6.	Refactored some of the set* API method bodies
7.	Added API method setToolTipFormatter method for displaying a dynamic tooltip during drag events or when hovering over the scale
8.	Added a few private utility methods to support new functionality
9.	Minor mods to JavaDocs
restore unintentional spacing changes to JavaDocs.
change static class variables from public int to private byte
@lcaron lcaron merged commit cc759f4 into lcaron:master May 25, 2017
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.

2 participants