Package org.eurekastreams.commons.formatting

Examples of org.eurekastreams.commons.formatting.DateFormatter


    insertActionSeparator(followersPanel);

    followersPanel.add(new InlineLabel("Added: "));

    DateFormatter dateFormatter = new DateFormatter(new Date());
    InlineLabel dateAdded = new InlineLabel(dateFormatter.timeAgo(group.getDateAdded(), true));
    dateAdded.addStyleName(StaticResourceBundle.INSTANCE.coreCss().connectionItemFollowersData());
    followersPanel.add(dateAdded);

    infoPanel.add(followersPanel);
      }
View Full Code Here


        groupMetaData.add(new HTML("Followers: <span class='" + StaticResourceBundle.INSTANCE.coreCss().light() + "'>"
                + group.getFollowersCount() + "</span>"));
        insertActionSeparator(groupMetaData);
        groupMetaData.add(new HTML("Added: <span class='" + StaticResourceBundle.INSTANCE.coreCss().light() + "'>"
                + new DateFormatter().timeAgo(group.getDateAdded(), true) + "</span>"));

        groupAbout.add(groupMetaData);

        if (!group.isPublic())
        {
View Full Code Here

            insertActionSeparator(followersPanel);

            followersPanel.add(new InlineLabel("Added: "));

            DateFormatter dateFormatter = new DateFormatter(new Date());
            InlineLabel dateAdded = new InlineLabel(dateFormatter.timeAgo(person.getDateAdded(), true));
            dateAdded.addStyleName(StaticResourceBundle.INSTANCE.coreCss().connectionItemFollowersData());
            followersPanel.add(dateAdded);

            infoPanel.add(followersPanel);
        }
View Full Code Here

            {
                streamInfoText.setInnerText(Integer.toString(inStreamDTO.getFollowersCount()) + " Followers");
            }
            break;
        case TIME_AGO:
            DateFormatter dateFormatter = new DateFormatter(new Date());
            streamInfoText.setInnerText(dateFormatter.timeAgo(inStreamDTO.getDateAdded(), true));
            break;
        default:
            break;
        }
View Full Code Here

        groupDescription.addStyleName(StaticResourceBundle.INSTANCE.coreCss().pendingGroupDescription());
        groupAbout.add(groupDescription);

        FlowPanel groupMetaData = new FlowPanel();
        groupMetaData.addStyleName(StaticResourceBundle.INSTANCE.coreCss().connectionItemFollowers());
        groupMetaData.add(new InlineLabel(new DateFormatter().timeAgo(group.getDateAdded(), true)));
        insertActionSeparator(groupMetaData);
        groupMetaData.add(new InlineLabel("By: "));
        String url =
                Session.getInstance().generateUrl(
                        new CreateUrlRequest(Page.PEOPLE, group.getPersonCreatedByAccountId()));
View Full Code Here

        // timestamp and actions
        Panel timestampActions = new FlowPanel();
        timestampActions.addStyleName(StaticResourceBundle.INSTANCE.coreCss().commentTimestamp());
        body.add(timestampActions);

        DateFormatter dateFormatter = new DateFormatter(new Date());
        Label dateLink = new InlineLabel(dateFormatter.timeAgo(comment.getTimeSent()));
        dateLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().commentTimestamp());
        timestampActions.add(dateLink);

        Panel actionsPanel = new FlowPanel();
        timestampActions.add(actionsPanel);
View Full Code Here

            Label lockIcon = new Label("");
            lockIcon.addStyleName(StaticResourceBundle.INSTANCE.coreCss().privateIcon());
            timestampActions.add(lockIcon);
        }

        String date = new DateFormatter(new Date()).timeAgo(msg.getPostedTime());
        Widget dateLink;
        if (createPermalink)
        {
            String permalinkUrl = activityLinkBuilder.buildActivityPermalink(msg.getId(), msg.getDestinationStream()
                    .getType(), msg.getDestinationStream().getUniqueIdentifier());
View Full Code Here

            PagedSet<ActivityDTO> activities = (PagedSet<ActivityDTO>) serviceActionController.execute(
                    ac, action);

            responseJson.put("query", queryJson.getJSONObject("query"));

            DateFormatter dateFormatter = new DateFormatter(new Date());
            JSONArray jsonActivities = new JSONArray();
            for (ActivityDTO activity : activities.getPagedSet())
            {
                AvatarUrlGenerator actorUrlGen = new AvatarUrlGenerator(EntityType.PERSON);

                JSONObject jsonActivity = new JSONObject();
                jsonActivity.put("commentCount", activity.getCommentCount());
                jsonActivity.put("likeCount", activity.getLikeCount());
                jsonActivity.put("destinationDisplayName", activity.getDestinationStream().getDisplayName());
                jsonActivity.put("destinationUniqueIdentifier", activity.getDestinationStream().getUniqueIdentifier());
                jsonActivity.put("destinationType", activity.getDestinationStream().getType());
                jsonActivity.put("actorAvatarPath", actorUrlGen.getSmallAvatarUrl(activity.getActor().getAvatarId()));
                jsonActivity.put("actorDisplayName", activity.getActor().getDisplayName());
                jsonActivity.put("actorUniqueIdentifier", activity.getActor().getUniqueIdentifier());
                jsonActivity.put("actorType", activity.getActor().getType());
                jsonActivity.put("verb", activity.getVerb());
                jsonActivity.put("postedTimeAgo", dateFormatter.timeAgo(activity.getPostedTime()));
                jsonActivity.put("baseObjectType", activity.getBaseObjectType().toString());
                jsonActivity.put("activityId", activity.getId());
                jsonActivity.put("originalActorAvatarPath",
                        actorUrlGen.getSmallAvatarUrl(activity.getOriginalActor().getAvatarId()));
                jsonActivity.put("originalActorActivityId", activity.getOriginalActor().getAvatarId());
View Full Code Here

            lockIcon.addStyleName(StaticResourceBundle.INSTANCE.coreCss().privateIcon());
            timestampActions.add(lockIcon);
        }

        // create timestamp as permalink
        String date = new DateFormatter(new Date()).timeAgo(msg.getPostedTime());
        Widget dateLink;
        String permalinkUrl = activityLinkBuilder.buildActivityPermalink(msg.getId(), destinationStream.getType(),
                destinationStream.getUniqueIdentifier());
        dateLink = new InlineHyperlink(date, permalinkUrl);
        dateLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().messageTimestampLink());
View Full Code Here

            {
                feedSub.getFeed().setTimeAgo(null);
            }
            else
            {
                DateFormatter dateFormatter = new DateFormatter(new Date());
                feedSub.getFeed().setTimeAgo(
                        dateFormatter.timeAgo(new Date(feedSub.getFeed().getLastUpdated() * MSINMIN)));
            }
        }

        return new PluginAndFeedSubscriptionsResponse(plugins, feedSubs);
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.formatting.DateFormatter

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.