@Inject public CompositeEditor2(EventBus eventBus, AddElementPanel addPanel, Provider<ElementWidget> elementWidgetProvider) { this.elementWidgetProvider = elementWidgetProvider; page = new LayoutContainer(); page.addStyleName(ReportResources.INSTANCE.style().page()); add(page); this.addPanel = addPanel; this.addPanel.setCallback(this); page.add(addPanel); ReportResources.INSTANCE.style().ensureInjected(); setLayout(new CompositeEditorLayout()); setScrollMode(Scroll.AUTOY); setMonitorWindowResize(true); this.reportEventBus = new ReportEventBus(eventBus, this); }
/** * Creates a new portal container. * * @param numColumns the number of columns */ public Portal(int numColumns) { this.numColumns = numColumns; cl = new ColumnLayout(); cl.setAdjustForScroll(true); setLayout(cl); setScrollMode(Scroll.AUTO); baseStyle = "x-portal"; enableLayout = true; for (int i = 0; i < numColumns; i++) { LayoutContainer l = new LayoutContainer(); l.addStyleName("x-portal x-portal-column"); l.setStyleAttribute("minHeight", "20px"); l.setStyleAttribute("padding", spacing + "px 0 0 " + spacing + "px"); l.setLayout(new RowLayout()); l.setLayoutOnChange(true); add(l); } listener = createDragListener(); }
/** * Adds an horizontal panel to the passed parent with: <ol> <li>a panel with FormLayout to the left, for * fields;</li> <li>a panel to the right, for icons.</li> </ol> * @param parent * @param withMarginBottom if <code>true</code>, adds a 10px margin bottom to the horizontal panel. * @return array with left container at index 0 and right container at index 1.<br/> */ public LayoutContainer[] addFieldContainerSkeleton(LayoutContainer parent, boolean withMarginBottom, int fieldWidth) { HorizontalPanel lc = new HorizontalPanel(); lc.setAutoHeight(true); lc.setBorders(false); if (withMarginBottom) { lc.addStyleName(styles.marginBottom10px()); } FormLayout formLayout = getStandardLayout(fieldWidth); LayoutContainer left = new LayoutContainer(formLayout); left.setAutoHeight(true); // make place for the invalid icon: left.setWidth(formLayout.getLabelWidth() + formLayout.getDefaultWidth() + 23); lc.add(left); LayoutContainer right = new HorizontalPanel(); right.setAutoHeight(true); right.addStyleName(styles.paddingLeft4px()); lc.add(right); parent.add(lc); return new LayoutContainer[] {left, right}; }
list.setStyleName(style); list.hide(); list.addStyleName("x-ignore");
container.setLayout(new FlowLayout()); container.setScrollMode(Scroll.AUTOY); container.addStyleName(SiteFormResources.INSTANCE.style().locationDialogPane());