public class

DecoratedPopupPanel

extends PopupPanel
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.Panel
         ↳ com.google.gwt.user.client.ui.SimplePanel
           ↳ com.google.gwt.user.client.ui.PopupPanel
             ↳ com.google.gwt.user.client.ui.DecoratedPopupPanel
Known Direct Subclasses

Class Overview

A PopupPanel that wraps its content in a 3x3 grid, which allows users to add rounded corners.

Setting the Size:

If you set the width or height of the DecoratedPopupPanel, you need to set the height and width of the middleCenter cell to 100% so that the middleCenter cell takes up all of the available space. If you do not set the width and height of the DecoratedPopupPanel, it will wrap its contents tightly.

 .gwt-DecoratedPopupPanel .popupMiddleCenter {
   height: 100%;
   width: 100%;
 }
 

CSS Style Rules

  • .gwt-DecoratedPopupPanel { the outside of the popup }
  • .gwt-DecoratedPopupPanel .popupContent { the wrapper around the content }
  • .gwt-DecoratedPopupPanel .popupTopLeft { the top left cell }
  • .gwt-DecoratedPopupPanel .popupTopLeftInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupTopCenter { the top center cell }
  • .gwt-DecoratedPopupPanel .popupTopCenterInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupTopRight { the top right cell }
  • .gwt-DecoratedPopupPanel .popupTopRightInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupMiddleLeft { the middle left cell }
  • .gwt-DecoratedPopupPanel .popupMiddleLeftInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupMiddleCenter { the middle center cell }
  • .gwt-DecoratedPopupPanel .popupMiddleCenterInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupMiddleRight { the middle right cell }
  • .gwt-DecoratedPopupPanel .popupMiddleRightInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupBottomLeft { the bottom left cell }
  • .gwt-DecoratedPopupPanel .popupBottomLeftInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupBottomCenter { the bottom center cell }
  • .gwt-DecoratedPopupPanel .popupBottomCenterInner { the inner element of the cell }
  • .gwt-DecoratedPopupPanel .popupBottomRight { the bottom right cell }
  • .gwt-DecoratedPopupPanel .popupBottomRightInner { the inner element of the cell }

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
DecoratedPopupPanel()
Creates an empty decorated popup panel.
DecoratedPopupPanel(boolean autoHide)
Creates an empty decorated popup panel, specifying its "auto-hide" property.
DecoratedPopupPanel(boolean autoHide, boolean modal)
Creates an empty decorated popup panel, specifying its "auto-hide" and "modal" properties.
Public Methods
void clear()
Removes all child widgets.
Widget getWidget()
Gets the panel's child widget.
Iterator<Widget> iterator()
boolean remove(Widget w)
Removes a child widget.
void setWidget(Widget w)
Sets this panel's widget.
Protected Methods
void doAttachChildren()
If a widget contains one or more child widgets that are not in the logical widget hierarchy (the child is physically connected only on the DOM level), it must override this method and call onAttach() for each of its child widgets.
void doDetachChildren()
If a widget contains one or more child widgets that are not in the logical widget hierarchy (the child is physically connected only on the DOM level), it must override this method and call onDetach() for each of its child widgets.
Element getCellElement(int row, int cell)
Get a specific Element from the panel.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.PopupPanel
From class com.google.gwt.user.client.ui.SimplePanel
From class com.google.gwt.user.client.ui.Panel
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.logical.shared.HasCloseHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.EventPreview
From interface com.google.gwt.user.client.ui.AcceptsOneWidget
From interface com.google.gwt.user.client.ui.HasAnimation
From interface com.google.gwt.user.client.ui.HasOneWidget
From interface com.google.gwt.user.client.ui.HasWidgets
From interface com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.user.client.ui.SourcesPopupEvents
From interface java.lang.Iterable

Public Constructors

public DecoratedPopupPanel ()

Creates an empty decorated popup panel. A child widget must be added to it before it is shown.

public DecoratedPopupPanel (boolean autoHide)

Creates an empty decorated popup panel, specifying its "auto-hide" property.

Parameters
autoHide true if the popup should be automatically hidden when the user clicks outside of it

public DecoratedPopupPanel (boolean autoHide, boolean modal)

Creates an empty decorated popup panel, specifying its "auto-hide" and "modal" properties.

Parameters
autoHide true if the popup should be automatically hidden when the user clicks outside of it
modal true if keyboard or mouse events that do not target the PopupPanel or its children should be ignored

Public Methods

public void clear ()

Removes all child widgets.

public Widget getWidget ()

Gets the panel's child widget.

Returns
  • the child widget, or null if none is present

public Iterator<Widget> iterator ()

public boolean remove (Widget w)

Removes a child widget.

How to Override this Method

There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.

  1. Validate: Make sure this Panel is actually the parent of the child Widget; return false if it is not.
  2. Orphan: Call orphan(Widget) first while the child Widget is still attached.
  3. Physical Detach: Adjust the DOM to account for the removal of the child Widget. The Widget's Element must be physically removed from the DOM.
  4. Logical Detach: Update the Panel's state variables to reflect the removal of the child Widget. Example: the Widget is removed from the Panel's WidgetCollection.

Parameters
w the widget to be removed
Returns
  • true if the child was present

public void setWidget (Widget w)

Sets this panel's widget. Any existing child widget will be removed.

Parameters
w the panel's new widget, or null to clear the panel

Protected Methods

protected void doAttachChildren ()

If a widget contains one or more child widgets that are not in the logical widget hierarchy (the child is physically connected only on the DOM level), it must override this method and call onAttach() for each of its child widgets.

protected void doDetachChildren ()

If a widget contains one or more child widgets that are not in the logical widget hierarchy (the child is physically connected only on the DOM level), it must override this method and call onDetach() for each of its child widgets.

protected Element getCellElement (int row, int cell)

Get a specific Element from the panel.

Parameters
row the row index
cell the cell index
Returns
  • the Element at the given row and cell