public class CommandPopup
extends com.google.gwt.user.client.ui.PopupPanel
final CommandPopup commandPopup = new CommandPopup("Select a command", resources.information(), new Widget[] {
textLabel, okButton, cancelButton });
okButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Utils.console("ok clicked");
commandPopup.hide();
}
});
cancelButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Utils.console("cancel clicked");
commandPopup.hide();
}
});
commandPopup.showCentered(true);
com.google.gwt.user.client.ui.PopupPanel.PositionCallback| Constructor and Description |
|---|
CommandPopup(String caption,
com.google.gwt.resources.client.ImageResource image,
com.google.gwt.user.client.ui.Widget[] widgets)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
showCentered(boolean glassEffect)
Will display the command popup in the center of the display
|
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, setWidget, setWidth, show, showRelativeToadd, getWidget, iterator, remove, setWidgetadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, toStringpublic CommandPopup(String caption, com.google.gwt.resources.client.ImageResource image, com.google.gwt.user.client.ui.Widget[] widgets)
caption - the captionimage - the image displayed in the left upper corner.widgets - list of widgets.Copyright © 2011–2015 SWM. All rights reserved.