예제 #1
0
 @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();
   }
 }
예제 #2
0
 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();
 }
예제 #3
0
 /** @deprecated As of GWT 1.5, replaced by {@link Window#getClientWidth()} */
 @Deprecated
 public static int windowGetClientWidth() {
   return Window.getClientWidth();
 }