Skip to content

Commit 499ab9a

Browse files
author
soheil_h_y
committed
1. Full selection of the table item works correctly now.
1 parent 6e35f30 commit 499ab9a

File tree

1 file changed

+7
-3
lines changed
  • sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets

1 file changed

+7
-3
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/TableItem.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,9 +1205,13 @@ void showSelection(boolean selected) {
12051205
if ((parent.style & SWT.CHECK) != 0) {
12061206
index++;
12071207
}
1208-
Element element = handle.childNodes[0].childNodes[0].childNodes[index];
1209-
//System.out.println(handle.childNodes[0].childNodes[0].innerHTML);
1210-
element.className = selected ? "table-item-cell-text-selected" : "table-item-cell-text-default";
1208+
if((parent.style & SWT.FULL_SELECTION) != 0){
1209+
handle.className = selected ? "table-item-selected" : "table-item-default";
1210+
}else{
1211+
// System.out.println(handle.className);
1212+
Element element = handle.childNodes[0].childNodes[0].childNodes[index];
1213+
element.className = selected ? "table-item-cell-text-selected" : "table-item-cell-text-default";
1214+
}
12111215
}
12121216

12131217
// void setSelected(boolean selected){

0 commit comments

Comments
 (0)