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

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


      public Widget next() {
        if (!hasNext()) {
          throw new NoSuchElementException();
        }
        last = index;
        final Widget w = contained[index];
        gotoNextIndex();
        return w;
      }

      public void remove() {
View Full Code Here


    dropTargetOffsetY = dropTargetLocation.getTop() + DOMUtil.getBorderTop(dropTarget.getElement());

    int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
    int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
    for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
      Widget widget = (Widget) iterator.next();
      Draggable draggable = new Draggable(widget);
      draggable.positioner = makePositioner(widget);
      draggable.relativeX = widget.getAbsoluteLeft() - draggableAbsoluteLeft;
      draggable.relativeY = widget.getAbsoluteTop() - draggableAbsoluteTop;
      draggableList.add(draggable);
    }
  }
View Full Code Here

    int width = 0;
    int height = 0;
    if (dropTarget instanceof HorizontalPanel) {
      for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
        Widget widget = (Widget) iterator.next();
        width += widget.getOffsetWidth();
        height = Math.max(height, widget.getOffsetHeight());
      }
    } else {
      for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
        Widget widget = (Widget) iterator.next();
        width = Math.max(width, widget.getOffsetWidth());
        height += widget.getOffsetHeight();
      }
    }

    SimplePanel inner = new SimplePanel();
    inner.setPixelSize(width - DOMUtil.getHorizontalBorders(outer), height
View Full Code Here

     *
     */
    @FieldName("initialize")
    @Exported
    Element initializeControl(MapWidget map) {
      Widget w = initialize(map);
      map.addControlWidget(w);
      return w.getElement();
    }
View Full Code Here

   */
  public static void addTabListener(final TabPanel panel) {
    panel.addTabListener(new TabListener() {

      public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) {
        Widget widget = panel.getWidget(tabIndex);
        if (widget instanceof LazyPanel) {
          ((LazyPanel) widget).ensureWidget();
        }
        return true;
      }
View Full Code Here

   * selected.
   *
   * @return widget to be focused.
   */
  protected HasFocus getFocusableWidget() {
    Widget w = getWidget();
    if (w instanceof HasFocus) {
      return (HasFocus) w;
    } else {
      return null;
    }
View Full Code Here

    //    scrollPanel.setAlwaysShowScrollBars(true);

    final FocusPanel headerPanel = makeHeader();

    Widget resizePanel;
    resizePanel = makeResizePanel();

    debugDockPanel.add(headerPanel, DockPanel.NORTH);
    debugDockPanel.add(scrollPanel, DockPanel.CENTER);
    debugDockPanel.add(resizePanel, DockPanel.SOUTH);
    DOM.setStyleAttribute(DOM.getParent(resizePanel.getElement()), "lineHeight", "1px");
    debugDockPanel.setCellHorizontalAlignment(resizePanel, HasHorizontalAlignment.ALIGN_RIGHT);

    scrollPanel.setWidget(logTextArea);

    debugDockPanel.setVisible(false);
View Full Code Here

  static Date makeDate(String date) {
    return new Date(date);
  }

  static Widget makeWidget(Element elt) {
    Widget toReturn = new SimplePanel();
    DOM.appendChild(toReturn.getElement(), cloneNode(elt));
    return toReturn;
  }
View Full Code Here

      public void remove() {
        if (lastIndex < 0) {
          throw new IllegalStateException();
        }
        Widget w = (Widget) uiObjectList.get(lastIndex);
        assert (w.getParent() instanceof HTMLTable);
        w.removeFromParent();
        lastIndex = -1;
      }

      private void findNext() {
        while (++nextIndex < uiObjectList.size()) {
View Full Code Here

   * contents of cells.
   */
  public void clear() {
    for (int row = 0; row < getRowCount(); ++row) {
      for (int col = 0; col < getCellCount(row); ++col) {
        Widget child = getWidgetImpl(row, col);
        if (child != null) {
          remove(child);
        }
      }
    }
View Full Code Here

TOP

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

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.