Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.AbsolutePanel


     */
    public void makeResizable(final Window window) {
      windowController.getPickupDragController().makeDraggable(window, window.getHeaderWidget());
      window.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          AbsolutePanel boundaryPanel = windowController.getBoundaryPanel();
          if (boundaryPanel.getWidgetIndex(window) < boundaryPanel.getWidgetCount() - 1) {
            // force our panel to the top of our z-index context
            WidgetLocation location = new WidgetLocation(window, boundaryPanel);
            boundaryPanel.add(window, location.getLeft(), location.getTop());
          }
        }
      });
      windowController.getResizeDragController().makeDraggable(window.getBoundaryWidget(Direction.NORTH), Direction.NORTH);
      windowController.getResizeDragController().makeDraggable(window.getBoundaryWidget(Direction.NORTH_WEST), Direction.NORTH_WEST);
View Full Code Here


    body.setTopLeftWidget(this.editor);
    body.setTopRightWidget(this.previewer);
    body.setBottomWidget(this.output);
    contentPane.setWidget(0, 0, headerPanel);
    contentPane.setWidget(1, 0, body);
    root = new AbsolutePanel();
    root.setSize("100%", "100%");
    root.add(contentPane);
    RootPanel.get().add(root);
   
    PickupDragController dragController = new PickupDragController(root, true);
View Full Code Here

       * @param win the window to move
       * @param right the horizontal distance
       * @param down the vertical distance
       */
      private void moveBy(Window win, int right, int down) {
        AbsolutePanel parent = (AbsolutePanel) win.getParent();
        Location location = new WidgetLocation(win, parent);
        int finalX = location.getLeft() + right;
        int finalY = location.getTop() + down;
        parent.setWidgetPosition(win, finalX, finalY);
      }
View Full Code Here

    body.setTopRightWidget(this.previewer);
    body.setBottomWidget(this.output);
    contentPane.setWidget(0, 0, headerPanel);
    contentPane.setWidget(1, 0, body);
    contentPane.setWidget(2, 0, footer);
    root = new AbsolutePanel();
    root.setSize("100%", "100%");
    root.add(contentPane);
    FocusPanel wrap = new FocusPanel(root);
    controlKeyHandler = new IntRunnable() {
    @Override
View Full Code Here

            return false;
          }

          @Override
          protected Widget initialize(MapWidget map) {
            return new AbsolutePanel();
          }
        };
      }
    }, true, MAPS_MIN_VERSION);
  }
View Full Code Here

    buildControlPanelRow(resultTable, "", startStopButton);
    tableWrapper.setWidget(resultTable);

    // Position the Animation so that it looks centered.
    Widget toy = new AnimationToy();
    AbsolutePanel toyWrapper = new AbsolutePanel();
    toyWrapper.setSize("450px", "210px");
    toyWrapper.add(toy, 70, 0);
    outerPanel.add(toyWrapper);

    HTML desc = new HTML(INTERACTION_DESC);
    desc.setWidth("450px");
    outerPanel.add(desc);
View Full Code Here

   * Initialize this example.
   */
  private Widget initialize() {

    // Create a new panel
    absolutePanel = new AbsolutePanel();

    // Add a widget that we will animate
    animateeTop = new Image("gwtLogoThumb.png");
    animateeBottom = new Image("gwtLogoThumb.png");
    animateeLeft = new Image("gwtLogoThumb.png");
View Full Code Here

      context.boundaryPanel.add(movablePanel, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
      checkGWTIssue1813(movablePanel, context.boundaryPanel);
    } else {
      saveSelectedWidgetsLocationAndStyle();
      AbsolutePanel container = new AbsolutePanel();
      container.getElement().getStyle().setProperty("overflow", "visible");

      container.setPixelSize(context.draggable.getOffsetWidth(),
          context.draggable.getOffsetHeight());
      context.boundaryPanel.add(container, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
      checkGWTIssue1813(container, context.boundaryPanel);

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      HashMap<Widget, CoordinateLocation> widgetLocation = new HashMap<Widget, CoordinateLocation>();
      for (Widget widget : context.selectedWidgets) {
        widgetLocation.put(widget, new CoordinateLocation(widget.getAbsoluteLeft(),
            widget.getAbsoluteTop()));
      }

      context.dropController = getIntersectDropController(context.mouseX, context.mouseY);
      if (context.dropController != null) {
        context.dropController.onEnter(context);
      }

      for (Widget widget : context.selectedWidgets) {
        Location location = widgetLocation.get(widget);
        int relativeX = location.getLeft() - draggableAbsoluteLeft;
        int relativeY = location.getTop() - draggableAbsoluteTop;
        container.add(widget, relativeX, relativeY);
      }
      movablePanel = container;
    }
    movablePanel.addStyleName(PRIVATE_CSS_MOVABLE_PANEL);
View Full Code Here

   *
   * @param context the current drag context
   * @return a new drag proxy
   */
  protected Widget newDragProxy(DragContext context) {
    AbsolutePanel container = new AbsolutePanel();
    container.getElement().getStyle().setProperty("overflow", "visible");

    WidgetArea draggableArea = new WidgetArea(context.draggable, null);
    for (Widget widget : context.selectedWidgets) {
      WidgetArea widgetArea = new WidgetArea(widget, null);
      Widget proxy = new SimplePanel();
      proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight());
      proxy.addStyleName(PRIVATE_CSS_PROXY);
      container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(), widgetArea.getTop()
          - draggableArea.getTop());
    }

    return container;
  }
View Full Code Here

      context.boundaryPanel.add(movablePanel, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
      checkGWTIssue1813(movablePanel, context.boundaryPanel);
    } else {
      saveSelectedWidgetsLocationAndStyle();
      AbsolutePanel container = new AbsolutePanel();
      container.getElement().getStyle().setProperty("overflow", "visible");

      container.setPixelSize(context.draggable.getOffsetWidth(),
          context.draggable.getOffsetHeight());
      context.boundaryPanel.add(container, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
      checkGWTIssue1813(container, context.boundaryPanel);

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      HashMap<Widget, CoordinateLocation> widgetLocation = new HashMap<Widget, CoordinateLocation>();
      for (Widget widget : context.selectedWidgets) {
        widgetLocation.put(widget, new CoordinateLocation(widget.getAbsoluteLeft(),
            widget.getAbsoluteTop()));
      }

      context.dropController = getIntersectDropController(context.mouseX, context.mouseY);
      if (context.dropController != null) {
        context.dropController.onEnter(context);
      }

      for (Widget widget : context.selectedWidgets) {
        Location location = widgetLocation.get(widget);
        int relativeX = location.getLeft() - draggableAbsoluteLeft;
        int relativeY = location.getTop() - draggableAbsoluteTop;
        container.add(widget, relativeX, relativeY);
      }
      movablePanel = container;
    }
    movablePanel.addStyleName(DragClientBundle.INSTANCE.css().movablePanel());
    calcBoundaryOffset();
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.AbsolutePanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.