Examples of StreamPanel


Examples of org.eurekastreams.web.client.ui.connect.support.StreamPanel

     * @param jsonRequest
     *            Stream query as a JSON string.
     */
    public ReadStreamWidget(final String jsonRequest)
    {
        final StreamPanel streamPanel = new StreamPanel(ShowRecipient.YES, new StreamMessageItemRenderer(
                ShowRecipient.YES)
        {
            {
                setCreatePermalink(false);
            }
        });
        streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().embeddedWidget());
        streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().eurekaConnectReadStreamWidget());

        CreateUrlRequest linkInfo = determineStreamLink(jsonRequest);
        if (linkInfo != null)
        {
            String token = Session.getInstance().generateUrl(linkInfo);
            Hyperlink link = new Hyperlink("Go to Stream", token);
            link.addStyleName(StaticResourceBundle.INSTANCE.coreCss().goToStreamLink());
            FlowPanel panel = new FlowPanel();
            panel.add(link);
            streamPanel.add(panel); // cheating somewhat here
        }

        initWidget(streamPanel);

        EventBus.getInstance().notifyObservers(new StreamRequestEvent("", jsonRequest));
View Full Code Here

Examples of org.eurekastreams.web.client.ui.connect.support.StreamPanel

     * @param jsonRequest
     *            Stream query as a JSON string.
     */
    public FullStreamWidget(final String jsonRequest)
    {
        final StreamPanel streamPanel = new StreamPanel(ShowRecipient.YES,
                new FullStreamWidgetStreamMessageItemRenderer());
        streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().embeddedWidget());
        streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().eurekaConnectFullStreamWidget());
        initWidget(streamPanel);

        EventBus.getInstance().notifyObservers(new StreamRequestEvent("", jsonRequest));
        StreamScope postingScope = getPostingScope(jsonRequest);
        if (postingScope != null)
        {
            streamPanel.setStreamScope(postingScope, true);
        }
    }
View Full Code Here

Examples of org.eurekastreams.web.client.ui.connect.support.StreamPanel

        siteUrl = inSiteUrl;
        siteTitle = inSiteTitle;

        StreamScope streamScope = new StreamScope(ScopeType.RESOURCE, resourceId);

        final StreamPanel streamPanel = new StreamPanel(ShowRecipient.NO,
                new CommentWidgetStreamMessageItemRenderer(),
                new CommentWidgetPostToStreamComposite(streamScope));
        streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().embeddedWidget());
        streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().connectCommentWidget());
        initWidget(streamPanel);

        EventBus.getInstance().addObserver(GotStreamResponseEvent.class, new Observer<GotStreamResponseEvent>()
        {
            public void update(final GotStreamResponseEvent event)
            {
                // hide everything but the post box if the stream is empty
                // but distinguish between an empty stream and no search results
                boolean emptyStream = Session.getInstance().getParameterValue("search") == null
                        && event.getStream().getPagedSet().isEmpty();
                if (emptyStream)
                {
                    streamPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().emptyStream());
                }
                else
                {
                    streamPanel.removeStyleName(StaticResourceBundle.INSTANCE.coreCss().emptyStream());
                }
            }
        });

        String jsonRequest = StreamJsonRequestFactory.addRecipient(EntityType.RESOURCE, resourceId,
                StreamJsonRequestFactory.getEmptyRequest()).toString();

        EventBus.getInstance().notifyObservers(new StreamRequestEvent("", jsonRequest));
        streamPanel.setStreamScope(streamScope, true);
    }
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.