horizontalScrollbar.getElement().getStyle()
.setLeft(frozenPixels, Unit.PX);
horizontalScrollbar.setScrollPos(prevScrollPos);
+
+ /*
+ * only show the scrollbar wrapper if the scrollbar itself is
+ * visible.
+ */
+ if (horizontalScrollbar.showsScrollHandle()) {
+ horizontalScrollbarBackground.getStyle().clearDisplay();
+ } else {
+ horizontalScrollbarBackground.getStyle().setDisplay(
+ Display.NONE);
+ }
}
/**
private final ColumnConfigurationImpl columnConfiguration = new ColumnConfigurationImpl();
private final DivElement tableWrapper;
+ private final DivElement horizontalScrollbarBackground = DivElement.as(DOM
+ .createDiv());
+
private PositionFunction position;
/** The cached width of the escalator, in pixels. */
table.appendChild(bodyElem);
table.appendChild(footElem);
+ Style hWrapperStyle = horizontalScrollbarBackground.getStyle();
+ hWrapperStyle.setDisplay(Display.NONE);
+ hWrapperStyle.setHeight(Util.getNativeScrollbarSize(), Unit.PX);
+ root.appendChild(horizontalScrollbarBackground);
+
setStylePrimaryName("v-escalator");
// init default dimensions
horizontalScrollbar.setStylePrimaryName(style);
UIObject.setStylePrimaryName(tableWrapper, style + "-tablewrapper");
+ UIObject.setStylePrimaryName(horizontalScrollbarBackground, style
+ + "-horizontalscrollbarbackground");
header.setStylePrimaryName(style);
body.setStylePrimaryName(style);