public void onResize(ResizeEvent event) { Style style = glass.getStyle(); int winWidth = Window.getClientWidth(); int winHeight = Window.getClientHeight(); // Hide the glass while checking the document size. Otherwise it would // interfere with the measurement. style.setDisplay(Display.NONE); style.setWidth(0, Unit.PX); style.setHeight(0, Unit.PX); int width = Document.get().getScrollWidth(); int height = Document.get().getScrollHeight(); // Set the glass size to the larger of the window's client size or the // document's scroll size. style.setWidth(Math.max(width, winWidth), Unit.PX); style.setHeight(Math.max(height, winHeight), Unit.PX); // The size is set. Show the glass again. style.setDisplay(Display.BLOCK); } };
@Override public int getScrollHeight() { return Document.get().getScrollHeight(); }
Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Unit.PX); glassElem.getStyle().setWidth(width, Unit.PX);
public void onResize(ResizeEvent event) { Style style = glass.getStyle(); int winWidth = Window.getClientWidth(); int winHeight = Window.getClientHeight(); // Hide the glass while checking the document size. Otherwise it would // interfere with the measurement. style.setDisplay(Display.NONE); style.setWidth(0, Unit.PX); style.setHeight(0, Unit.PX); int width = Document.get().getScrollWidth(); int height = Document.get().getScrollHeight(); // Set the glass size to the larger of the window's client size or the // document's scroll size. style.setWidth(Math.max(width, winWidth), Unit.PX); style.setHeight(Math.max(height, winHeight), Unit.PX); // The size is set. Show the glass again. style.setDisplay(Display.BLOCK); } };
public void onResize(ResizeEvent event) { Style style = glass.getStyle(); int winWidth = Window.getClientWidth(); int winHeight = Window.getClientHeight(); // Hide the glass while checking the document size. Otherwise it would // interfere with the measurement. style.setDisplay(Display.NONE); style.setWidth(0, Unit.PX); style.setHeight(0, Unit.PX); int width = Document.get().getScrollWidth(); int height = Document.get().getScrollHeight(); // Set the glass size to the larger of the window's client size or the // document's scroll size. style.setWidth(Math.max(width, winWidth), Unit.PX); style.setHeight(Math.max(height, winHeight), Unit.PX); // The size is set. Show the glass again. style.setDisplay(Display.BLOCK); } };
scrollHeight = Document.get().getScrollHeight(); maxScroll = scrollHeight - Document.get().getClientHeight(); } else {
public void resetPosistion() { if (!this.isVisible()) { return; } int scrollTop = Window.getScrollTop(); int docHeigth = Document.get().getScrollHeight(); this.getElement().getStyle().clearHeight(); this.offsetHeight = this.getElement().getClientHeight(); int top = this.pinnedOffset - scrollTop - this.offsetTop; int bottom = docHeigth - scrollTop - this.offsetBottom - this.offsetTop - this.offsetHeight; if (bottom <= 0 || this.fixBottom != Integer.MIN_VALUE) { this.toggleAffix(Affixed.BOTTOM); } else if (top >= 0) { this.toggleAffix(Affixed.TOP); } else { this.toggleAffix(Affixed.AFFIX); } }
public void resetPosistion() { if (!this.isVisible()) { return; } int scrollTop = Window.getScrollTop(); int docHeigth = Document.get().getScrollHeight(); this.getElement().getStyle().clearHeight(); this.offsetHeight = this.getElement().getClientHeight(); int top = this.pinnedOffset - scrollTop - this.offsetTop; int bottom = docHeigth - scrollTop - this.offsetBottom - this.offsetTop - this.offsetHeight; if (bottom <= 0 || this.fixBottom != Integer.MIN_VALUE) { this.toggleAffix(Affixed.BOTTOM); } else if (top >= 0) { this.toggleAffix(Affixed.TOP); } else { this.toggleAffix(Affixed.AFFIX); } }
scrollHeight = Document.get().getScrollHeight(); maxScroll = scrollHeight - Document.get().getClientHeight(); } else {
@Override public void onMouseDown(MouseDownEvent event) { setupMoveIcon(); mouseDown = true; int width = Math.max(Window.getClientWidth(), Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Style.Unit.PX); glassElem.getStyle().setWidth(width, Style.Unit.PX); Document.get().getBody().appendChild(glassElem); buildOffset(event); Event.setCapture(getElement()); event.preventDefault(); } },
@Override public void onMouseDown(MouseDownEvent event) { setupMoveIcon(); mouseDown = true; int width = Math.max(Window.getClientWidth(), Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Style.Unit.PX); glassElem.getStyle().setWidth(width, Style.Unit.PX); Document.get().getBody().appendChild(glassElem); buildOffset(event); Event.setCapture(getElement()); event.preventDefault(); } },
@Override public void onMouseDown(final MouseDownEvent event) { mouseDown = true; int width = Math.max(Window.getClientWidth(), Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Style.Unit.PX); glassElem.getStyle().setWidth(width, Style.Unit.PX); Document.get().getBody().appendChild(glassElem); buildOffset(event); Event.setCapture(getElement()); event.preventDefault(); } },
@Override public void onMouseDown(final MouseDownEvent event) { mouseDown = true; int width = Math.max(Window.getClientWidth(), Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Style.Unit.PX); glassElem.getStyle().setWidth(width, Style.Unit.PX); Document.get().getBody().appendChild(glassElem); buildOffset(event); Event.setCapture(getElement()); event.preventDefault(); } },
break; case BOTTOM: int docHeigth = Document.get().getScrollHeight(); int scrollTop = Window.getScrollTop();
break; case BOTTOM: int docHeigth = Document.get().getScrollHeight(); int scrollTop = Window.getScrollTop();
Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Unit.PX); glassElem.getStyle().setWidth(width, Unit.PX);
Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Unit.PX); glassElem.getStyle().setWidth(width, Unit.PX);
Document.get().getScrollWidth()); int height = Math.max(Window.getClientHeight(), Document.get().getScrollHeight()); glassElem.getStyle().setHeight(height, Unit.PX);