List of usage examples for com.google.gwt.user.client.ui DecoratedPopupPanel DecoratedPopupPanel
public DecoratedPopupPanel(boolean autoHide)
From source file:com.apress.progwt.client.college.gui.ApplicationStatusChooserWidget.java
License:Apache License
public ApplicationStatusChooserWidget(Application application, ServiceCache serviceCache) { this.serviceCache = serviceCache; ProcessType currentStatus = application.getCurrentStatus(); lab = new Label(currentStatus.getName()); lab.addClickListener(new ClickListener() { public void onClick(Widget sender) { showOptions();/*from w w w. ja v a2 s. c om*/ } }); VerticalPanel chooseP = new VerticalPanel(); for (ProcessType statusType : application.getUser().getStatusProcessTypes()) { HorizontalPanel hp = new HorizontalPanel(); hp.add(new PChooser(statusType)); chooseP.add(hp); } chooseP.add(new Label("Click Status To Choose")); popupP = new DecoratedPopupPanel(true); popupP.add(chooseP); popupP.addStyleName("TC-Popup"); popupP.addStyleName("TC-Popup-Status"); initWidget(lab); }
From source file:com.education.lessons.ui.client.login.utils.UIHelper.java
License:Open Source License
public static void tip(String message, UIObject target) { HTML messageLabel = new HTML(message); messageLabel.addStyleName("content"); PopupPanel tip = new DecoratedPopupPanel(true); tip.addStyleName("tip-box"); tip.setWidget(messageLabel);//from w w w .j a v a 2 s . c om tip.showRelativeTo(target); }
From source file:com.goodow.web.ui.client.help.KeyboardShortcuts.java
License:Apache License
public KeyboardShortcuts() { popup = new DecoratedPopupPanel(true); popup.setStyleName(WebAppResources.styles().keyboardShortcuts()); initWidget(uiBinder.createAndBindUi(this)); setSize("800px", "600px"); popup.setWidget(this); }
From source file:com.google.gwt.sample.showcase.client.content.popups.CwBasicPopup.java
License:Apache License
/** * Initialize this example./* www .j a va2 s .c o m*/ */ @ShowcaseSource @Override public Widget onInitialize() { // Create a basic popup widget final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true); simplePopup.ensureDebugId("cwBasicPopup-simplePopup"); simplePopup.setWidth("150px"); simplePopup.setWidget(new HTML(constants.cwBasicPopupClickOutsideInstructions())); // Create a button to show the popup Button openButton = new Button(constants.cwBasicPopupShowButton(), new ClickHandler() { public void onClick(ClickEvent event) { // Reposition the popup relative to the button Widget source = (Widget) event.getSource(); int left = source.getAbsoluteLeft() + 10; int top = source.getAbsoluteTop() + 10; simplePopup.setPopupPosition(left, top); // Show the popup simplePopup.show(); } }); // Create a popup to show the full size image Image jimmyFull = new Image(Showcase.images.jimmy()); final PopupPanel imagePopup = new PopupPanel(true); imagePopup.setAnimationEnabled(true); imagePopup.ensureDebugId("cwBasicPopup-imagePopup"); imagePopup.setWidget(jimmyFull); jimmyFull.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { imagePopup.hide(); } }); // Add an image thumbnail Image jimmyThumb = new Image(Showcase.images.jimmyThumb()); jimmyThumb.ensureDebugId("cwBasicPopup-thumb"); jimmyThumb.addStyleName("cw-BasicPopup-thumb"); jimmyThumb.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { imagePopup.center(); } }); // Add the widgets to a panel VerticalPanel vPanel = new VerticalPanel(); vPanel.setSpacing(5); vPanel.add(openButton); vPanel.add(new HTML("<br><br><br>" + constants.cwBasicPopupInstructions())); vPanel.add(jimmyThumb); // Return the panel return vPanel; }
From source file:com.ponysdk.core.terminal.ui.PTDecoratedPopupPanel.java
License:Apache License
@Override protected T createUIObject() { return (T) new DecoratedPopupPanel(autoHide); }
From source file:com.ponysdk.ui.terminal.ui.PTDecoratedPopupPanel.java
License:Apache License
@Override public void create(final PTInstruction create, final UIService uiService) { init(create, uiService, new DecoratedPopupPanel(create.getBoolean(PROPERTY.POPUP_AUTO_HIDE))); addCloseHandler(create, uiService);/*from www .ja v a 2 s . c om*/ }
From source file:com.thinqq.qsports.client.userprofile.UserProfileViewImpl.java
License:Open Source License
@Override public void showFatalError() { final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true); simplePopup.ensureDebugId("cwBasicPopup-simplePopup"); simplePopup.setWidth("150px"); simplePopup.setWidget(new HTML("FATAL ERROR")); simplePopup.show();/*from www .j a va 2s .c om*/ }
From source file:es.deusto.weblab.client.lab.ui.themes.es.deusto.weblab.defaultmobile.LoginWindow.java
License:Open Source License
private void setupWidgets(final Widget wid) { this.logoImage.setUrl(GWT.getModuleBaseURL() + this.configurationManager.getProperty(DefaultTheme.Configuration.HOST_ENTITY_MOBILE_IMAGE, "")); final String hostEntityLink = this.configurationManager .getProperty(DefaultTheme.Configuration.HOST_ENTITY_LINK, ""); this.institutionLink.setHref(hostEntityLink); // If ENTER is pressed, login as if the button had been clicked. final KeyDownHandler keyboardHandler = new KeyDownHandler() { @Override/*www . ja v a 2 s.c o m*/ public void onKeyDown(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) LoginWindow.this.onLoginButtonClicked(null); } }; this.usernameTextbox.addKeyDownHandler(keyboardHandler); this.passwordTextbox.addKeyDownHandler(keyboardHandler); final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true); final VerticalPanel languageList = new VerticalPanel(); for (int i = 0; i < IWebLabI18N.LANGUAGES.length; ++i) { final String curLanguage = IWebLabI18N.LANGUAGES[i]; final String curLanguageCode = IWebLabI18N.LANGUAGE_CODES[i]; final Anchor languageButton = new Anchor(curLanguage); languageButton.addClickHandler(new LanguageButtonClickHandler(curLanguageCode)); languageList.add(languageButton); } languageList.setSpacing(15); simplePopup.setWidget(languageList); this.languages.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { final Widget source = (Widget) event.getSource(); final int left = source.getAbsoluteLeft() + 10; final int top = source.getAbsoluteTop() + 10; simplePopup.setPopupPosition(left, top); simplePopup.setModal(true); simplePopup.show(); } }); this.mainPanel.add(wid); final boolean demoAvailable = this.configurationManager .getBoolProperty(WebLabClientLab.DEMO_AVAILABLE_PROPERTY, WebLabClientLab.DEFAULT_DEMO_AVAILABLE); this.guestPanel.setVisible(demoAvailable); }
From source file:net.s17fabu.vip.gwt.showcase.client.content.popups.CwBasicPopup.java
License:Apache License
/** * Initialize this example./*from ww w.j av a 2 s. c o m*/ */ @Override public Widget onInitialize() { // Create a basic popup widget final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true); simplePopup.ensureDebugId("cwBasicPopup-simplePopup"); simplePopup.setWidth("150px"); simplePopup.setWidget(new HTML(constants.cwBasicPopupClickOutsideInstructions())); // Create a button to show the popup Button openButton = new Button(constants.cwBasicPopupShowButton(), new ClickHandler() { public void onClick(ClickEvent event) { // Reposition the popup relative to the button Widget source = (Widget) event.getSource(); int left = source.getAbsoluteLeft() + 10; int top = source.getAbsoluteTop() + 10; simplePopup.setPopupPosition(left, top); // Show the popup simplePopup.show(); } }); // Create a popup to show the full size image Image jimmyFull = Showcase.images.jimmy().createImage(); final PopupPanel imagePopup = new PopupPanel(true); imagePopup.setAnimationEnabled(true); imagePopup.ensureDebugId("cwBasicPopup-imagePopup"); imagePopup.setWidget(jimmyFull); jimmyFull.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { imagePopup.hide(); } }); // Add an image thumbnail Image jimmyThumb = Showcase.images.jimmyThumb().createImage(); jimmyThumb.ensureDebugId("cwBasicPopup-thumb"); jimmyThumb.addStyleName("cw-BasicPopup-thumb"); jimmyThumb.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { imagePopup.center(); } }); // Add the widgets to a panel VerticalPanel vPanel = new VerticalPanel(); vPanel.setSpacing(5); vPanel.add(openButton); vPanel.add(new HTML("<br><br><br>" + constants.cwBasicPopupInstructions())); vPanel.add(jimmyThumb); // Return the panel return vPanel; }
From source file:org.gems.ajax.client.util.Util.java
License:Open Source License
public static void showErrorMessage(String error) { DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true); simplePopup.ensureDebugId("cwBasicPopup-simplePopup"); simplePopup.setWidth("150px"); simplePopup.setWidget(new HTML(error)); simplePopup.setPopupPosition(Util.half(Window.getClientWidth()), Util.half(Window.getClientHeight())); simplePopup.show();//from ww w. ja v a 2 s .com }