Changeset 19205 in svn
- Timestamp:
- 06/03/11 06:47:11 (2 years ago)
- Location:
- addons/TreeTable/src/com/vaadin/addon/treetable/client/ui
- Files:
-
- 1 added
- 1 edited
-
VPatchedScrollTable.java (added)
-
VTreeTable.java (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
addons/TreeTable/src/com/vaadin/addon/treetable/client/ui/VTreeTable.java
r19158 r19205 11 11 import com.google.gwt.user.client.Event; 12 12 import com.google.gwt.user.client.ui.Widget; 13 import com.vaadin.addon.treetable.client.ui.VPatchedScrollTable.VScrollTableBody.VScrollTableRow; 13 14 import com.vaadin.addon.treetable.client.ui.VTreeTable.VTreeTableScrollBody.VTreeTableRow; 14 15 import com.vaadin.terminal.gwt.client.ApplicationConnection; … … 16 17 import com.vaadin.terminal.gwt.client.UIDL; 17 18 import com.vaadin.terminal.gwt.client.ui.FocusableScrollPanel; 18 import com.vaadin.terminal.gwt.client.ui.VScrollTable; 19 20 public class VTreeTable extends VScrollTable { 19 20 public class VTreeTable extends VPatchedScrollTable { 21 21 22 22 public static final String ATTRIBUTE_HIERARCHY_COLUMN_INDEX = "hci"; … … 24 24 private boolean selectionPending; 25 25 private int colIndexOfHierarchy; 26 private String collapsedRowKey; 26 27 27 28 @Override … … 38 39 super.updateFromUIDL(uidl, client); 39 40 if (collapseRequest) { 41 if (collapsedRowKey != null && scrollBody != null) { 42 VScrollTableRow row = getRenderedRowByKey(collapsedRowKey); 43 if (row != null) { 44 setRowFocus(row); 45 focus(); 46 } 47 } 48 40 49 int scrollPosition2 = widget.getScrollPosition(); 41 50 if (scrollPosition != scrollPosition2) { … … 50 59 // TODO figure out if the row needs to focused at all 51 60 52 // scrolled to parent by the server, focusedRow is probably the sam e61 // scrolled to parent by the server, focusedRow is probably the sam 53 62 // as the first row in view port 54 55 63 } 56 64 } … … 61 69 } 62 70 63 class VTreeTableScrollBody extends 64 com.vaadin.terminal.gwt.client.ui.VScrollTable.VScrollTableBody { 71 class VTreeTableScrollBody extends VPatchedScrollTable.VScrollTableBody { 65 72 private int identWidth = -1; 66 73 … … 75 82 76 83 class VTreeTableRow extends 77 V ScrollTable.VScrollTableBody.VScrollTableRow {84 VPatchedScrollTable.VScrollTableBody.VScrollTableRow { 78 85 79 86 private boolean isTreeCellAdded = false; … … 299 306 300 307 private void sendToggleCollapsedUpdate(String rowKey) { 308 collapsedRowKey = rowKey; 301 309 collapseRequest = true; 302 310 client.updateVariable(paintableId, "toggleCollapsed", rowKey, true);
Note: See TracChangeset
for help on using the changeset viewer.
