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

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


    Widget p = w.getParent();
    if (p != null) {
      if (p instanceof TabItem) {
        ((TabItem) p).getTabPanel().focus();
      } else if (p instanceof Component) {
        Component c = (Component) p;
        while (c.getFocusSupport().isIgnore()) {
          p = c.getParent();
          if (p != null) {
            if (p instanceof Component) {
              c = (Component) p;
            } else {
              El.fly(p.getElement()).focus();
View Full Code Here


    }
    El side = leftTr;
    int pos = 0;

    for (int i = 0, len = container.getItemCount(); i < len; i++, pos++) {
      Component c = container.getItem(i);
      if (c instanceof FillToolItem) {
        side = rightTr;
        pos = -1;
      } else if (!c.isRendered()) {
        c.render(insertCell(c, side, pos));
        if (i < len - 1) {
          c.el().setStyleAttribute("marginRight", spacing + "px");
        } else {
          c.el().setStyleAttribute("marginRight", "0px");
        }
      } else {
        if (!isHidden(c) && !isValidParent(c.el().dom, side.getChildElement(pos))) {
          Element td = insertCell(c, side, pos);
          td.appendChild(c.el().dom);
          if (i < len - 1) {
            c.el().setStyleAttribute("marginRight", spacing + "px");
          } else {
            c.el().setStyleAttribute("marginRight", "0px");
          }
        }
      }
    }
    // strip extra empty cells
View Full Code Here

  @SuppressWarnings("rawtypes")
  @Override
  public boolean canHandleKeyPress(Component component, PreviewEvent pe) {
    if (component.getParent() instanceof ListField<?>) {
      ListField lf = (ListField) component.getParent();
      Component p = (Component) lf.getParent();
      return p != null && p.getParent() instanceof DualListField;

    }
    return component instanceof DualListField;
  }
View Full Code Here

  private FocusManager() {
    preview = new BaseEventPreview() {

      protected void onClick(PreviewEvent pe) {
        Component c = ComponentManager.get().find(pe.getTarget());
        if (c != null) {
          if (isWindow(c) == null && focusComponent == null) {
            focusComponent = c;
          }
        }

      };

      @Override
      protected void onPreviewKeyPress(PreviewEvent pe) {
        super.onPreviewKeyPress(pe);
        int key = pe.getKeyCode();

        Component c = ComponentManager.get().find(pe.getTarget());
        if (key == 117) {
          onToggle(c, pe);
        }
        Window w = null;
        if (c != null) {
View Full Code Here

   * Collapses the panel in the given region.
   *
   * @param region the region to be collapsed
   */
  public void collapse(LayoutRegion region) {
    Component c = getRegionWidget(region);
    if (c != null && c instanceof ContentPanel && !(c instanceof CollapsePanel)) {
      onCollapse((ContentPanel) c);
    }
  }
View Full Code Here

   * Expands the panel in the given region.
   *
   * @param region the region to expand
   */
  public void expand(LayoutRegion region) {
    Component c = getRegionWidget(region);
    if (c != null && c instanceof CollapsePanel) {
      ContentPanel cp = (ContentPanel) c.getData("panel");
      onExpand(cp);
    }
  }
View Full Code Here

   * Hides the component in the given region.
   *
   * @param region the layout region
   */
  public void hide(LayoutRegion region) {
    Component c = getRegionWidget(region);
    if (c != null) {
      c.hide();
    }
  }
View Full Code Here

   * Shows the component in the given region.
   *
   * @param region the layout region
   */
  public void show(LayoutRegion region) {
    Component c = getRegionWidget(region);
    if (c != null) {
      c.show();
    }
  }
View Full Code Here

  protected void onRemove(Component component) {
    super.onRemove(component);
    if (component instanceof ContentPanel) {
      ContentPanel panel = (ContentPanel) component;
      if (panel.getData("collapseBtn") != null) {
        Component tool = (Component) panel.getData("collapseBtn");
        tool.removeAllListeners();
        panel.getHeader().removeTool(tool);
      }
      panel.removeListener(Events.BeforeCollapse, collapseListener);
      panel.removeListener(Events.BeforeExpand, collapseListener);
    }
View Full Code Here

        public void handleEvent(SplitBarEvent sbe) {
          if (sbe.getSize() < 1) {
            return;
          }
          data.setSize(sbe.getSize());
          Component c = sbe.getSplitBar().getResizeWidget();
          Map<String, Object> state = c.getState();
          state.put("size", data.getSize());
          c.saveState();
          layout();
        }
      });
      component.setData("splitBar", bar);
    }
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.