|
|
Re: How to capture Ctrl + A command in NatTable [message #1726850 is a reply to message #1726803] |
Wed, 16 March 2016 21:43   |
Eclipse User |
|
|
|
I'm sorry, I didn't make it clear. Ok, in GlazedListsFilterExample, by following steps
1. Select a row(click row number), the row was selected.
2. Press Ctrl + A, all rows were selected.
If I want to get all selected rows, I may add a button and register a SelectionListener, like this,
button.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
natTable.getSelectionLayer().selectAll();
...
[b]// then get selected list according to natTable.getSelectionLayer().getSelectedRowPositions().[/b]
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// TODO Auto-generated method stub
}
});
While, now I don't want to add a button like that. Is there a listener or event to capture the "Ctrl + A" and then I put my code in it ? I don't know where to put the get selected list logic code.
Another question, when I select all rows, then resize one column width, all column width resized, is it the right behavior? Or, is there any solution to help me only resize one column with when selected all rows? Please see Setp_3.png
Thanks,
Luke
Attachment: Step_1.PNG
(Size: 73.59KB, Downloaded 129 times)
Attachment: Step_2.PNG
(Size: 84.50KB, Downloaded 138 times)
Attachment: Step_3.png
(Size: 131.26KB, Downloaded 149 times)
[Updated on: Thu, 17 March 2016 01:59] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04474 seconds