public class DecoratedPopupPanel extends PopupPanel
A PopupPanel
that wraps its content in a 3x3 grid, which allows users
to add rounded corners.
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%; }
PopupPanel.PositionCallback
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all child widgets.
|
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
Widget.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
Widget.onDetach() for each of its
child widgets. |
protected Element |
getCellElement(int row,
int cell)
Get a specific Element from the panel.
|
Widget |
getWidget()
Gets the panel's child widget.
|
Iterator<Widget> |
iterator()
Gets an iterator for the contained widgets.
|
boolean |
remove(Widget w)
Removes a child widget.
|
void |
setWidget(Widget w)
Sets this panel's widget.
|
addAutoHidePartner, addCloseHandler, addPopupListener, center, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onPreviewNativeEvent, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidth, show, showRelativeTo
add, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
fireEvent
public DecoratedPopupPanel()
public DecoratedPopupPanel(boolean autoHide)
autoHide
- true
if the popup should be automatically
hidden when the user clicks outside of itpublic DecoratedPopupPanel(boolean autoHide, boolean modal)
autoHide
- true
if the popup should be automatically
hidden when the user clicks outside of itmodal
- true
if keyboard or mouse events that do not
target the PopupPanel or its children should be ignoredpublic void clear()
HasWidgets
clear
in interface HasWidgets
clear
in class Panel
public Widget getWidget()
SimplePanel
getWidget
in interface HasOneWidget
getWidget
in class SimplePanel
null
if none is presentpublic Iterator<Widget> iterator()
HasWidgets
Iterator.remove()
.iterator
in interface HasWidgets
iterator
in interface Iterable<Widget>
iterator
in class SimplePanel
public boolean remove(Widget w)
Panel
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.
false
if it is not.Panel.orphan(Widget)
first while the child
Widget is still attached.WidgetCollection
.remove
in interface HasWidgets
remove
in class SimplePanel
w
- the widget to be removedtrue
if the child was presentpublic void setWidget(Widget w)
SimplePanel
setWidget
in interface HasOneWidget
setWidget
in class PopupPanel
w
- the panel's new widget, or null
to clear the panelprotected void doAttachChildren()
Widget
Widget.onAttach()
for each of its
child widgets.doAttachChildren
in class Panel
Widget.onAttach()
protected void doDetachChildren()
Widget
Widget.onDetach()
for each of its
child widgets.doDetachChildren
in class Panel
Widget.onDetach()
protected Element getCellElement(int row, int cell)
row
- the row indexcell
- the cell indexCopyright © 2018. All rights reserved.