/** * Override this method to specify the element to be used by the layout as the * container. Allows the container to be decorated. * * @return the element to be used as the panel's container */ public El getLayoutTarget() { return el(); }
private void addInsert(int col, int row) { insertCol = col; insertRow = row; LayoutContainer lc = getItem(insertCol); dummy.removeFromParent(); dummy.insertInto(lc.el().dom, row); }
protected void onRender(Element parent, int index) { super.onRender(parent, index); if (el() == null) { setElement(DOM.createDiv(), parent, index); } if (GXT.isFocusManagerEnabled() && !getFocusSupport().isIgnore()) { el().setTabIndex(0); el().setElementAttribute("hideFocus", "true"); sinkEvents(Event.FOCUSEVENTS); } }
public static void onFailure(LayoutContainer container, Throwable caught, ClickHandler retryCallback) { LOGGER.log(Level.SEVERE, "Exception while loading reports contents", caught); container.el().unmask(); container.removeAll(); container.add(createRetryPanel(caught, retryCallback)); container.layout(); }
protected void restrict() { list.el().setVisibility(false); listView.setHeight("auto"); list.setHeight("auto"); int w = Math.max(getWidth(), minListWidth); int fh = footer != null ? footer.getHeight() : 0; int fw = list.el().getFrameWidth("tb") + fh; int h = listView.getHeight() + fw; int mH = Math.min(maxHeight, Window.getClientHeight() - 10); h = Math.min(h, mH); list.setSize(w, h); list.el().alignTo(getAlignElement(), listAlign, null); h -= fw; int width = w - list.el().getFrameWidth("lr"); listView.syncSize(); listView.setSize(width, h); if (pageTb != null) { pageTb.setWidth(width); } int y = list.el().getY(); int b = y + h + fw; int vh = XDOM.getViewportSize().height + XDOM.getBodyScrollTop(); if (b > vh) { y = y - (b - vh) - 5; list.el().setTop(y); } list.el().setVisibility(true); }
/** * On selection change. * * @param be * the be */ private void onSelectionChange(SelectionChangedEvent<T> be) { if (!be.getSelection().isEmpty()) { detailTp.overwrite(details.getElement(), Util.getJsObject(be.getSelection().get(0))); ok.enable(); } else { ok.disable(); details.el().setInnerHtml(""); } }
protected void collapseIf(PreviewEvent pe) { if (!list.el().isOrHasChild(pe.getTarget()) && !el().isOrHasChild(pe.getTarget())) { collapse(); } }
@Override protected void onRender(Element parent, int index) { super.onRender(parent, index); eventPreview.getIgnoreList().add(getElement()); el().makePositionable(true); setAriaRole("presentation"); if (pageTb != null) { footer = list.el().createChild("<div class='" + listStyle + "-ft'></div>"); pageTb.setBorders(false); pageTb.render(footer.dom); } } };
/** * Expands the dropdown list if it is currently hidden. Fires the * <i>expand</i> event on completion. */ public void expand() { if (expanded || !hasFocus) { return; } if (!initialized) { createList(false); } else { RootPanel.get().add(list); } list.show(); list.layout(); list.el().updateZIndex(0); restrict(); eventPreview.add(); expanded = true; fireEvent(Events.Expand, new FieldEvent(this)); }