List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setCellWidth
public void setCellWidth(IsWidget w, String width)
From source file:com.square.composant.ged.square.client.composant.popup.ConfirmPopup.java
License:Open Source License
/** * Constructeur de la popup.// www .ja va 2s.c o m */ public ConfirmPopup() { super(POPUP_CONSTANTS.titleLabel(), false, true, true); addStyleName(PopupConstants.CLASS_POPUP_CONFIRM); // on cree le panel vertical qui contient tout le contenu final VerticalPanel panel = new VerticalPanel(); panel.setWidth(POURCENT_100); // on cree le panel horizontal qui contient le message et l'icone final HorizontalPanel panelMessage = new HorizontalPanel(); panelMessage.setWidth(POURCENT_100); panelMessage.setSpacing(10); // on cree le panel horizontal des boutons final HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.setSpacing(5); final Image imagePopup = new Image(POPUP_IMAGES.confirmPopup()); // on construit le panel du message message = new HTML(); panelMessage.add(imagePopup); panelMessage.add(message); panelMessage.setCellWidth(imagePopup, PopupConstants.LARGEUR_IMAGE); panelMessage.setCellHorizontalAlignment(imagePopup, HasAlignment.ALIGN_LEFT); panelMessage.setCellVerticalAlignment(message, HasAlignment.ALIGN_MIDDLE); // on ajoute le bouton ok buttonOK = new DecoratedButton(POPUP_CONSTANTS.buttonOkLabel()); buttonOK.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (getCallback() != null) { getCallback().onResult(RESULT_OK); } hide(); } }); buttonPanel.add(buttonOK); buttonNOK = new DecoratedButton(POPUP_CONSTANTS.buttonNOkLabel()); buttonNOK.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (getCallback() != null) { getCallback().onResult(RESULT_NOK); } hide(); } }); buttonPanel.add(buttonNOK); final DecoratedButton buttonCancel = new DecoratedButton(POPUP_CONSTANTS.buttonCancelLabel()); buttonCancel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (getCallback() != null) { getCallback().onResult(RESULT_CANCEL); } hide(); } }); buttonPanel.add(buttonCancel); // on ajoute les panels dans le panel principal panel.add(panelMessage); panel.add(buttonPanel); panel.setCellHorizontalAlignment(buttonPanel, HasAlignment.ALIGN_RIGHT); setWidget(panel, 0); }
From source file:com.square.composant.ged.square.client.composant.popup.ErrorPopup.java
License:Open Source License
/** * Constructeur de la popup.//from ww w. j a va 2 s .com */ private ErrorPopup() { super(POPUP_CONSTANTS.titleLabel(), false, true, true); addStyleName(PopupConstants.CLASS_POPUP_ERROR); // on cree le panel vertical qui contient tout le contenu final VerticalPanel panel = new VerticalPanel(); panel.setWidth(POURCENT_100); // on cree le panel horizontal qui contient le message et l'icone final HorizontalPanel panelMessage = new HorizontalPanel(); panelMessage.setWidth(POURCENT_100); panelMessage.setSpacing(10); // on cree le panel horizontal des boutons final HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.setSpacing(5); final Image imagePopup = new Image(POPUP_IMAGES.errorPopup()); // on construit le panel du message message = new HTML(); panelMessage.add(imagePopup); panelMessage.add(message); panelMessage.setCellWidth(imagePopup, PopupConstants.LARGEUR_IMAGE); panelMessage.setCellHorizontalAlignment(imagePopup, HasAlignment.ALIGN_LEFT); panelMessage.setCellVerticalAlignment(message, HasAlignment.ALIGN_MIDDLE); // on ajoute le bouton ok buttonOK = new DecoratedButton(POPUP_CONSTANTS.buttonOkLabel()); buttonOK.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { hide(); } }); buttonPanel.add(buttonOK); // on ajoute les panels dans le panel principal panel.add(panelMessage); panel.add(buttonPanel); panel.setCellHorizontalAlignment(buttonPanel, HasAlignment.ALIGN_RIGHT); setWidget(panel, 0); }
From source file:com.square.composant.ged.square.client.view.listecompacte.ListeCompacteDocumentsViewImpl.java
License:Open Source License
/** Constructeur par dfaut. */ public ListeCompacteDocumentsViewImpl() { viewConstants = GWT.create(ListeCompacteDocumentsViewImplConstants.class); final HorizontalPanel mainPanel = new HorizontalPanel(); mainPanel.setWidth("100%"); documentsPanel = new FlowPanel(); lienAjouter = new Anchor(viewConstants.ajouterDocument()); lienAjouter.addStyleName("lienDocumentModeCompact"); mainPanel.add(documentsPanel);//from www .j a va 2s .c o m mainPanel.add(lienAjouter); mainPanel.setCellWidth(lienAjouter, "200px"); mainPanel.setCellHorizontalAlignment(lienAjouter, HasHorizontalAlignment.ALIGN_RIGHT); mainPanel.setCellVerticalAlignment(lienAjouter, HasVerticalAlignment.ALIGN_MIDDLE); messagePanel = new MessagePanel(); final VerticalPanel vPanel = new VerticalPanel(); vPanel.setWidth("100%"); vPanel.add(mainPanel); vPanel.add(messagePanel); initWidget(vPanel); }
From source file:com.square.composant.tarificateur.square.client.ui.popup.choix.PopupChoixProduit.java
License:Open Source License
/** Chargement de la liste des produits de l'adhrent. */ private void afficherListeProduitsAdherent() { // La liste n'est affiche que si le prospect est un adhrent et que ce n'est pas un devis CNP if (idPersonne != null) { // Chargement de la liste des produits de l'adhrent final AsyncCallback<List<ListeProduitsAdherentModel>> callback = new AsyncCallback<List<ListeProduitsAdherentModel>>() { public void onFailure(Throwable caught) { captionPanelListeProduitsAdherent.setVisible(false); ErrorPopup.afficher(new ErrorPopupConfiguration(caught)); }/*from www . j a v a2 s.c om*/ public void onSuccess(List<ListeProduitsAdherentModel> listeProduitsContratsAdherentGwt) { if (listeProduitsContratsAdherentGwt == null || listeProduitsContratsAdherentGwt.isEmpty()) { captionPanelListeProduitsAdherent.setVisible(false); } else { // Produit principal InfosProduitAdherentModel produitPrincipal; // On nettoie le panel captionPanelListeProduitsAdherent.clear(); final VerticalPanel panelListeProduitsAdherent = new VerticalPanel(); panelListeProduitsAdherent.setWidth(ComposantTarificateurConstants.POURCENT_100); panelListeProduitsAdherent.setSpacing(5); captionPanelListeProduitsAdherent.add(panelListeProduitsAdherent); for (ListeProduitsAdherentModel listeProduitsParcouru : listeProduitsContratsAdherentGwt) { produitPrincipal = listeProduitsParcouru.getProduitPrincipal(); int i = 0; // Label de la liste des produits d'un adhrent. final HTML labelListeProduitsAdherent = new HTML(); // Bouton de gnration d'une proposition pour un adhrent. final DecoratedButton btnGenererProposition = new DecoratedButton( pageConstants.labelBoutonAjoutProduitAdherent()); final HorizontalPanel hpConteneurProduits = new HorizontalPanel(); hpConteneurProduits.setWidth(ComposantTarificateurConstants.POURCENT_100); hpConteneurProduits.add(labelListeProduitsAdherent); hpConteneurProduits.add(btnGenererProposition); hpConteneurProduits.setCellHorizontalAlignment(labelListeProduitsAdherent, HasHorizontalAlignment.ALIGN_LEFT); hpConteneurProduits.setCellHorizontalAlignment(btnGenererProposition, HasHorizontalAlignment.ALIGN_RIGHT); hpConteneurProduits.setCellVerticalAlignment(labelListeProduitsAdherent, HasVerticalAlignment.ALIGN_MIDDLE); hpConteneurProduits.setCellVerticalAlignment(btnGenererProposition, HasVerticalAlignment.ALIGN_MIDDLE); hpConteneurProduits.setCellWidth(btnGenererProposition, "160px"); panelListeProduitsAdherent.add(hpConteneurProduits); // Ecriture de la liste des produits de l'adhrent final StringBuffer htmlListeProduitsAdherent = new StringBuffer(); if (produitPrincipal != null) { // On affiche : libelleProduit ( dateAdhesion -> dateResiliation ) htmlListeProduitsAdherent.append("<b>"); htmlListeProduitsAdherent.append(produitPrincipal.getLibelle()); htmlListeProduitsAdherent.append("</b>"); htmlListeProduitsAdherent.append(PageConstants.DU + " " + produitPrincipal.getDateAdhesion() + " " + PageConstants.AU); htmlListeProduitsAdherent.append(produitPrincipal.getDateResiliation() != null ? produitPrincipal.getDateResiliation() : "..."); final String garantieAia = produitPrincipal.getGarantieAia(); final String produitAia = produitPrincipal.getProduitAia(); btnGenererProposition.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { afficherPopupSelectionProduitsAdherent(produitAia, garantieAia); } }); i++; } for (InfosProduitAdherentModel infosProduitLieParcouru : listeProduitsParcouru .getListeProduitsLies()) { if (i == 1) { htmlListeProduitsAdherent.append(ComposantTarificateurConstants.SAUT_LIGNE); } else { htmlListeProduitsAdherent.append(PageConstants.VIRGULE); } htmlListeProduitsAdherent.append(infosProduitLieParcouru.getLibelle()); i++; } labelListeProduitsAdherent.setHTML(htmlListeProduitsAdherent.toString()); // Affichage de la liste captionPanelListeProduitsAdherent.setVisible(true); // si pas de produit principal sant, on cache le bouton gnrerProposition btnGenererProposition.setVisible(listeProduitsParcouru.getProduitPrincipal() != null); } } } }; // Appel du service tarificateurService.getListeProduitsAdherent(idPersonne, callback); } else { // Liste des produits des adhrents non visible captionPanelListeProduitsAdherent.clear(); captionPanelListeProduitsAdherent.setVisible(false); } }
From source file:de.atns.common.gwt.client.composite.colorpicker.ColorPicker.java
License:Artistic License
public ColorPicker() { // UI Drawing //------------------ hue = 0;/* ww w. j a v a 2s. c om*/ saturation = 100; brightness = 100; red = 255; green = 0; blue = 0; HorizontalPanel panel = new HorizontalPanel(); FlexTable table = new FlexTable(); // Add the large slider map slidermap = new SliderMap(this); panel.add(slidermap); panel.setCellWidth(slidermap, "258px"); panel.setCellHeight(slidermap, "258px"); // Add the small slider bar sliderbar = new SliderBar(this); panel.add(sliderbar); panel.setCellWidth(sliderbar, "40px"); panel.setCellHeight(sliderbar, "258px"); // Define the Flextable's content // Color preview at the top colorpreview = new HTML(""); colorpreview.setWidth("50px"); colorpreview.setHeight("50px"); DOM.setStyleAttribute(colorpreview.getElement(), "border", "1px solid black"); // Radio buttons String rbgroup = "color" + this.hashCode(); rbHue = new RadioButton(rbgroup, "H:"); rbHue.addClickHandler(this); rbSaturation = new RadioButton(rbgroup, "S:"); rbSaturation.addClickHandler(this); rbBrightness = new RadioButton(rbgroup, "V:"); rbBrightness.addClickHandler(this); rbRed = new RadioButton(rbgroup, "R:"); rbRed.addClickHandler(this); rbGreen = new RadioButton(rbgroup, "G:"); rbGreen.addClickHandler(this); rbBlue = new RadioButton(rbgroup, "B:"); rbBlue.addClickHandler(this); // Textboxes tbHue = new TextBox(); tbHue.setText(new Integer(hue).toString()); tbHue.setMaxLength(3); tbHue.setVisibleLength(4); tbHue.addKeyPressHandler(this); tbHue.addChangeHandler(this); tbSaturation = new TextBox(); tbSaturation.setText(new Integer(saturation).toString()); tbSaturation.setMaxLength(3); tbSaturation.setVisibleLength(4); tbSaturation.addKeyPressHandler(this); tbSaturation.addChangeHandler(this); tbBrightness = new TextBox(); tbBrightness.setText(new Integer(brightness).toString()); tbBrightness.setMaxLength(3); tbBrightness.setVisibleLength(4); tbBrightness.addKeyPressHandler(this); tbBrightness.addChangeHandler(this); tbRed = new TextBox(); tbRed.setText(new Integer(red).toString()); tbRed.setMaxLength(3); tbRed.setVisibleLength(4); tbRed.addKeyPressHandler(this); tbRed.addChangeHandler(this); tbGreen = new TextBox(); tbGreen.setText(new Integer(green).toString()); tbGreen.setMaxLength(3); tbGreen.setVisibleLength(4); tbGreen.addKeyPressHandler(this); tbGreen.addChangeHandler(this); tbBlue = new TextBox(); tbBlue.setText(new Integer(blue).toString()); tbBlue.setMaxLength(3); tbBlue.setVisibleLength(4); tbBlue.addKeyPressHandler(this); tbBlue.addChangeHandler(this); tbHexColor = new TextBox(); tbHexColor.setText("ff0000"); tbHexColor.setMaxLength(6); tbHexColor.setVisibleLength(6); tbHexColor.addKeyPressHandler(this); tbHexColor.addChangeHandler(this); // Put together the FlexTable table.setWidget(0, 0, colorpreview); table.getFlexCellFormatter().setColSpan(0, 0, 3); table.setWidget(1, 0, rbHue); table.setWidget(1, 1, tbHue); table.setWidget(1, 2, new HTML("°")); table.setWidget(2, 0, rbSaturation); table.setWidget(2, 1, tbSaturation); table.setText(2, 2, "%"); table.setWidget(3, 0, rbBrightness); table.setWidget(3, 1, tbBrightness); table.setText(3, 2, "%"); table.setWidget(4, 0, rbRed); table.setWidget(4, 1, tbRed); table.setWidget(5, 0, rbGreen); table.setWidget(5, 1, tbGreen); table.setWidget(6, 0, rbBlue); table.setWidget(6, 1, tbBlue); table.setText(7, 0, "#:"); table.setWidget(7, 1, tbHexColor); table.getFlexCellFormatter().setColSpan(7, 1, 2); // Final setup panel.add(table); rbSaturation.setValue(true); setPreview("ff0000"); DOM.setStyleAttribute(colorpreview.getElement(), "cursor", "default"); // First event onClick(rbSaturation); initWidget(panel); }
From source file:de.eckhartarnold.client.ControlPanel.java
License:Apache License
/** * (Re-)creates the button panel using the images stored in the * <code>icons</code> map as symbols on the buttons. *//*w w w .j a v a 2s. c o m*/ protected void composePanel() { VerticalPanel vpanel = new VerticalPanel(); HorizontalPanel buttonPanel = new HorizontalPanel(); buttonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); // progress bar progress = new ProgressBar(slideshow.size()); int btnSize; if (filmstrip != null) btnSize = buttonSize / 2; else btnSize = buttonSize; if (btnSize >= 24) progress.setLabelingType(ProgressBar.VALUE_LABEL); else progress.setLabelingType(ProgressBar.NO_LABEL); if (btnSize <= 32) progress.getFrame().addStyleDependentName("thin"); if (btnSize > 48) progress.getBar().addStyleDependentName("16px"); else if (btnSize > 32) progress.getBar().addStyleDependentName("12px"); else if (btnSize >= 28) progress.getBar().addStyleDependentName("10px"); else if (btnSize >= 24) progress.getBar().addStyleDependentName("9px"); else if (btnSize >= 20) progress.getBar().addStyleDependentName("4px"); else progress.getBar().addStyleDependentName("3px"); int value = slideshow.getCurrentSlide(); if (value >= 0) progress.setValue(value + 1); // button panel // begin = new PushButton(icons.get("begin"), icons.get("begin_down"), this); // Tooltip.addToWidget(beginTooltip, begin); back = new PushButton(icons.get("back"), icons.get("back_down"), this); Tooltip.addToWidget(backTooltip, back); if (homeButtonHandler != null) { home = new PushButton(icons.get("gallery"), icons.get("gallery_down"), homeButtonHandler); } else { home = new PushButton(icons.get("gallery"), icons.get("gallery_down")); } Tooltip.addToWidget(homeTooltip, home); play = new ToggleButton(icons.get("play"), icons.get("pause"), this); Tooltip.addToWidget(playPauseTooltip, play); if (slideshow.isRunning()) play.setDown(true); next = new PushButton(icons.get("next"), icons.get("next_down"), this); Tooltip.addToWidget(nextTooltip, next); // end = new PushButton(icons.get("end"), icons.get("end_down"), this); // Tooltip.addToWidget(endTooltip, end); // if ((buttonsShown & BEGIN) != 0) buttonPanel.add(begin); if ((buttonsShown & BACK) != 0) buttonPanel.add(back); if ((buttonsShown & HOME) != 0) buttonPanel.add(home); if (filmstrip != null) { filmstrip.setHeight(buttonSize * 2 + "px"); vpanel.add(filmstrip); vpanel.add(progress); vpanel.setWidth("100%"); buttonPanel.add(vpanel); buttonPanel.setCellWidth(vpanel, "100%"); buttonPanel.addStyleName("controlFilmstripBackground"); addButtonStyles("controlFilmstripButton"); } else { buttonPanel.addStyleName("controlPanelBackground"); addButtonStyles("controlPanelButton"); } if ((buttonsShown & PLAY) != 0) buttonPanel.add(play); if ((buttonsShown & NEXT) != 0) buttonPanel.add(next); // if ((buttonsShown & END) != 0) buttonPanel.add(end); enableOrDisableButtons(); if (filmstrip != null) { wrapper.setWidget(buttonPanel); } else { vpanel.add(buttonPanel); vpanel.add(progress); wrapper.setWidget(vpanel); } }
From source file:de.eckhartarnold.client.GalleryWidget.java
License:Apache License
@Override public void onResized() { Widget parent = getParent();/*from ww w . ja v a 2s. com*/ if (parent == null) return; int width = parent.getOffsetWidth(); HorizontalPanel row = null; int columns = (width - paddingH) / (edgeWidth + paddingH); if (columns <= 0) columns = 1; int rows = thumbnails.size() / columns; if (thumbnails.size() % columns != 0) rows++; if (imageRows != null) { if (rows == imageRows.length && imageRows[0].getWidgetCount() == columns) { return; // layout did not change! } for (HorizontalPanel p : imageRows) { panel.remove(p); } } imageRows = new HorizontalPanel[rows]; for (int i = 0; i < thumbnails.size(); i++) { if (i % columns == 0) { row = new HorizontalPanel(); row.setStyleName("galleryRow"); //row.setSpacing(paddingV); row.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); row.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); imageRows[i / columns] = row; } Image img = thumbnails.get(i); if (captions[i].asString().length() > 0) { Tooltip.addToWidget(new Tooltip(captions[i]), img); // sometimes wrong tooltip position!? } row.add(img); //int delta = 0; //if (paddingH > paddingV) delta = 2*(paddingH-paddingV); row.setCellWidth(img, edgeWidth + 2 * paddingH + "px"); row.setCellHeight(img, edgeHeight + 2 * paddingV + "px"); } for (HorizontalPanel r : imageRows) { panel.add(r); } }
From source file:de.oose.taskboard.client.view.TaskListView.java
License:Open Source License
public TaskListView() { setSpacing(5);//from ww w . j a va2s .c o m setSize("800", "600"); HorizontalPanel horizontalPanel = new HorizontalPanel(); horizontalPanel.setSpacing(5); add(horizontalPanel); horizontalPanel.setWidth("100%"); setCellWidth(horizontalPanel, "100%"); lblUser = new Label("userlabel"); horizontalPanel.add(lblUser); horizontalPanel.setCellWidth(lblUser, "20%"); btnLogout = new Button("New button"); btnLogout.setText("Logout"); horizontalPanel.add(btnLogout); horizontalPanel.setCellWidth(btnLogout, "100%"); horizontalPanel.setCellHorizontalAlignment(btnLogout, HasHorizontalAlignment.ALIGN_RIGHT); taskboard = new Taskboard(); add(taskboard); btnTask = new Button("New button"); add(btnTask); btnTask.setText("New Task"); }
From source file:edu.caltech.ipac.firefly.core.AlertManager.java
private void init() { view = new Frame(); title = new Label(); nextButton = GwtUtil.makeLinkButton("Next", "Show the next alert.", new ClickHandler() { public void onClick(ClickEvent event) { showAlerts(++curIdx);//www.ja v a2 s .com } }); nextButton.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER); GwtUtil.setStyles(title, "fontWeight", "bold", "fontSize", "12px", "margin", "0 5px 0 5px"); GwtUtil.setStyles(nextButton, "fontWeight", "bold", "margin", "0 5px 0 5px"); HorizontalPanel naviBar = new HorizontalPanel(); naviBar.add(title); naviBar.add(nextButton); naviBar.setCellWidth(title, "100%"); VerticalPanel vp = new VerticalPanel(); vp.setSize("100%", "100%"); vp.add(naviBar); vp.add(view); main.add(vp); view.setSize("100%", "100%"); message = new HTML(); message.setStyleName("announcement-msg"); GwtUtil.setStyles(message, "verticalAlign", "middle"); message.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (getPopup().isVisible()) { getPopup().hide(); } else { checkForAlerts(true); } } }); timer.scheduleRepeating(5 * 60 * 1000); // 5 mins timer.run(); Image image = new Image(GwtUtil.EXCLAMATION); image.setPixelSize(16, 15); GwtUtil.setStyle(image, "marginRight", "4px"); HorizontalPanel p = new HorizontalPanel(); p.setStyleName("announcement-msg"); p.add(image); // p.add(message); initWidget(p); GwtUtil.setStyle(this, "opacity", ".9"); }
From source file:edu.caltech.ipac.firefly.core.layout.AbstractLayoutManager.java
protected Widget makeCenter() { final DockPanel resultsView = new DockPanel(); resultsView.setSize("100%", "100%"); final BaseRegion content = new BaseRegion(CONTENT_REGION); Widget w = content.getDisplay();/*from ww w . j av a 2 s.c o m*/ w.setWidth("100%"); addRegion(content); final Region query = getForm(); final Region results = getResult(); final Region title = getSearchTitle(); final Region desc = getSearchDesc(); GwtUtil.ImageButton img = GwtUtil.makeImageButton("images/disclosurePanelClosed.png", "Return to search", new ClickHandler() { public void onClick(ClickEvent event) { Application.getInstance().processRequest(new Request(SearchCmd.COMMAND_NAME)); } }); boolean backToArrow = Application.getInstance().getProperties() .getBooleanProperty("BackToSearch.arrow.show", true); boolean searchDescLine = Application.getInstance().getProperties().getBooleanProperty("BackToSearch.show", true); final HorizontalPanel ttdesc = new HorizontalPanel(); if (title != null && searchDescLine) { ttdesc.setWidth("100%"); if (backToArrow) { ttdesc.add(img); } ttdesc.add(title.getDisplay()); ttdesc.add(desc.getDisplay()); ttdesc.setCellWidth(desc.getDisplay(), "100%"); ttdesc.add(layoutSelector); WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW, new WebEventListener() { public void eventNotify(WebEvent ev) { ttdesc.setVisible(Application.getInstance().hasSearchResult()); } }); } // final Region download = getDownload(); VerticalPanel vp = new VerticalPanel(); vp.setWidth("100%"); if (query.getDisplay() != null) { vp.add(query.getDisplay()); } if (searchDescLine) vp.add(ttdesc); resultsView.add(vp, DockPanel.NORTH); resultsView.setCellHeight(vp, "10px"); resultsView.add(results.getDisplay(), DockPanel.CENTER); resultsView.add(content.getDisplay(), DockPanel.SOUTH); WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (DROPDOWN_REGION.equals(source.getId()) || RESULT_REGION.equals(source.getId())) { content.hide(); resultsView.setCellHeight(results.getDisplay(), "100%"); resultsView.setCellHeight(content.getDisplay(), ""); } else if (CONTENT_REGION.equals(source.getId())) { query.hide(); results.hide(); resultsView.setCellHeight(content.getDisplay(), "100%"); resultsView.setCellHeight(results.getDisplay(), ""); } } }); Region popoutRegion = getRegion(POPOUT_REGION); // SimplePanel popoutView = new SimplePanel(); // popoutView.add(popoutRegion.getDisplay()); final DeckPanel center = new DeckPanel(); center.add(resultsView); center.add(popoutRegion.getDisplay()); WebEventManager.getAppEvManager().addListener(Name.REGION_SHOW, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (POPOUT_REGION.equals(source.getId())) { center.showWidget(1); } else if (RESULT_REGION.equals(source.getId())) { center.showWidget(0); } } }); WebEventManager.getAppEvManager().addListener(Name.REGION_HIDE, new WebEventListener() { public void eventNotify(WebEvent ev) { Region source = (Region) ev.getSource(); if (POPOUT_REGION.equals(source.getId())) { center.showWidget(0); } } }); center.showWidget(0); return center; }