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

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


    y += XDOM.getBodyScrollTop();
    LayoutContainer con = getItem(col);
    int count = con.getItemCount();

    for (int i = 0; i < count; i++) {
      Component c = con.getItem(i);
      int b = c.getAbsoluteTop();
      int t = b + c.getOffsetHeight();

      if (y < t) {
        return i;
      }
    }
View Full Code Here


    LayoutContainer con = getItem(col);
    List<Component> list = new ArrayList<Component>(con.getItems());
    int count = list.size();

    for (int i = 0; i < count; i++) {
      Component c = list.get(i);

      int b = c.getAbsoluteTop();
      int t = b + c.getOffsetHeight();
      int m = b + (c.getOffsetHeight() / 2);
      if (y < t) {
        if (y < m) {
          return i;
        } else {
          return i + 1;
View Full Code Here

  }

  @Override
  protected void onLayout(Container<?> container, El target) {
    super.onLayout(container, target);
    Component c = container.getItem(0);
    if (c != null) {
      callLayout(c, false);

      Point p = c.el().getAlignToXY(target.dom, "c-c", null);
      p = c.el().translatePoints(p);
      setPosition(c, p.x, p.y);
    }
  }
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

  }

  @Override
  protected void onLayout(Container<?> container, El target) {
    super.onLayout(container, target);
    Component c = container.getItem(0);
    if (c != null) {
      callLayout(c, false);

      Point p = c.el().getAlignToXY(target.dom, "c-c", null);
      p = c.el().translatePoints(p);
      setPosition(c, p.x, p.y);
    }
  }
View Full Code Here

    Map<String, Object> data = new FastMap<Object>();
    boolean hasChange = false;
    ColumnModel cm = grid.getColumnModel();
    for (int i = 0, len = cm.getColumnCount(); i < len; i++) {
      if (!cm.isHidden(i)) {
        Component c = getItem(i);
        if (c instanceof LabelField) {
          continue;
        } else if (c instanceof Field<?>) {
          Field<?> f = (Field<?>) c;
View Full Code Here

    }
  }

  protected void onTab(ComponentEvent ce) {
    Element target = ce.getTarget();
    Component c = findField(target);
    if (saveBtn != null && c != null && ce.isShiftKey() && indexOf(c) == 0) {
      ce.stopEvent();
      saveBtn.focus();
      return;
    }
View Full Code Here

            List loaded = (List) le.data;
            if (!loaded.isEmpty()) {
              Object o = loaded.get(0);
              if (o instanceof TreeNode) {
                TreeNode tn = (TreeNode) o;
                Component c = treeBinder.findItem(tn);
                if (c != null && c instanceof TreeItem) {
                  if (!((TreeItem) c).isExpanded()) {
                    ((TreeItem) c).setExpanded(true);
                    treeLoader.removeLoadListener(this);
                  }
View Full Code Here


 
  private Component getRegionWidget(LayoutRegion region) {
    for (int i = 0, n = editor.getItemCount(); i < n; ++i) {
      Component c = editor.getItem(i);
      Object data = c.getData("layout_region");
      if (data != null && data.equals(region))
        return c;
    }
    return null;
  }
View Full Code Here

   */
  public void setWidget(Widget widget) {
    this.widget = widget;
    if (rendered) {
      if (widget instanceof Component) {
        Component c = (Component) widget;
        if (!c.isRendered()) {
          c.render(getElement());
          setIcon(icon);
          return;
        }
      }
      getElement().appendChild(widget.getElement());
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.