-
Notifications
You must be signed in to change notification settings - Fork 236
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
Update RichTextFX to use InputMap API from WellBehavedFX's experimental package #288
Comments
One issue I've run into is the consume(
anyOf(
keyPressed(CUT),
keyPressed(X, SHORTCUT_DOWN),
keyPressed(DELETE, SHIFT_DOWN)
), e -> view.cut()) So, either this method should be turned into a variable argument method or there should be additional methods that provide the same function for 2-5 arguments. |
Good point, it should take variable number of arguments. |
Another minor issue of inconvenience: InputMap<?> baseEdits = sequence( /* the edit stuff */ );
InputMap<?> edits = InputMap.when(view::isEditable, baseEdits); instead of InputMap<?> edits = sequence( /* edit handlers */ ).onlyWhen(view::isEditable); |
Just a question, but is the |
There sure could be a convenience method on
is a little bit clearer than
which is kind of reverse. Regarding |
Good point.
Ok. |
Another issue: |
Another issue: 1 (static) template is used to work across multiple areas (saves memory). How would that be implemented with |
I've been looking at |
Another issue: the corresponding |
Yeah, I think There's no built-in equivalent to |
The implementation would have to be adapted for |
It's also package-private in |
Everything in an interface is public, even if |
Now that that's implemented, I have a few other questions:
|
They are very similar in effect. Composing one template will have more sharing among different instances of StyledTextAreas. Each
|
So, there should be only one. So, I looked into the name conflict more: the IDE (and gradle) seem to think that So, this: MOUSE_EVENT_TEMPLATE = InputMapTemplate.sequence(
consume(eventType(MouseEvent.MOUSE_PRESSED), StyledTextAreaBehavior::mousePressed),
consume(eventType(MouseEvent.MOUSE_DRAGGED), StyledTextAreaBehavior::mouseDragged),
consume(eventType(MouseEvent.DRAG_DETECTED), StyledTextAreaBehavior::dragDetected),
consume(eventType(MouseEvent.MOUSE_RELEASED), StyledTextAreaBehavior::mouseReleased)
); as opposed to this: MOUSE_EVENT_TEMPLATE = InputMapTemplate.sequence(
consume(mousePressed(), StyledTextAreaBehavior::mousePressed),
consume(eventType(MouseEvent.MOUSE_DRAGGED), StyledTextAreaBehavior::mouseDragged),
consume(eventType(MouseEvent.DRAG_DETECTED), StyledTextAreaBehavior::dragDetected),
consume(mouseReleased(), StyledTextAreaBehavior::mouseReleased)
); |
I just released WellBehavedFX 0.3, where |
Ok. I updated the build to |
My bad. It should appear on Maven Central in a bit. |
I know you already want this done. So, I'm starting this issue to help facilitate the discussion of issues I come across as I implement this.
The text was updated successfully, but these errors were encountered: