Package com.extjs.gxt.ui.client.widget

Examples of com.extjs.gxt.ui.client.widget.Component


  }
 
  @Override
  public void onTab(Component component, PreviewEvent pe) {
    pe.stopEvent();
    Component c = (Component)component.getParent().getParent();
    c.el().selectNode("iframe").focus();
  }
View Full Code Here


  @Override
  public void onRight(Component component, PreviewEvent pe) {
    if (component.getParent() instanceof PagingToolBar) {
      return;
    }
    Component c = (Component) findNextWidget(component);
    if (c != null && c.getData("gxt-overflow") != null) {
      pe.stopEvent();
      ToolBar bar = (ToolBar) component.getParent();
      ToolBarLayout layout = bar.getLayout();
      Button more = layout.getMoreButton();
      more.focus();
View Full Code Here

    ToolBar bar = (ToolBar)component.getParent();
    ToolBarLayout layout = bar.getLayout();
    Button more = layout.getMoreButton();
    if (component == more) {
      for (int i = bar.getItemCount() - 1; i >= 0; i--) {
        Component c = bar.getItem(i);
        if (!isIgnore(c) && c.getData("gxt-overflow") == null) {
          focusWidget(c, false);
          return;
        }
      }
    }
View Full Code Here

  }

  @Override
  protected void onRender(Element target, int index) {
    if (widget instanceof Component) {
      Component c = (Component) widget;
      if (!c.isRendered()) {
        c.render(target, index);
      }
    }
    setElement(widget.getElement(), target, index);
    if (widget instanceof LayoutContainer) {
      ((LayoutContainer) widget).layout();
View Full Code Here

    }
    return false;
  }

  protected void onClick(ComponentEvent ce) {
    Component item = findItem(ce.getTarget());
    if (item != null && item instanceof Item) {
      ((Item) item).onClick(ce);
    }
  }
View Full Code Here

    super.onLayoutExcecuted(layout);
    doAutoSize();
  }

  protected void onMouseMove(ComponentEvent ce) {
    Component c = findItem(ce.getTarget());
    if (c != null && c instanceof Item) {
      Item item = (Item) c;
      if (activeItem != item && item.canActivate && item.isEnabled()) {
        setActiveItem(item, true);
      }
View Full Code Here

  }

  protected void onMouseOver(ComponentEvent ce) {
    EventTarget from = ce.getEvent().getRelatedEventTarget();
    if (from == null || (Element.is(from) && !DOM.isOrHasChild(getElement(), (Element) Element.as(from)))) {
      Component c = findItem(ce.getTarget());
      if (c != null && c instanceof Item) {
        Item item = (Item) c;
        if (activeItem != item && item.canActivate && item.isEnabled()) {
          setActiveItem(item, true);
        }
View Full Code Here

    ul.setScrollTop(ul.getScrollTop() + scrollIncrement * (top ? -1 : 1));
  }

  protected Item tryActivate(int start, int step) {
    for (int i = start, len = getItemCount(); i >= 0 && i < len; i += step) {
      Component c = getItem(i);
      if (c instanceof Item) {
        Item item = (Item) c;
        if (item.canActivate && item.isEnabled()) {
          setActiveItem(item, false);
          return item;
View Full Code Here

    addTool(sep);
  }

  @Override
  public Component findItem(Element elem) {
    Component item = super.findItem(elem);
    if (item == null) {
      for (Item c : tools) {
        if (DOM.isOrHasChild(c.getElement(), elem)) {
          return c;
        }
View Full Code Here

        while (w != null) {
          if (w instanceof RootPanel) {
            // do nothing leave app
            return;
          } else if (w instanceof Component){
            Component c = (Component)w;
            if (c.getFocusSupport().isIgnore()) {
              w = w.getParent();
            } else {
              w = null;
              pe.stopEvent();
            }
          }
        }
      }
    } else {
      if (focusNextWidget(component)) {
        pe.stopEvent();
      } else {
        if (!(component.getParent() instanceof RootPanel)) {
          Widget p = component.getParent();
          if (p instanceof Container) {
            Container c = (Container)p;
            if (c.getItemCount() == 1) {
              if (c .getParent() instanceof RootPanel) {
                pe.stopEvent();
                onStepOutApp();
                return;
              }
            }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.Component

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.