/** * Adds a widget to this Container. Fires the <i>BeforeAdd</i> event before * adding, then fires the <i>Add</i> event after the component has been added. * * @param widget the widget to add. If the widget is not a Component instance * it will be wrapped in a WidgetComponent * @param layoutData the layout data */ public boolean add(Widget widget, LayoutData layoutData) { return insert(widget, getItemCount(), layoutData); }
/** * Adds a widget to this Container. Fires the <i>BeforeAdd</i> event before * adding, then fires the <i>Add</i> event after the component has been added. * * @param widget the widget to add. If the widget is not a Component instance * it will be wrapped in a WidgetComponent */ public boolean add(Widget widget) { return insert(widget, getItemCount()); }
/** * Adds a portlet to the portal. * * @param portlet the portlet to add * @param column the column to insert into */ public void add(Portlet portlet, int column) { insert(portlet, getItem(column).getItemCount(), column); }
private void addElementWidget(ReportElement element) { ElementWidget widget = elementWidgetProvider.get(); widget.bindHandler(this); widget.bind(element); page.insert(widget, page.getItemCount() - 1); }
private int getRow(int col, int y) { 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; } } return 0; }
protected void onFocus(ComponentEvent ce) { if (GXT.isFocusManagerEnabled() && FocusManager.get().isManaged()) { if (getFocusSupport().isIgnore()) { for (int i = 0; i < getItemCount(); i++) { Component c = getItem(i); if (!c.getFocusSupport().isIgnore()) { c.focus(); break; } } } else { FocusFrame.get().frame(this); } } }