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

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


   * 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

    int w = size.width;
    int h = size.height;

    int count = container.getItemCount();
    for (int i = 0; i < count; i++) {
      Component c = container.getItem(i);
      int width = (w / count) - getSideMargins(c);
      int height = h - c.el().getMargins("tb");
      setSize(c, width, height);
    }
  }
View Full Code Here

    int w = size.width;
    int h = size.height;

    int count = container.getItemCount();
    for (int i = 0; i < count; i++) {
      Component c = container.getItem(i);
      int width = w - getSideMargins(c);
      int height = (h / count) - c.el().getMargins("tb");
      setSize(c, width, height);
    }
  }
View Full Code Here

    int count = container.getItemCount();

    // some columns can be percentages while others are fixed
    // so we need to make 2 passes
    for (int i = 0; i < count; i++) {
      Component c = container.getItem(i);

      ColumnData layoutData = null;
      LayoutData d = getLayoutData(c);
      if (d != null && d instanceof ColumnData) {
        layoutData = (ColumnData) d;
      } else {
        layoutData = new ColumnData();
      }

      if (layoutData.getWidth() > 1) {
        pw -= layoutData.getWidth();
      }

      pw -= getSideMargins(c);
    }

    pw = pw < 0 ? 0 : pw;

    for (int i = 0; i < count; i++) {
      Component c = container.getItem(i);

      ColumnData layoutData = null;
      LayoutData d = getLayoutData(c);
      if (d != null && d instanceof ColumnData) {
        layoutData = (ColumnData) d;
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

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.