Package org.eurekastreams.web.client.events

Examples of org.eurekastreams.web.client.events.EventBus.addObserver()


                    handleViewsChanged(Session.getInstance().getUrlViews());
                }
            }
        });

        eventBus.addObserver(AddedFeaturedStreamResponseEvent.class, new Observer<AddedFeaturedStreamResponseEvent>()
        {
            public void update(final AddedFeaturedStreamResponseEvent event)
            {
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification("Stream has been featured.")));
            }
View Full Code Here


            {
                eventBus.notifyObservers(new ShowNotificationEvent(new Notification("Stream has been featured.")));
            }
        });

        eventBus.addObserver(UpdatedGroupStickyActivityEvent.class, new Observer<UpdatedGroupStickyActivityEvent>()
        {
            public void update(final UpdatedGroupStickyActivityEvent ev)
            {
                // make sure event applies to the current view (since current view may not even be a group)
                if (currentStreamEntity != null && currentStreamEntity.getEntityType() == EntityType.GROUP
View Full Code Here

     */
    private void setupStreamsAndBookmarks()
    {
        final EventBus eventBus = EventBus.getInstance();

        eventBus.addObserver(GotCurrentUserStreamBookmarks.class, new Observer<GotCurrentUserStreamBookmarks>()
        {
            private final AvatarUrlGenerator groupUrlGen = new AvatarUrlGenerator(EntityType.GROUP);
            private final AvatarUrlGenerator personUrlGen = new AvatarUrlGenerator(EntityType.PERSON);

            public void update(final GotCurrentUserStreamBookmarks event)
View Full Code Here

                bookmarksLoaded = true;
                checkInit();
            }
        });

        eventBus.addObserver(StreamActivitySubscriptionChangedEvent.class,
                new Observer<StreamActivitySubscriptionChangedEvent>()
                {
                    public void update(final StreamActivitySubscriptionChangedEvent ev)
                    {
                        boolean newStatus = ev.getResponse().getReceiveNewActivityNotifications();
View Full Code Here

                        String msg = newStatus ? "You will now receive emails for new activities to this stream"
                                : "You will no longer receive emails for new activities to this stream";
                        eventBus.notifyObservers(new ShowNotificationEvent(new Notification(msg)));
                    }
                });
        eventBus.addObserver(GotStreamActivitySubscriptionResponseEvent.class,
                new Observer<GotStreamActivitySubscriptionResponseEvent>()
                {
                    public void update(final GotStreamActivitySubscriptionResponseEvent result)
                    {
                        setSubscribeStatus(result.isSubscribed());
View Full Code Here

                    {
                        setSubscribeStatus(result.isSubscribed());
                    }
                });

        eventBus.addObserver(GotCurrentUserCustomStreamsResponseEvent.class,
                new Observer<GotCurrentUserCustomStreamsResponseEvent>()
                {
                    public void update(final GotCurrentUserCustomStreamsResponseEvent event)
                    {
                        filterList.clear();
View Full Code Here

                        customStreamsLoaded = true;
                        checkInit();
                    }
                });

        eventBus.addObserver(StreamSearchBeginEvent.class, new Observer<StreamSearchBeginEvent>()
        {
            public void update(final StreamSearchBeginEvent event)
            {
                if (null == event.getSearchText())
                {
View Full Code Here

                handlePostMessage();
            }
        });

        final EventBus eventBus = Session.getInstance().getEventBus();
        eventBus.addObserver(MessageStreamAppendEvent.class, new Observer<MessageStreamAppendEvent>()
        {
            public void update(final MessageStreamAppendEvent event)
            {
                errorMsg.setVisible(false);
                addStyleName(StaticResourceBundle.INSTANCE.coreCss().small());
View Full Code Here

                onRemainingCharactersChanged();
                links.close();
            }
        });

        eventBus.addObserver(GotSystemSettingsResponseEvent.class, new Observer<GotSystemSettingsResponseEvent>()
        {
            public void update(final GotSystemSettingsResponseEvent event)
            {
                String warning = event.getResponse().getContentWarningText();
                if (warning != null && !warning.isEmpty())
View Full Code Here

                }
                message.setVisible(true);
            }
        });

        eventBus.addObserver(MessageTextAreaChangedEvent.getEvent(), new Observer<MessageTextAreaChangedEvent>()
        {
            public void update(final MessageTextAreaChangedEvent arg1)
            {
                // the value changed - make sure we're not stuck in the disabled, non-editable mode
                if ((" " + getStyleName() + " ").contains(StaticResourceBundle.INSTANCE.coreCss().small()))
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.