Class AddTagsDialog

    • Constructor Detail

      • AddTagsDialog

        public AddTagsDialog​(String[][] tags,
                             String senderName,
                             Collection<? extends OsmPrimitive> primitives)
        Constructs a new AddTagsDialog.
        Parameters:
        tags - tags to add
        senderName - String for skipping confirmations. Use empty string for always confirmed adding.
        primitives - OSM objects that will be modified
    • Method Detail

      • buttonAction

        protected void buttonAction​(int buttonIndex,
                                    ActionEvent evt)
        If you click the "Add tags" button build a ChangePropertyCommand for every key that has a checked checkbox to apply the key value pair to all selected osm objects. You get a entry for every key in the command queue.
        Overrides:
        buttonAction in class ExtendedDialog
        Parameters:
        buttonIndex - the button index (first index is 0)
        evt - the button event
      • addTags

        public static void addTags​(Map<String,​String> args,
                                   String sender,
                                   Collection<? extends OsmPrimitive> primitives)
        parse addtags parameters Example URL (part): addtags=wikipedia:de%3DResidenzschloss Dresden|name:en%3DDresden Castle
        Parameters:
        args - request arguments (URL encoding already removed)
        sender - is a string for skipping confirmations. Use empty string for always confirmed adding.
        primitives - OSM objects that will be modified
      • parseUrlTagsToKeyValues

        public static Map<String,​StringparseUrlTagsToKeyValues​(String urlSection)
        Convert a argument from a url to a series of tags
        Parameters:
        urlSection - A url section that looks like tag1=value1|tag2=value2
        Returns:
        An 2d array in the format of [key][value]
        Since:
        15316
      • addTags

        public static void addTags​(String[][] keyValue,
                                   String sender,
                                   Collection<? extends OsmPrimitive> primitives)
        Ask user and add the tags he confirm.
        Parameters:
        keyValue - is a table or {{tag1,val1},{tag2,val2},...}
        sender - is a string for skipping confirmations. Use empty string for always confirmed adding.
        primitives - OSM objects that will be modified
        Since:
        7521