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

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


    int top = DOM.getAbsoluteTop(cellElem);
    int left = DOM.getAbsoluteLeft(cellElem);
    setPopupPosition(left, top);

    // Set the current value
    Widget widget = table.getWidget(row, cell);
    if (widget == null) {
      setValue(table.getHTML(row, cell));
    } else {
      setValue(widget);
    }
View Full Code Here


    dragHandlers.add(handler);
  }

  public void clearSelection() {
    for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
      Widget widget = (Widget) iterator.next();
      widget.removeStyleName(CSS_SELECTED);
      iterator.remove();
    }
  }
View Full Code Here

   * applied when making the widget draggable.
   *
   * @param draggable the widget to no longer be draggable
   */
  public void makeNotDraggable(Widget draggable) {
    Widget dragHandle = (Widget) dragHandles.remove(draggable);
    mouseDragHandler.makeNotDraggable(dragHandle);
    draggable.removeStyleName(PRIVATE_CSS_DRAGGABLE);
    dragHandle.removeStyleName(PRIVATE_CSS_HANDLE);
  }
View Full Code Here

  }

  public void setBehaviorMultipleSelection(boolean multipleSelectionAllowed) {
    this.multipleSelectionAllowed = multipleSelectionAllowed;
    for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
      Widget widget = (Widget) iterator.next();
      widget.removeStyleName(CSS_SELECTED);
      iterator.remove();
    }
  }
View Full Code Here

    if (mouseDownWidget == null) {
      return;
    }

    if (dragging != ACTIVELY_DRAGGING) {
      Widget widget = (Widget) dragHandleMap.get(mouseDownWidget);
      assert widget != null;
      if (!toggleKey(event)) {
        context.dragController.clearSelection();
      }
      context.dragController.toggleSelection(widget);
View Full Code Here

  @SuppressWarnings("unchecked")
  public InfoWindowContent(InfoWindowTab[] tabs) {
    this.content = ((JSWrapper) JsUtil.toJsList(tabs)).getJavaScriptObject();
    this.type = TYPE_TABBED;
    for (int i = 0; i < tabs.length; i++) {
      Widget w = tabs[i].getWidget();
      if (w != null) {
        widgets.add(w);
      }
    }
  }
View Full Code Here

        handleAriaAttributes();
    }

    private void handleAriaAttributes() {
        Widget removeFromWidget;
        Widget setForWidget;

        if (isTextFieldEnabled()) {
            setForWidget = text;
            removeFromWidget = calendarToggle;
        } else {
            setForWidget = calendarToggle;
            removeFromWidget = text;
        }

        Roles.getFormRole().removeAriaLabelledbyProperty(
                removeFromWidget.getElement());
        if (captionId == null) {
            Roles.getFormRole().removeAriaLabelledbyProperty(
                    setForWidget.getElement());
        } else {
            Roles.getFormRole().setAriaLabelledbyProperty(
                    setForWidget.getElement(), Id.of(captionId));
        }
    }
View Full Code Here

     * @see com.google.gwt.user.client.ui.ComplexPanel#getWidget(int)
     */
    @Override
    public Widget getWidget(int index) {
        for (int i = 0, j = 0; i < super.getWidgetCount(); i++) {
            Widget w = super.getWidget(i);
            if (w instanceof AbsoluteWrapper) {
                if (j == index) {
                    return w;
                } else {
                    j++;
View Full Code Here

     * gwt.user.client.ui.Widget)
     */
    @Override
    public int getWidgetIndex(Widget child) {
        for (int i = 0, j = 0; i < super.getWidgetCount(); i++) {
            Widget w = super.getWidget(i);
            if (w instanceof AbsoluteWrapper) {
                if (child == w) {
                    return j;
                } else {
                    j++;
View Full Code Here

     * @param element
     * @return
     */
    private VDropHandler findDragTarget(Element element) {
        try {
            Widget w = Util.findWidget(element, null);
            if (w == null) {
                return null;
            }
            while (!(w instanceof VHasDropHandler)
                    || !isDropEnabled((VHasDropHandler) w)) {
                w = w.getParent();
                if (w == null) {
                    break;
                }
            }
            if (w == null) {
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.