@Override public void run() { int newHeight = Window.getClientHeight(); int newWidth = Window.getClientWidth(); if (newHeight != height) { height = newHeight; LayoutContainer center = (LayoutContainer) Registry.get(AppView.CENTER_PANEL); calendar.setHeight(center.getHeight() - calendarHeightSize + "px"); calendar.doSizing(); calendar.doLayout(); } }
public void onMouseMove(MouseMoveEvent event) { if (isMouseDown()) { setDragging(true); updateCSS(); model.setX(event.getX() + model.getX() - dragStartX); model.setY(event.getY() + model.getY() - dragStartY); onUpdateInModel(); int clientX = event.getClientX(); int clientY = event.getClientY(); boolean outsideWindow = clientX < 0 || clientY < 0 || clientX > Window.getClientWidth() || clientY > Window.getClientHeight(); if (outsideWindow) { parent.save(model, true); setDragging(false); } } event.preventDefault(); }
/** @deprecated As of GWT 1.5, replaced by {@link Window#getClientHeight()} */ @Deprecated public static int windowGetClientHeight() { return Window.getClientHeight(); }