com.google.gwt.user.client.ui.PopupPanel Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.PopupPanel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MsgDestinationsPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchNewQueueDialogue() { window = new DefaultWindow(Console.MESSAGES.createTitle("JMS Queue")); window.setWidth(480); window.setHeight(360); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); window.trapWidget( new NewQueueWizard(this).asWidget() ); window.setGlassEnabled(true); window.center(); }
Example #2
Source File: TimeGrid.java From unitime with Apache License 2.0 | 6 votes |
public SelectionLayer() { setStyleName("selection-layer"); iPopup = new PopupPanel(); iPopup.setStyleName("unitime-TimeGridSelectionPopup"); iHint = new P("content"); iPopup.setWidget(iHint); iSelection = new SelectionPanel(); iSelection.setVisible(false); add(iSelection, 0, 0); sinkEvents(Event.ONMOUSEDOWN); sinkEvents(Event.ONMOUSEUP); sinkEvents(Event.ONMOUSEMOVE); sinkEvents(Event.ONMOUSEOVER); sinkEvents(Event.ONMOUSEOUT); }
Example #3
Source File: AbstractTypeAction.java From openchemlib-js with BSD 3-Clause "New" or "Revised" License | 6 votes |
private synchronized void createPopup(final Window parent, Point2D pt, int row) { if (popup == null || !popup.isShowing()) { popup = createPane(); popup.setModal(true); popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight) { int left = parent.getNative().getAbsoluteLeft() + (int) ToolBar.IMAGE_WIDTH; int top = parent.getNative().getAbsoluteTop() + (int) (ToolBar.IMAGE_HEIGHT * scale / ToolBar.ROWS * 3); popup.setPopupPosition(left, top); popup.requestLayout(); } }); } }
Example #4
Source File: GwtMockitoWidgetBaseClassesTest.java From gwtmockito with Apache License 2.0 | 6 votes |
@Test public void testPanels() throws Exception { invokeAllAccessibleMethods(new AbsolutePanel() {}); invokeAllAccessibleMethods(new CellPanel() {}); invokeAllAccessibleMethods(new ComplexPanel() {}); invokeAllAccessibleMethods(new DeckLayoutPanel() {}); invokeAllAccessibleMethods(new DeckPanel() {}); invokeAllAccessibleMethods(new DecoratorPanel() {}); invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {}); invokeAllAccessibleMethods(new DockPanel() {}); invokeAllAccessibleMethods(new FlowPanel() {}); invokeAllAccessibleMethods(new FocusPanel() {}); invokeAllAccessibleMethods(new HorizontalPanel() {}); invokeAllAccessibleMethods(new HTMLPanel("") {}); invokeAllAccessibleMethods(new LayoutPanel() {}); invokeAllAccessibleMethods(new PopupPanel() {}); invokeAllAccessibleMethods(new RenderablePanel("") {}); invokeAllAccessibleMethods(new ResizeLayoutPanel() {}); invokeAllAccessibleMethods(new SimpleLayoutPanel() {}); invokeAllAccessibleMethods(new SimplePanel() {}); invokeAllAccessibleMethods(new SplitLayoutPanel() {}); invokeAllAccessibleMethods(new StackPanel() {}); invokeAllAccessibleMethods(new VerticalPanel() {}); }
Example #5
Source File: DebugPanelFilterWidget.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public DebugPanelFilterWidget(DebugPanelFilterModel model) { HorizontalPanel panel = new HorizontalPanel(); panel.add(button = Utils.createMenuButton("Add/Edit Filter", null)); panel.add(new DebugPanelFilterTrail(model)); panel.setStyleName(Utils.style() + "-filters"); initWidget(panel); popup = new FilterPopup(model); button.addClickHandler(new ClickHandler() { //@Override public void onClick(ClickEvent event) { popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { //@Override public void setPosition(int offsetWidth, int offsetHeight) { popup.setPopupPosition( button.getAbsoluteLeft(), button.getAbsoluteTop() + button.getOffsetHeight()) ; } }); } }); }
Example #6
Source File: PropertiesPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchNewPropertyDialoge(String group) { propertyWindow = new DefaultWindow(Console.MESSAGES.createTitle("System Property")); propertyWindow.setWidth(480); propertyWindow.setHeight(360); propertyWindow.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); propertyWindow.trapWidget( new NewPropertyWizard(this, group, true).asWidget() ); propertyWindow.setGlassEnabled(true); propertyWindow.center(); }
Example #7
Source File: WebPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchConnectorDialogue() { window = new DefaultWindow(Console.MESSAGES.createTitle("Connector")); window.setWidth(480); window.setHeight(400); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); window.trapWidget( new NewConnectorWizard(this, connectors, socketsBindingList).asWidget() ); window.setGlassEnabled(true); window.center(); }
Example #8
Source File: MsgDestinationsPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchNewSecDialogue() { window = new DefaultWindow(Console.MESSAGES.createTitle("Security Setting")); window.setWidth(480); window.setHeight(360); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); window.trapWidget( new NewSecurityPatternWizard(this, providerEntity).asWidget() ); window.setGlassEnabled(true); window.center(); }
Example #9
Source File: MsgDestinationsPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchNewAddrDialogue() { window = new DefaultWindow(Console.MESSAGES.createTitle("Addressing Setting")); window.setWidth(480); window.setHeight(360); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); window.trapWidget( new NewAddressPatternWizard(this, providerEntity).asWidget() ); window.setGlassEnabled(true); window.center(); }
Example #10
Source File: AdditionalChoicePropertyEditor.java From appinventor-extensions with Apache License 2.0 | 6 votes |
/** * Opens the additional choice dialog. */ protected void openAdditionalChoiceDialog() { popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight){ // adjust the x and y positions so that the entire panel // is on-screen int xPosition = getAbsoluteLeft(); int yPosition = getAbsoluteTop(); int xExtrude = xPosition + offsetWidth - Window.getClientWidth() - Window.getScrollLeft(); int yExtrude = yPosition + offsetHeight - Window.getClientHeight() - Window.getScrollTop(); if (xExtrude > 0) { xPosition -= (xExtrude + ADDITIONAL_CHOICE_ONSCREEN_PADDING); } if (yExtrude > 0) { yPosition -= (yExtrude + ADDITIONAL_CHOICE_ONSCREEN_PADDING); } popup.setPopupPosition(xPosition, yPosition); } }); }
Example #11
Source File: MsgDestinationsPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchNewTopicDialogue() { window = new DefaultWindow(Console.MESSAGES.createTitle("JMS Topic")); window.setWidth(480); window.setHeight(360); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); window.trapWidget( new NewTopicWizard(this).asWidget() ); window.setGlassEnabled(true); window.center(); }
Example #12
Source File: AddDomainDeploymentWizard.java From core with GNU Lesser General Public License v2.1 | 6 votes |
@Override protected void finish() { final PopupPanel loading = Feedback.loading( Console.CONSTANTS.common_label_plaseWait(), Console.CONSTANTS.common_label_requestProcessed(), () -> {} ); final Outcome<FunctionContext> outcome = new DeploymentWizardOutcome(loading, context); if (context.deployNew) { uploadAddContentAndAssign(outcome); } else if (context.deployExisting) { addAssignment(outcome); } else if (context.deployUnmanaged) { addUnmanaged(outcome); } }
Example #13
Source File: StandaloneServerPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
private void showVersionInfo(String json) { DefaultWindow window = new DefaultWindow("Management Model Versions"); window.setWidth(480); window.setHeight(360); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); TextArea textArea = new TextArea(); textArea.setStyleName("fill-layout"); textArea.setText(json); window.setWidget(textArea); window.setGlassEnabled(true); window.center(); }
Example #14
Source File: HostPropertiesPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launchNewPropertyDialoge(String group) { propertyWindow = new DefaultWindow(Console.MESSAGES.newTitle("Host Property")); propertyWindow.setWidth(480); propertyWindow.setHeight(360); propertyWindow.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); propertyWindow.trapWidget( new NewPropertyWizard(this, group, true).asWidget() ); propertyWindow.setGlassEnabled(true); propertyWindow.center(); }
Example #15
Source File: TopologyPresenter.java From core with GNU Lesser General Public License v2.1 | 6 votes |
private void showVersionInfo(String json) { DefaultWindow window = new DefaultWindow("Management Model Versions"); window.setWidth(480); window.setHeight(360); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { } }); TextArea textArea = new TextArea(); textArea.setStyleName("fill-layout"); textArea.setText(json); window.setWidget(textArea); window.setGlassEnabled(true); window.center(); }
Example #16
Source File: MessageCenterView.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void onMessage(final Message message) { if (!message.isTransient()) { // update the visible message count reflectMessageCount(); final PopupPanel display = createDisplay(message); displayNotification(display, message); if (!message.isSticky()) { Timer hideTimer = new Timer() { @Override public void run() { // hide message messageDisplay.clear(); display.hide(); } }; hideTimer.schedule(4000); } } }
Example #17
Source File: BootstrapServerDialog.java From core with GNU Lesser General Public License v2.1 | 6 votes |
BootstrapServerDialog(final BootstrapServerSetup serverSetup) { connectPage = new ConnectPage(serverSetup, this); configurePage = new ConfigurePage(serverSetup, this); deck = new DeckLayoutPanel(); deck.addStyleName("window-content"); // white background for forms deck.addStyleName("default-window-content"); deck.add(connectPage); deck.add(configurePage); int width = 750; popupPanel = new PopupPanel(false, true); popupPanel.setGlassEnabled(true); popupPanel.setAnimationEnabled(false); popupPanel.setWidget(deck); popupPanel.setWidth(String.valueOf(width) + "px"); popupPanel.setHeight(String.valueOf(width / DefaultWindow.GOLDEN_RATIO) + "px"); popupPanel.setStyleName("default-window"); }
Example #18
Source File: HorizontalPanelWithHint.java From unitime with Apache License 2.0 | 6 votes |
public HorizontalPanelWithHint(Widget hint) { super(); iHint = new PopupPanel(); iHint.setWidget(hint); iHint.setStyleName("unitime-PopupHint"); sinkEvents(Event.ONMOUSEOVER); sinkEvents(Event.ONMOUSEOUT); sinkEvents(Event.ONMOUSEMOVE); iShowHint = new Timer() { @Override public void run() { iHint.show(); } }; iHideHint = new Timer() { @Override public void run() { iHint.hide(); } }; }
Example #19
Source File: UniTimeTableHeader.java From unitime with Apache License 2.0 | 6 votes |
public UniTimeTableHeader(String title, int colSpan, HorizontalAlignmentConstant align) { super(title, false); iColSpan = colSpan; iAlign = align; iTitle = title; addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { final PopupPanel popup = new PopupPanel(true); popup.addStyleName("unitime-Menu"); if (!setMenu(popup)) return; popup.showRelativeTo((Widget)event.getSource()); ((MenuBar)popup.getWidget()).focus(); } }); }
Example #20
Source File: SuggestionsSelectList.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
/** * Adds suggestions to the suggestion menu bar. * * @param suggestions * the suggestions to be added * @param textFieldWidget * the text field which the suggestion is attached to to bring * back the focus after selection * @param popupPanel * pop-up panel where the menu bar is shown to hide it after * selection * @param suggestionServerRpc * server RPC to ask for new suggestion after a selection */ public void addItems(final List<SuggestTokenDto> suggestions, final VTextField textFieldWidget, final PopupPanel popupPanel, final TextFieldSuggestionBoxServerRpc suggestionServerRpc) { for (int index = 0; index < suggestions.size(); index++) { final SuggestTokenDto suggestToken = suggestions.get(index); final MenuItem mi = new MenuItem(suggestToken.getSuggestion(), true, new ScheduledCommand() { @Override public void execute() { final String tmpSuggestion = suggestToken.getSuggestion(); final TokenStartEnd tokenStartEnd = tokenMap.get(tmpSuggestion); final String text = textFieldWidget.getValue(); final StringBuilder builder = new StringBuilder(text); builder.replace(tokenStartEnd.getStart(), tokenStartEnd.getEnd() + 1, tmpSuggestion); textFieldWidget.setValue(builder.toString(), true); popupPanel.hide(); textFieldWidget.setFocus(true); suggestionServerRpc.suggest(builder.toString(), textFieldWidget.getCursorPos()); } }); tokenMap.put(suggestToken.getSuggestion(), new TokenStartEnd(suggestToken.getStart(), suggestToken.getEnd())); Roles.getListitemRole().set(mi.getElement()); WidgetUtil.sinkOnloadForImages(mi.getElement()); addItem(mi); } }
Example #21
Source File: SubsystemTreeBuilder.java From core with GNU Lesser General Public License v2.1 | 5 votes |
private static void displaySubsystemHelp(HasTreeItems subsysTree) { PopupPanel help = new PopupPanel(); help.setStyleName("help-panel-open"); help.getElement().setAttribute("style", "padding:15px"); help.setWidget(new HTML("Mostly likely there is no UI provided to manage a particular subsystem. " + "It might as well be, that the profile doesn't include any subsystems at all.")); Widget widget = (Widget) subsysTree; help.setPopupPosition(widget.getAbsoluteLeft()+50, widget.getAbsoluteTop()+20); help.setWidth("240px"); help.setHeight("80px"); help.setAutoHideEnabled(true); help.show(); }
Example #22
Source File: ErrorReporter.java From appinventor-extensions with Apache License 2.0 | 5 votes |
private static void reportMessage(String message) { if (!Ode.isWindowClosing()) { POPUP.setMessageHTML(message); // Position the popup before showing it to prevent flashing. POPUP.setPopupPositionAndShow(new PopupPanel.PositionCallback() { @Override public void setPosition(int offsetWidth, int offsetHeight) { POPUP.centerTopPopup(); } }); } }
Example #23
Source File: MessageCenterView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
private PopupPanel createDisplay(Message message) { PopupPanel displayPopup = new PopupPanel() { { this.sinkEvents(Event.ONKEYDOWN); getElement().setAttribute("role", "alert"); getElement().setAttribute("aria-live", "assertive"); if(!message.isSticky()) { setAutoHideEnabled(true); setAutoHideOnHistoryEventsEnabled(true); } } @Override protected void onPreviewNativeEvent(Event.NativePreviewEvent event) { if (Event.ONKEYDOWN == event.getTypeInt()) { if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE) { // Dismiss when escape is pressed hide(); } } } }; displayPopup.addStyleName("back"); return displayPopup; }
Example #24
Source File: ContextMenu.java From appinventor-extensions with Apache License 2.0 | 5 votes |
/** * Creates a new context menu. */ public ContextMenu() { popupPanel = new PopupPanel(true); // autoHide //Enabling Glass under the popups so that clicks on the iframe (blockly) also hide the panel popupPanel.setGlassEnabled(true); popupPanel.setGlassStyleName("none"); //No style is passed (the default grays out the window) menuBar = new MenuBar(true); menuBar.setStylePrimaryName("ode-ContextMenu"); popupPanel.add(menuBar); }
Example #25
Source File: GalleryClient.java From appinventor-extensions with Apache License 2.0 | 5 votes |
/** * loadSourceFile opens the app as a new app inventor project * @param gApp the app to open * @return True if success, otherwise false */ public boolean loadSourceFile(GalleryApp gApp, String newProjectName, final PopupPanel popup) { final String projectName = newProjectName; final String sourceKey = getGallerySettings().getSourceKey(gApp.getGalleryAppId()); final long galleryId = gApp.getGalleryAppId(); // first check name to see if valid and unique... if (!TextValidators.checkNewProjectName(projectName)) return false; // the above function takes care of error messages // Callback for updating the project explorer after the project is created on the back-end final Ode ode = Ode.getInstance(); final OdeAsyncCallback<UserProject> callback = new OdeAsyncCallback<UserProject>( // failure message MESSAGES.createProjectError()) { @Override public void onSuccess(UserProject projectInfo) { Project project = ode.getProjectManager().addProject(projectInfo); Ode.getInstance().openYoungAndroidProjectInDesigner(project); popup.hide(); } @Override public void onFailure(Throwable caught) { popup.hide(); super.onFailure(caught); } }; // this is really what's happening here, we call server to load project ode.getProjectService().newProjectFromGallery(projectName, sourceKey, galleryId, callback); return true; }
Example #26
Source File: AddWizard.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override protected void finish() { final PopupPanel loading = Feedback.loading( Console.CONSTANTS.common_label_plaseWait(), Console.CONSTANTS.common_label_requestProcessed(), () -> {} ); final DeploymentWizardOutcome outcome = new DeploymentWizardOutcome(loading, context); if (context.deployNew) { upload(outcome); } else if (context.deployUnmanaged) { addUnmanaged(outcome); } }
Example #27
Source File: ReplaceDeploymentWizard.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override protected void finish() { final PopupPanel loading = Feedback.loading( Console.CONSTANTS.common_label_plaseWait(), Console.CONSTANTS.common_label_requestProcessed(), () -> {} ); // as it is as replace operation, the new upload name/runtime must preserve the actual deployment information. context.upload.setName(content.getName()); context.upload.setRuntimeName(content.getRuntimeName()); new Async<FunctionContext>(Footer.PROGRESS_ELEMENT).single(new FunctionContext(), new DeploymentWizardOutcome(loading, context), new DeploymentFunctions.UploadContent(dispatcher, context.fileUpload, context.upload, true)); }
Example #28
Source File: RpcStatusPopup.java From appinventor-extensions with Apache License 2.0 | 5 votes |
/** * Initializes the LoadingPopup. */ public RpcStatusPopup() { super(/* autoHide = */ false); setStyleName("ode-RpcStatusMessage"); setWidget(label); // Re-center the loading message when the window is resized. // TODO(halabelson): Replace the deprecated methods Window.addWindowResizeListener(new WindowResizeListener() { @Override public void onWindowResized(int width, int height) { positionPopup(getOffsetWidth()); } }); // Reposition the message to the top of the screen when the // window is scrolled // TODO(halabelson): get rid of the flashing on vertical scrolling Window.addWindowScrollListener(new WindowScrollListener() { @Override public void onWindowScrolled(int scrollLeft, int scrollTop) { positionPopup(getOffsetWidth()); } }); // Position the popup before showing it to prevent flashing. setPopupPositionAndShow(new PopupPanel.PositionCallback() { @Override public void setPosition(int offsetWidth, int offsetHeight) { positionPopup(offsetWidth); } }); }
Example #29
Source File: VComboBoxMultiselect.java From vaadin-combobox-multiselect with Apache License 2.0 | 5 votes |
@Override public void onClose(CloseEvent<PopupPanel> event) { debug("VComboBoxMultiselect.SP: onClose(" + event.isAutoClosed() + ")"); if (event.isAutoClosed()) { this.lastAutoClosed = new Date().getTime(); } connector.sendBlurEvent(); }
Example #30
Source File: VComboBoxMultiselect.java From vaadin-combobox-multiselect with Apache License 2.0 | 5 votes |
@Override public void onClose(CloseEvent<PopupPanel> event) { debug("VComboBoxMultiselect.SP: onClose(" + event.isAutoClosed() + ")"); if (event.isAutoClosed()) { this.lastAutoClosed = new Date().getTime(); } connector.sendBlurEvent(); }