Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.User


                    return DateUtils.formatDateTime(p3.getTimestamp(), DateFormat.SHORT, DateFormat.SHORT);
                return null;
            case 4:
                HistoryOsmPrimitive p4 = getPrimitive(row);
                if (p4 != null) {
                    User user = p4.getUser();
                    if (user != null)
                        return user.getName();
                }
                return null;
            }
            return null;
        }
View Full Code Here


            String url = createInfoUrl(primitive);
            OpenBrowser.displayUrl(url);
        }

        public void prepare(HistoryOsmPrimitive primitive) {
            final User user = primitive.getUser();
            putValue(NAME, "<html>" + tr("Show user {0}", user == null ? "?" :
                    XmlWriter.encode(user.getName(), true) + " <font color=gray>(" + user.getId() + ")</font>") + "</html>");
            this.primitive = primitive;
        }
View Full Code Here

        }
        setToolTipText("");
    }

    protected void renderUser(Changeset cs) {
        User user = cs.getUser();
        if (user == null || user.getName().trim().isEmpty()) {
            setFont(UIManager.getFont("Table.font").deriveFont(Font.ITALIC));
            setText(tr("anonymous"));
        } else {
            setFont(UIManager.getFont("Table.font"));
            setText(user.getName());
            setToolTipText(user.getName());
        }
    }
View Full Code Here

            }
        }

        @Override
        protected String createInfoUrl(Object infoObject) {
            User user = (User)infoObject;
            try {
                return getBaseUserUrl() + "/" + URLEncoder.encode(user.getName(), "UTF-8").replaceAll("\\+", "%20");
            } catch(UnsupportedEncodingException e) {
                Main.error(e);
                JOptionPane.showMessageDialog(
                        Main.parent,
                        tr("<html>Failed to create an URL because the encoding ''{0}''<br>"
View Full Code Here

        HistoryOsmPrimitive primitive = getPrimitive();
        Changeset cs = primitive.getChangeset();

        if (!model.isLatest(primitive)) {
            User user = primitive.getUser();
            String url = AbstractInfoAction.getBaseBrowseUrl() + "/changeset/" + primitive.getChangesetId();
            lblChangeset.setUrl(url);
            lblChangeset.setDescription(Long.toString(primitive.getChangesetId()));

            String username = "";
            if (user != null) {
                username = user.getName();
            }
            lblUser.setDescription(username);
            try {
                if (user != null && user != User.getAnonymous()) {
                    lblUser.setUrl(getUserUrl(username));
View Full Code Here

        long changesetId = getMandatoryAttributeLong(atts,"changeset");
        boolean visible= getMandatoryAttributeBoolean(atts, "visible");

        Long uid = getAttributeLong(atts, "uid");
        String userStr = atts.getValue("user");
        User user;
        if (userStr != null) {
            if (uid != null) {
                user = User.createOsmUser(uid, userStr);
            } else {
                user = User.createLocalUser(userStr);
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.User

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.