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); }
private void initWidgets() { setHeaderVisible(false); setBodyBorder(false); setLabelAlign(FormPanel.LabelAlign.LEFT); setButtonAlign(Style.HorizontalAlignment.RIGHT); addMessageListener(); //hack to change layout HBoxLayout hLayout = new HBoxLayout(); hLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.TOP); LayoutContainer tb = new LayoutContainer(hLayout); HBoxLayoutData hBoxLayoutData = new HBoxLayoutData();//new Margins(0, 3, 0, 0)); hBoxLayoutData.setFlex(1); tb.setHeight(26); removeAll(); setLayout(hLayout); createDeleteButton(); add(deleteButton); add(getFileUploadField(), hBoxLayoutData); add(getFileUploadButton()); getFileUploadField().getMessages().setBrowseText("Przeglądaj..."); setFieldLabel("Plik"); setUploadButtonText("Prześlij plik"); }
container.setHeight(listViewHeight); LayoutContainer c = new LayoutContainer();