/** * HistorySearch */ public HistorySearch() { stackPanel = new StackLayoutPanel(Unit.PX); searchSaved = new SearchSaved(); userNews = new UserNews(); scrollSearchSavedPanel = new ScrollPanel(); scrollUserNewsSavedPanel = new ScrollPanel(); scrollSearchSavedPanel.addStyleName("okm-PanelSelected"); scrollUserNewsSavedPanel.addStyleName("okm-PanelSelected"); scrollSearchSavedPanel.add(searchSaved); scrollSearchSavedPanel.setSize("100%", "100%"); scrollUserNewsSavedPanel.add(userNews); scrollUserNewsSavedPanel.setSize("100%", "100%"); stackPanel.add(scrollSearchSavedPanel, Util.createHeaderHTML("img/icon/stackpanel/find.gif", Main.i18n("leftpanel.label.stored.search")), true, 22); stackPanel.add(scrollUserNewsSavedPanel, Util.createHeaderHTML("img/icon/news.gif", Main.i18n("leftpanel.label.user.search")), true, 22); stackPanel.showWidget(0); stackPanel.setStyleName("okm-StackPanel"); stackPanel.addStyleName("okm-DisableSelect"); initWidget(stackPanel); }
private void setupImageViewer() { int width = round100(image_viewport_width); int height = round100(image_viewport_height); // Window.alert("dim " + content.getOffsetWidth() + " " // + getOffsetHeight()); main.clear(); if (ctrl.view().size() == 1) { main.add(createImageViewport(width, height, ctrl.view().get(0))); } else if (ctrl.view().size() > 1) { StackLayoutPanel stack = new StackLayoutPanel(Unit.EM); for (CodexImage img : ctrl.view()) { stack.add(createImageViewport(width, height, img), img.label(), 1.5); } main.add(stack); } }
/** * Initialize this example. */ @ShowcaseSource @Override public Widget onInitialize() { // Get the images. Images images = (Images) GWT.create(Images.class); // Create a new stack layout panel. StackLayoutPanel stackPanel = new StackLayoutPanel(Unit.EM); stackPanel.setPixelSize(200, 400); // Add the Mail folders. Widget mailHeader = createHeaderWidget( constants.cwStackLayoutPanelMailHeader(), images.mailgroup()); stackPanel.add(createMailItem(images), mailHeader, 4); // Add a list of filters. Widget filtersHeader = createHeaderWidget( constants.cwStackLayoutPanelFiltersHeader(), images.filtersgroup()); stackPanel.add(createFiltersItem(), filtersHeader, 4); // Add a list of contacts. Widget contactsHeader = createHeaderWidget( constants.cwStackLayoutPanelContactsHeader(), images.contactsgroup()); stackPanel.add(createContactsItem(images), contactsHeader, 4); // Return the stack panel. stackPanel.ensureDebugId("cwStackLayoutPanel"); return stackPanel; }