Browse Source

scrolltable theme refactoring: cleaning, fixing regressions

svn changeset:7523/svn branch:6.0
tags/6.7.0.beta1
Matti Tahvonen 15 years ago
parent
commit
321befdac2
1 changed files with 12 additions and 13 deletions
  1. 12
    13
      src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java

+ 12
- 13
src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java View File



import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NodeList; import com.google.gwt.dom.client.NodeList;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.TableCellElement; import com.google.gwt.dom.client.TableCellElement;
import com.google.gwt.dom.client.TableRowElement; import com.google.gwt.dom.client.TableRowElement;
import com.google.gwt.dom.client.TableSectionElement; import com.google.gwt.dom.client.TableSectionElement;
} }


int availW = tBody.getAvailableWidth(); int availW = tBody.getAvailableWidth();
// Hey IE, are you really sure about this?
availW = tBody.getAvailableWidth();
if (BrowserInfo.get().isIE()) {
// Hey IE, are you really sure about this?
availW = tBody.getAvailableWidth();
}
availW -= tBody.getCellExtraWidth() * visibleColOrder.length; availW -= tBody.getCellExtraWidth() * visibleColOrder.length;


if (willHaveScrollbarz) { if (willHaveScrollbarz) {
*/ */
int bodyHeight = tBody.getTableHeight(); int bodyHeight = tBody.getTableHeight();
bodyContainer.setHeight(bodyHeight + "px"); bodyContainer.setHeight(bodyHeight + "px");
Util.runWebkitOverflowAutoFix(bodyContainer.getElement());
} else { } else {
int bodyHeight = (tBody.getRowHeight(true) * pageLength); int bodyHeight = (tBody.getRowHeight(true) * pageLength);
bodyContainer.setHeight(bodyHeight + "px"); bodyContainer.setHeight(bodyHeight + "px");
initializedAndAttached = true; initializedAndAttached = true;
} }


private int getScrollbarWidth() {
if (BrowserInfo.get().isIE6()) {
return Util.measureHorizontalBorder(bodyContainer.getElement());
}

return bodyContainer.getOffsetWidth()
- DOM.getElementPropertyInt(bodyContainer.getElement(),
"clientWidth");
}

/** /**
* This method has logic which rows needs to be requested from server when * This method has logic which rows needs to be requested from server when
* user scrolls * user scrolls
} }


public int getAvailableWidth() { public int getAvailableWidth() {
return preSpacer.getOffsetWidth();
Style style = bodyContainer.getElement().getStyle();
style.setProperty("overflow", "hidden");
int w = bodyContainer.getElement().getPropertyInt("clientWidth");
style.setProperty("overflow", "auto");
return w;
// return preSpacer.getOffsetWidth();
} }


public void renderInitialRows(UIDL rowData, int firstIndex, int rows) { public void renderInitialRows(UIDL rowData, int firstIndex, int rows) {

Loading…
Cancel
Save