source: josm/trunk/src/org/openstreetmap/josm/gui/NameFormatterHook.java @ 5241

Revision 4209, 1.6 KB checked in by bastiK, 11 months ago (diff)

#6535 - Allow plugins to modify default name formatter (patch by Don-vip)

Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui;
3
4import org.openstreetmap.josm.data.osm.INode;
5import org.openstreetmap.josm.data.osm.IRelation;
6import org.openstreetmap.josm.data.osm.IWay;
7
8public interface NameFormatterHook {
9
10    /**
11     * Check the relation type name. Return the corrected type name if needed, null otherwise.
12     * @param relation The relation.
13     * @param defaultName The default name generated by core.
14     * @return The corrected type name if needed, null otherwise.
15     */
16    public String checkRelationTypeName(IRelation relation, String defaultName);
17   
18    /**
19     * Check the node format. Return the corrected format if needed, null otherwise.
20     * @param node The node.
21     * @param defaultName The default name generated by core.
22     * @return The corrected format if needed, null otherwise.
23     */
24    public String checkFormat(INode node, String defaultName);
25   
26    /**
27     * Check the way format. Return the corrected format if needed, null otherwise.
28     * @param way The way.
29     * @param defaultName The default name generated by core.
30     * @return The corrected format if needed, null otherwise.
31     */
32    public String checkFormat(IWay node, String defaultName);
33
34    /**
35     * Check the relation format. Return the corrected format if needed, null otherwise.
36     * @param relation The relation.
37     * @param defaultName The default name generated by core.
38     * @return The corrected format if needed, null otherwise.
39     */
40    public String checkFormat(IRelation node, String defaultName);
41}
Note: See TracBrowser for help on using the repository browser.