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

Examples of org.eurekastreams.web.client.ui.common.GroupPanel


        orderedGroups.addAll(groups.getPagedSet());

        // display groups
        for (final DomainGroupModelView group : orderedGroups)
        {
            GroupPanel groupWidget = new GroupPanel(group, false, true, false);

            final Label subscribeButton = new Label();
            subscribeButtons.put(group.getUniqueId(), subscribeButton);
            final Label unsubscribeButton = new Label();
            unsubscribeButtons.put(group.getUniqueId(), unsubscribeButton);

            subscribeButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().groupNotifSubscribeButton());
            unsubscribeButton.addStyleName(StaticResourceBundle.INSTANCE.coreCss().groupNotifUnsubscribeButton());

            subscribeButton.addClickHandler(new ClickHandler()
            {
                public void onClick(final ClickEvent inArg0)
                {
                    GroupActivitySubscriptionModel.getInstance().insert(group.getUniqueId());
                }
            });
            unsubscribeButton.addClickHandler(new ClickHandler()
            {
                public void onClick(final ClickEvent inArg0)
                {
                    GroupActivitySubscriptionModel.getInstance().delete(group.getUniqueId());
                }
            });

            boolean subscribed = subscribedGroupIds.contains(group.getUniqueId());
            subscribeButton.setVisible(!subscribed);
            unsubscribeButton.setVisible(subscribed);

            groupWidget.insert(subscribeButton, 0);
            groupWidget.insert(unsubscribeButton, 1);

            listPanel.add(groupWidget);
        }
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public Panel render(final DomainGroupModelView item)
    {
        return new GroupPanel(item, true, false, true);
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.web.client.ui.common.GroupPanel

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.