package com.itmill.toolkit.terminal.gwt.client.ui;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
private int selectMode = Table.SELECT_MODE_NONE;
- private Vector selectedRowKeys = new Vector();
+ private HashSet selectedRowKeys = new HashSet();
private boolean initializedAndAttached = false;
this.paintableId = uidl.getStringAttribute("id");
this.immediate = uidl.getBooleanAttribute("immediate");
int newTotalRows = uidl.getIntAttribute("totalrows");
- if(newTotalRows != totalRows) {
+ if (newTotalRows != totalRows) {
this.totalRows = newTotalRows;
- if(initializedAndAttached)
+ if (initializedAndAttached)
tBody.setContainerHeight();
}
-
+
this.pageLength = uidl.getIntAttribute("pagelength");
if (pageLength == 0)
pageLength = totalRows;
} else {
tBody = new IScrollTableBody();
- tBody.renderInitialRows(rowData,
- uidl.getIntAttribute("firstrow"),
+ tBody.renderInitialRows(rowData, uidl.getIntAttribute("firstrow"),
uidl.getIntAttribute("rows"));
bodyContainer.add(tBody);
initialContentReceived = true;
private void updateBody(UIDL uidl, int firstRow, int reqRows) {
if (uidl == null || reqRows < 1) {
// container is empty, remove possibly existing rows
- if(firstRow < 0) {
- while(tBody.getLastRendered() > tBody.firstRendered)
+ if (firstRow < 0) {
+ while (tBody.getLastRendered() > tBody.firstRendered)
tBody.unlinkRow(false);
tBody.unlinkRow(false);
}
super.onAttach();
setContainerHeight();
}
-
+
/**
- * Fix container blocks height according to totalRows to avoid "bouncing" when scrolling
+ * Fix container blocks height according to totalRows to avoid
+ * "bouncing" when scrolling
*/
private void setContainerHeight() {
fixSpacers();