Feature #2894
Implement browse multiple selection with Shift and Ctrl keys
100%
Related issues
History
#1 Updated by Stanislav Lomany almost 8 years ago
- Status changed from New to WIP
Guys, as far as I get we don't have a way to figure out if a key is held down (or released)?
#2 Updated by Hynek Cihlar almost 8 years ago
Stanislav Lomany wrote:
Guys, as far as I get we don't have a way to figure out if a key is held down (or released)?
No we don't. Currently you can only get type-events for some of the special keys (Ctrl, Alt, Shift).
#3 Updated by Greg Shah almost 8 years ago
Don't we just need to know if these modifier keys are on at the time the mouse is clicked on a row? I imagine there may be some other cursor key movement and a space or enter key that could also be used?
Please describe the functionality that must be implemented.
#4 Updated by Stanislav Lomany almost 8 years ago
Never mind, ctrl and shift modifiers can be found in MouseEvent
.
- On
ctrl+click
: add/remove row to/from the set of selected rows. - On
shift+click
: set the rows from the current row to the clicked row as the set of selected rows.
#5 Updated by Stanislav Lomany almost 8 years ago
Created task branch 2894a from trunk revision 11072.
#6 Updated by Stanislav Lomany almost 8 years ago
Please review task branch 2894a revision 11073.
#7 Updated by Greg Shah almost 8 years ago
Code Review Task Branch 2894a Revision 11073
The changes are fine.
Did you test this on both the web client and the Swing client?
#8 Updated by Stanislav Lomany almost 8 years ago
It doesn't work in web client.
Sergey, can you update MouseEvent.modifiers
when Ctrl or Shift is held? My experience with javascript part is very limited.
#9 Updated by Sergey Ivanovskiy almost 8 years ago
Stanislav Lomany wrote:
It doesn't work in web client.
Sergey, can you update
MouseEvent.modifiers
when Ctrl or Shift is held? My experience with javascript part is very limited.
It seems that Window.prototype.sendMouseEvent
sets Ctrl, Shift and Alt modifiers for a mouse event. I should check it against 2894.
#10 Updated by Sergey Ivanovskiy almost 8 years ago
- File modifiers_diff.txt added
Stanislav, please apply and review this diff. patch -p0 < modifiers_diff.txt
#11 Updated by Sergey Ivanovskiy almost 8 years ago
Modified: Checked ./browse/gui/browse-gui-stat1.p
against the Web client (2894a) and encountered this exception clicking on the browser's scrolling button
DRAW: Ignoring event com.goldencode.p2j.ui.client.event.PaintEvent 9 raised while drawing widget com.goldencode.p2j.ui.client.gui.ScrollBarGuiButton with id [-30]. Jul 25, 2016 11:34:24 PM Dispatcher.processInbound() SEVERE: {main} Unexpected throwable. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:76) at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:705) at com.goldencode.p2j.net.Conversation.block(Conversation.java:364) at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:300) at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1141) at com.goldencode.p2j.net.Queue.transact(Queue.java:598) at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:223) at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:163) at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invokeCore(RemoteObject.java:1425) at com.goldencode.p2j.net.InvocationStub.invoke(InvocationStub.java:97) at com.sun.proxy.$Proxy11.standardEntry(Unknown Source) at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:294) at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:104) at com.goldencode.p2j.main.ClientDriver.start(ClientDriver.java:202) at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:396) at com.goldencode.p2j.main.ClientDriver.process(ClientDriver.java:96) at com.goldencode.p2j.main.ClientDriver.main(ClientDriver.java:265) Caused by: java.lang.ArrayIndexOutOfBoundsException: -7 at com.goldencode.p2j.ui.client.Browse.getCachedRowNumber(Browse.java:523) at com.goldencode.p2j.ui.client.Browse.scrollToRow(Browse.java:5452) at com.goldencode.p2j.ui.client.gui.BrowseGuiImpl.access$4400(BrowseGuiImpl.java:57) at com.goldencode.p2j.ui.client.gui.BrowseGuiImpl$VerticalRowScroller.positionUpdated(BrowseGuiImpl.java:3328) at com.goldencode.p2j.ui.client.ScrollBar.onButtonClick(ScrollBar.java:345) at com.goldencode.p2j.ui.client.gui.ScrollBarGuiImpl.onButtonClick(ScrollBarGuiImpl.java:911) at com.goldencode.p2j.ui.client.gui.ScrollBarGuiImpl.mouseClicked(ScrollBarGuiImpl.java:602) at com.goldencode.p2j.ui.client.gui.driver.MouseHandler.applyMouseEvent(MouseHandler.java:321) at com.goldencode.p2j.ui.client.gui.driver.MouseHandler.handleMouseEvent(MouseHandler.java:239) at com.goldencode.p2j.ui.client.gui.driver.AbstractGuiDriver.handleMouseEvent(AbstractGuiDriver.java:2566) at com.goldencode.p2j.ui.client.TopLevelWindow.processEvent(TopLevelWindow.java:717) at com.goldencode.p2j.ui.client.gui.WindowGuiImpl.processEvent(WindowGuiImpl.java:1306) at com.goldencode.p2j.ui.chui.ThinClient.processProgressEvent(ThinClient.java:15811) at com.goldencode.p2j.ui.chui.ThinClient.processEventsWorker(ThinClient.java:15438) at com.goldencode.p2j.ui.chui.ThinClient.pop(ThinClient.java:14444) at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:14427) at com.goldencode.p2j.ui.chui.ThinClient.eventDrawingBracket(ThinClient.java:14345) at com.goldencode.p2j.ui.chui.ThinClient.applyWorker(ThinClient.java:14101) at com.goldencode.p2j.ui.chui.ThinClient.waitForWorker(ThinClient.java:11378) at com.goldencode.p2j.ui.chui.ThinClient.waitForWorker(ThinClient.java:10883) at com.goldencode.p2j.ui.chui.ThinClient.waitFor(ThinClient.java:10831) at com.goldencode.p2j.ui.chui.ThinClient.waitFor(ThinClient.java:10785) ... 21 more
#12 Updated by Stanislav Lomany almost 8 years ago
Thank you! Ctrl and Shift events work properly. I'll look into ArrayIndexOutOfBoundsException
.
#13 Updated by Sergey Ivanovskiy almost 8 years ago
I can't reproduce it now. It seems that it is not a regular exception.
#14 Updated by Sergey Ivanovskiy almost 8 years ago
I can reproduce it. It needs to move the thumb button down and then click on the scroll bar between the upper scroll bar's button and thumb button. It can be reproduced for the Swing client too.
#15 Updated by Stanislav Lomany almost 8 years ago
Awesome! I see it too.
#16 Updated by Stanislav Lomany almost 8 years ago
Browse scrolling was implemented at the time when there was no ability to click between the thumb and a scrollbar button. Vadim made this functionality work to a certain extent when this ability was added, but neither horizontal nor vertical scrolling work accurately. I'm working on it.
#17 Updated by Stanislav Lomany over 7 years ago
Task brank 2894a rebased to trunk revision 11074.
#18 Updated by Stanislav Lomany over 7 years ago
Please review task branch 2894a revision 11079.
#19 Updated by Greg Shah over 7 years ago
Code Review Task Branch 2894a Revision 11079
Generally the changes look good. My only question:
In BrowseGuiImpl.HorizontalColumnScroller.positionUpdated()
, there is this code (line 3170):
if (position == oldPosition || colNo == 0 || config.numLockedColumns == colNo)
I'm wondering if the config.numLockedColumns == colNo
should be changed to colNo <= config.numLockedColumns
or even colNo < config.numLockedColumns
(since config.numLockedColumns
is zero-based)?
#20 Updated by Stanislav Lomany over 7 years ago
Yes, that adds even more safety. I'll regression test for the case.
#21 Updated by Stanislav Lomany over 7 years ago
Regression testing passed. Should I commit?
#22 Updated by Greg Shah over 7 years ago
Go ahead.
#23 Updated by Stanislav Lomany over 7 years ago
- Status changed from WIP to Review
Task branch 2894a merged to trunk as revision 11075.
#24 Updated by Greg Shah over 7 years ago
- % Done changed from 0 to 100
- Start date deleted (
12/01/2015) - Target version set to Milestone 16
- Status changed from Review to Closed
#25 Updated by Greg Shah over 7 years ago
- Target version changed from Milestone 16 to Cleanup and Stabilization for GUI