Support select first N rows by Shift+Click in Table #PL-3267

This commit is contained in:
Yuriy Artamonov 2013-12-10 11:46:21 +00:00
parent 0b32d35998
commit 2214d99f1a
3 changed files with 33 additions and 1 deletions

View File

@ -60,7 +60,7 @@ def webToolkitLegacyModule = project(':cuba-web6-toolkit')
def webModuleThemes = project(':cuba-web-themes')
def webLegacyModuleThemes = project(':cuba-web6-themes')
def vaadinVersion = '7.1.8.cuba.6'
def vaadinVersion = '7.1.8.cuba.7'
def vaadinLegacyVersion = '6.6.1.140'
def springVersion = '3.1.3.RELEASE'

View File

@ -57,6 +57,22 @@ public class CubaScrollTableWidget extends VScrollTable implements ShortcutActio
DOM.sinkEvents(getElement(), Event.ONKEYDOWN);
}
@Override
protected VScrollTableBody.VScrollTableRow getNextRowToFocus(VScrollTableBody.VScrollTableRow currentRow, int offset) {
// Support select first N rows by Shift+Click #PL-3267
if (focusedRow == currentRow && !focusedRow.isSelected()) {
return focusedRow;
}
return super.getNextRowToFocus(currentRow, offset);
}
@Override
protected boolean needToSelectFocused(VScrollTableBody.VScrollTableRow currentRow) {
// Support select first N rows by Shift+Click #PL-3267
return currentRow == focusedRow && (!focusedRow.isSelected());
}
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);

View File

@ -78,6 +78,22 @@ public class CubaTreeTableWidget extends VTreeTable {
removeStyleDependentName("body-focus");
}
@Override
protected VScrollTableBody.VScrollTableRow getNextRowToFocus(VScrollTableBody.VScrollTableRow currentRow, int offset) {
// Support select first N rows by Shift+Click #PL-3267
if (focusedRow == currentRow && !focusedRow.isSelected()) {
return focusedRow;
}
return super.getNextRowToFocus(currentRow, offset);
}
@Override
protected boolean needToSelectFocused(VScrollTableBody.VScrollTableRow currentRow) {
// Support select first N rows by Shift+Click #PL-3267
return currentRow == focusedRow && (!focusedRow.isSelected());
}
@Override
protected TableHead createTableHead() {
return new CubaTreeTableTableHead();