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

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


          }
          break;
        case PAGE:
          button.setActive(button.getPage() == currentPage);
          button.setEnabled(button.getPage().canShow());
          Widget widget = button.getPage().asWidget();
          if (widget != null) {
            widget.setVisible(button.getPage() == currentPage);
          }
          break;
      }
    }
  }
View Full Code Here


  public Widget getParent() {
    return parent;
  }

  public void setParent(Widget parent) {
    Widget oldParent = this.parent;
    if (parent == null) {
      if (oldParent != null && oldParent.isAttached()) {
        onDetach();
        assert !isAttached() : "Failure of " + this.getClass().getName() + " to call super.onDetach()";
      }
      this.parent = null;
    } else {
View Full Code Here

  public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) {
    return null;
  }

  public Widget asWidget() {
    return new Widget();
  }
View Full Code Here

   */
  public String getTabHTML(int index) {
    if (index >= getTabCount()) {
      return null;
    }
    Widget widget = panel.getWidget(index + 1);
    return ((TabItemWidget) widget).getTabHTML();
  }
View Full Code Here

 
  public boolean setTabHTML(int index, String text) {
   if (index >= getTabCount()) {
      return false;
    }
   Widget widget = panel.getWidget(index + 1);
   ((TabItemWidget) widget).setTabHTML(text);
   return true;
  }
View Full Code Here

   */
  public void removeTab(int index) {
  checkTabIndex(index);

  // (index + 1) to account for 'first' placeholder widget.
  Widget toRemove = panel.getWidget(index + 1);
  if (toRemove == selectedTab) {
    selectedTab = null;
  }
  panel.remove(toRemove);
 
View Full Code Here

   */
  private boolean elementEnabled(Element element) {
    if (DOM.isOrHasChild(getElement(), element))
      return true;

    Widget cursor = this.getParent();
    Widget lastSlider = this;
    Widget firstSlider = null;
    while (!(cursor instanceof SliderTabPanel)
        && !(cursor instanceof RootPanel)) {
      if (cursor instanceof Slider) {
        lastSlider = cursor;
        if (firstSlider == null)
View Full Code Here

            }
        } );

        verticalPanel.add( titleBar );

        Widget content = getContent();

        content.setWidth( "100%" );
        verticalPanel.add( content );
        add( verticalPanel );

        super.show();
View Full Code Here

    }

    private void focusFirstWidget(Widget content) {
        if ( content instanceof FormStyleLayout ) {
            FormStyleLayout fsl = (FormStyleLayout) content;
            Widget ow = fsl.getWidget();
            if ( ow instanceof HasWidgets ) {
                focusFirstWidget( (HasWidgets) ow );
            }
        }
    }
View Full Code Here

    private boolean focusFirstWidget(HasWidgets container) {
        boolean bFocused = false;
        Iterator<Widget> iw = container.iterator();
        while ( !bFocused && iw.hasNext() ) {
            Widget w = iw.next();
            if ( w instanceof HasWidgets ) {
                bFocused = focusFirstWidget( (HasWidgets) w );
            } else if ( w instanceof Focusable ) {
                ((Focusable) w).setFocus( true );
                bFocused = true;
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.