Package org.openstreetmap.josm.data.osm

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


                    case RELATION:
                        newId = newRelationIds.get(member.getMemberId());
                        break;
                    }
                    if (newId != null) {
                        newMembers.add(new RelationMemberData(member.getRole(), memberType, newId));
                    }
                }
                ((RelationData)data).setMembers(newMembers);
            }
        }
View Full Code Here


        }

        List<RelationMemberData> newMembers = new ArrayList<>();
        for (RelationMember member: r.getMembers()) {
            newMembers.add(
                    new RelationMemberData(member.getRole(), mappedPrimitives.get(member.getMember())));

        }
        clone.setMembers(newMembers);
    }
View Full Code Here

        public void visit(Relation r) {
            clone = new HistoryRelation(r.getId(), r.getVersion(), r.isVisible(), getCurrentUser(), 0, null, false);
            clone.setTags(r.getKeys());
            HistoryRelation hr = (HistoryRelation)clone;
            for (RelationMember rm : r.getMembers()) {
                hr.addMember(new RelationMemberData(rm.getRole(), rm.getType(), rm.getUniqueId()));
            }
        }
View Full Code Here

    }

    protected void renderRole(Item diffItem, int row, boolean isSelected) {
        String text = "";
        Color bgColor = diffItem.state.getColor();
        RelationMemberData member = (RelationMemberData) diffItem.value;
        text = member == null?"":member.getRole();
        setText(text);
        setToolTipText(text);
        setBackground(bgColor);
    }
View Full Code Here

    }

    protected void renderPrimitive(Item diffItem, int row, boolean isSelected) {
        String text = "";
        Color bgColor = diffItem.state.getColor();
        RelationMemberData member = (RelationMemberData) diffItem.value;
        text = "";
        if (member != null) {
            switch(member.getMemberType()) {
            case NODE: text = tr("Node {0}", member.getMemberId()); break;
            case WAY: text = tr("Way {0}", member.getMemberId()); break;
            case RELATION: text = tr("Relation {0}", member.getMemberId()); break;
            }
        }
        setText(text);
        setToolTipText(text);
        setBackground(bgColor);
View Full Code Here

            type = OsmPrimitiveType.fromApiTypeName(v);
        } catch(IllegalArgumentException e) {
            throwException(tr("Illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType. Got ''{1}''.", "type", v));
        }
        String role = getMandatoryAttributeString(atts, "role");
        RelationMemberData member = new RelationMemberData(role, type,ref);
        ((HistoryRelation)currentPrimitive).addMember(member);
    }
View Full Code Here

        if (id == 0) {
            throwException(tr("Incomplete <member> specification with ref=0"));
        }
        jumpToEnd();
        return new RelationMemberData(role, type, id);
    }
View Full Code Here

TOP

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

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.