actionsPopup.setWidget(menu); actionsPopup.addCloseHandler(new CloseHandler<PopupPanel>() { @Override
/** * Construct a new {@link DefaultSuggestionDisplay}. */ public DefaultSuggestionDisplay() { suggestionMenu = new SuggestionMenu(true); suggestionPopup = createPopup(); suggestionPopup.setWidget(decorateSuggestionList(suggestionMenu)); }
/** * Creates an empty decorated popup panel using the specified style names. * * @param autoHide <code>true</code> if the popup should be automatically * hidden when the user clicks outside of it * @param modal <code>true</code> if keyboard or mouse events that do not * target the PopupPanel or its children should be ignored * @param prefix the prefix applied to child style names */ DecoratedPopupPanel(boolean autoHide, boolean modal, String prefix) { super(autoHide, modal); String[] rowStyles = new String[] { prefix + "Top", prefix + "Middle", prefix + "Bottom"}; decPanel = new DecoratorPanel(rowStyles, 1); decPanel.setStyleName(""); setStylePrimaryName(DEFAULT_STYLENAME); super.setWidget(decPanel); setStyleName(getContainerElement(), "popupContent", false); setStyleName(decPanel.getContainerElement(), prefix + "Content", true); }
public void setText(String text) { super.setText(text); popup.setWidget(this); }
/** * Create a new date box. * * @param date the default date. * @param picker the picker to drop down from the date box * @param format to use to parse and format dates */ public DateBox(DatePicker picker, Date date, Format format) { this.picker = picker; this.popup = new PopupPanel(true); assert format != null : "You may not construct a date box with a null format"; this.format = format; popup.addAutoHidePartner(box.getElement()); popup.setWidget(picker); popup.setStyleName("dateBoxPopup"); initWidget(box); setStyleName(DEFAULT_STYLENAME); DateBoxHandler handler = new DateBoxHandler(); picker.addValueChangeHandler(handler); box.addFocusHandler(handler); box.addBlurHandler(handler); box.addClickHandler(handler); box.addKeyDownHandler(handler); box.setDirectionEstimator(false); popup.addCloseHandler(handler); setValue(date); }
new WindowResizeHandler(resizeIcon); super.setWidget(mainPanel); show();
final PopupPanel pop = new PopupPanel(false, false); pop.setWidget(new Label("popup")); Image image = new CustomTooltipImage(pop); image.setUrl("http://sstatic.net/stackoverflow/img/venn-diagram.png");
// A popup that doesn't auto-hide, and doesn't let the // user click on anything else. PopupPanel popup = new PopupPanel(false,true); popup.setGlassEnabled(); // Dims the rest of the page popup.setWidget(new Image(res.loader())); popup.center(); // Show popup centered
protected void configureColorPickerPopup(int left, int top, VerticalPanel popupContent) { popup.setWidget(popupContent); popup.show(); int finalLeft = left - popup.getOffsetWidth(); popup.setPopupPosition(finalLeft, top); }
/** * Construct a new {@link DefaultSuggestionDisplay}. */ public DefaultSuggestionDisplay() { suggestionMenu = new SuggestionMenu(true); suggestionPopup = createPopup(); suggestionPopup.setWidget(decorateSuggestionList(suggestionMenu)); }
/** * Construct a new {@link DefaultSuggestionDisplay}. */ public DefaultSuggestionDisplay() { suggestionMenu = new SuggestionMenu(true); suggestionPopup = createPopup(); suggestionPopup.setWidget(decorateSuggestionList(suggestionMenu)); }
public void onClick(ClickEvent event) { final PopupPanel helpPopup = new PopupPanel(true); helpPopup.setWidget(new HTML("<br><h3> " + appVersion + " <h3>")); helpPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight) { int left = (Window.getClientWidth() - offsetWidth); int top = 0; helpPopup.setPopupPosition(left, top); } }); } });
protected void configureColorPickerPopup(int left, int top, VerticalPanel popupContent) { popup.setWidget(popupContent); popup.show(); int finalLeft = left - popup.getOffsetWidth(); popup.setPopupPosition(finalLeft, top); }
PopupPanel popup = new PopupPanel(); Frame frame = new Frame("http://www.yourlink.com/"); popup.setWidget(frame); popup.setGlassEnabled(true); popup.center();
public PopupCell(String title, PopupCellDelegate delegate) { super("click", "keydown"); this.delegate = delegate; this.popup = new PopupPanel(); this.popup.setStyleName("default-popup"); this.popup.setWidget(delegate.asWidget()); this.html = new SafeHtmlBuilder().appendHtmlConstant( "<div tabindex=\"-1\" class='cell-popup'>"+title+"</div>").toSafeHtml(); }
/** * Creates an empty decorated popup panel using the specified style names. * * @param autoHide <code>true</code> if the popup should be automatically * hidden when the user clicks outside of it * @param modal <code>true</code> if keyboard or mouse events that do not * target the PopupPanel or its children should be ignored * @param prefix the prefix applied to child style names */ DecoratedPopupPanel(boolean autoHide, boolean modal, String prefix) { super(autoHide, modal); String[] rowStyles = new String[] { prefix + "Top", prefix + "Middle", prefix + "Bottom"}; decPanel = new DecoratorPanel(rowStyles, 1); decPanel.setStyleName(""); setStylePrimaryName(DEFAULT_STYLENAME); super.setWidget(decPanel); setStyleName(getContainerElement(), "popupContent", false); setStyleName(decPanel.getContainerElement(), prefix + "Content", true); }
/** * Creates an empty decorated popup panel using the specified style names. * * @param autoHide <code>true</code> if the popup should be automatically * hidden when the user clicks outside of it * @param modal <code>true</code> if keyboard or mouse events that do not * target the PopupPanel or its children should be ignored * @param prefix the prefix applied to child style names */ DecoratedPopupPanel(boolean autoHide, boolean modal, String prefix) { super(autoHide, modal); String[] rowStyles = new String[] { prefix + "Top", prefix + "Middle", prefix + "Bottom"}; decPanel = new DecoratorPanel(rowStyles, 1); decPanel.setStyleName(""); setStylePrimaryName(DEFAULT_STYLENAME); super.setWidget(decPanel); setStyleName(getContainerElement(), "popupContent", false); setStyleName(decPanel.getContainerElement(), prefix + "Content", true); }
public static void on(Widget parent, boolean loading) { if(parent !=null && loading) { int left = parent.getAbsoluteLeft(); int top = parent.getAbsoluteTop(); int width = parent.getOffsetWidth(); int height = parent.getOffsetHeight(); p = new PopupPanel(); //p.setStylePrimaryName("bpm-loading-overlay"); p.setWidget(new Image("images/loading_lite.gif")); p.setPopupPosition(left+(width/2)-15, top+(height/2)-15); p.show(); } else { if(p!=null) { p.hide(); p = null; } } }
/** * Create a new date box. * * @param date the default date. * @param picker the picker to drop down from the date box * @param format to use to parse and format dates */ public DateBox(DatePicker picker, Date date, Format format) { this.picker = picker; this.popup = new PopupPanel(true); assert format != null : "You may not construct a date box with a null format"; this.format = format; popup.addAutoHidePartner(box.getElement()); popup.setWidget(picker); popup.setStyleName("dateBoxPopup"); initWidget(box); setStyleName(DEFAULT_STYLENAME); DateBoxHandler handler = new DateBoxHandler(); picker.addValueChangeHandler(handler); box.addFocusHandler(handler); box.addBlurHandler(handler); box.addClickHandler(handler); box.addKeyDownHandler(handler); box.setDirectionEstimator(false); popup.addCloseHandler(handler); setValue(date); }
/** {@inheritDoc} */ protected Widget createActive() { PopupPanel panel = getPopup(); Calendar calendar = getCalendar(); calendar.setSelectedDate((Date) getValue()); calendar.display(); if (panel.getWidget() != calendar) panel.setWidget(calendar); panel.show(); int left = getAbsoluteLeft(); if (left + calendar.getOffsetWidth() > Window.getClientWidth()) left -= (left + calendar.getOffsetWidth() - Window.getClientWidth()); if (left < 0) left = 0; panel.setPopupPosition(left, getAbsoluteTop()); FlexTable table = getGrid(); if (table instanceof EditableGrid) { EditableGrid grid = (EditableGrid) table; grid.setCurrentCell(getRow(), getColumn()); } return getLabel(); }