Package org.eurekastreams.web.client.ui.common.notifier

Examples of org.eurekastreams.web.client.ui.common.notifier.Notification


                            // show a notification
                            Session.getInstance()
                                    .getEventBus()
                                    .notifyObservers(
                                            new ShowNotificationEvent(new Notification(
                                                    "Your request for access has been sent")));
                        }
                    }
                    else
                    {
View Full Code Here


                    if (new WidgetJSNIFacadeImpl().confirm("Are you sure you want to delete this tab? "))
                    {
                        GalleryTabTemplateModel.getInstance().delete(inItem.getId());

                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification("The " + inItem.getTitle()
                                        + " tab has been deleted.")));
                    }
                }
            });
        }
View Full Code Here

                        Session.getInstance().getEventBus().notifyObservers(
                                new UpdateHistoryEvent(new CreateUrlRequest(Page.SETTINGS, "tab", "Plugins")));
                        pluginTab.reload();
                        Session.getInstance().getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification(
                                                "Stream Plugin has been successfully added")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(DeletedPluginDefinitionResponseEvent.class,
                new Observer<DeletedPluginDefinitionResponseEvent>()
                {
                    public void update(final DeletedPluginDefinitionResponseEvent arg1)
                    {
                        Session.getInstance().getEventBus().notifyObservers(
                                new ShowNotificationEvent(new Notification(
                                        "Stream Plugin has been successfully deleted")));
                    }
                });

        Session.getInstance().getEventBus().addObserver(UpdatedHistoryParametersEvent.class,
View Full Code Here

     *            the text of the notification to create.
     * @return the new notification.
     */
    public static ShowNotificationEvent getInstance(final String notificationText)
    {
        return new ShowNotificationEvent(new Notification(notificationText));
    }
View Full Code Here

                        if (event.getResponse() == gadgetData.getId())
                        {
                            thisBuffered.setVisible(false);
                            thisBuffered.addStyleName(StaticResourceBundle.INSTANCE.coreCss().hidden());
                            Session.getInstance().getEventBus().notifyObservers(
                                    new ShowNotificationEvent(new Notification(new UndoDeleteNotification("App",
                                            new ClickHandler()
                                            {
                                                public void onClick(final ClickEvent event)
                                                {
                                                    GadgetModel.getInstance().undoDelete(gadgetData.getId());
View Full Code Here

                        ThemeModel.getInstance().delete(theme.getId());

                        Session.getInstance()
                                .getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification("The " + theme.getName()
                                                + " theme has been deleted.")));
                    }
                }
            });
        }
View Full Code Here

                                    public void update(final DeletedStartPageTabResponseEvent event)
                                    {
                                        tabs.removeTab(String.valueOf(event.getResponse().getId()));
                                        tabs.addTab(newTab);
                                        Session.getInstance().getEventBus().notifyObservers(
                                                new ShowNotificationEvent(new Notification(new UndoDeleteNotification(
                                                        event.getResponse().getTabName(), new ClickHandler()
                                                        {
                                                            public void onClick(final ClickEvent clickEvent)
                                                            {
                                                                StartTabsModel.getInstance().undoDelete(
View Full Code Here

                    {
                        model.delete(metaData.getGadgetDefinition().getId());

                        Session.getInstance().getEventBus()
                                .notifyObservers(
                                        new ShowNotificationEvent(new Notification(metaData.getTitle()
                                                + " has been deleted.")));
                        thisBuffered.setVisible(false);
                    }
                }
            });

        }

        FlowPanel imageContainer = new FlowPanel();
        imageContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().imageContainer());

        addStyleName(StaticResourceBundle.INSTANCE.coreCss().gadgetMetaData());

        // Im a gadget.
        if (tabId != null)
        {
            if (metaData.getThumbnail() != null && !metaData.getThumbnail().equals(""))
            {
                imageContainer.add(new Image(metaData.getThumbnail()));
            }
            else
            {
                imageContainer.add(new Image("/style/images/gadget-gallery-default.png"));
            }

            applyGadget = new Hyperlink("Apply App", History.getToken());
            applyGadget.addStyleName(StaticResourceBundle.INSTANCE.coreCss().applyGadget());
            applyGadget.addClickHandler(new ClickHandler()
            {
                public void onClick(final ClickEvent event)
                {
                    GadgetModel.getInstance()
                            .insert(
                                    new AddGadgetToStartPageRequest("{" + metaData.getGadgetDefinition().getUUID()
                                            + "}", tabId));
                }
            });

            Session.getInstance().getEventBus().addObserver(GadgetAddedToStartPageEvent.class,
                    new Observer<GadgetAddedToStartPageEvent>()
                    {

                        public void update(final GadgetAddedToStartPageEvent arg1)
                        {
                            Session.getInstance().getEventBus().notifyObservers(
                                    new ShowNotificationEvent(new Notification("App has been added")));

                            if (arg1.getGadget().getGadgetDefinition().getId() == metaData.getGadgetDefinition()
                                    .getId())
                            {
                                setActive(true);
View Full Code Here

                else if (caught instanceof ExecutionException || caught instanceof GeneralException)
                {
                    Session.getInstance()
                            .getEventBus()
                            .notifyObservers(
                                    new ShowNotificationEvent(new Notification(
                                            "Error occurred, please refresh and try again.")));
                    Session.getInstance().getEventBus()
                            .notifyObservers(new ExceptionResponseEvent(caught, thisBuffered, request));
                }
            }
View Full Code Here

        // wire up events to refresh the list when something is removed
        eventBus.addObserver(UpdatedActivityFlagResponseEvent.class, new Observer<UpdatedActivityFlagResponseEvent>()
        {
            public void update(final UpdatedActivityFlagResponseEvent ev)
            {
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification(
                        "The flagged activity has been allowed")));
                adminTabContent.reload();
            }
        });
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.ui.common.notifier.Notification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.