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

Last change on this file since 12579 was 12391, checked in by michael2402, 7 years ago

See #14794: Documentation for the gui package

  • Property svn:eol-style set to native
File size: 1.6 KB
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
8/**
9 * Hooks that allow correcting the name of a OSM primitive
10 * @see DefaultNameFormatter
11 */
12public interface NameFormatterHook {
13
14 /**
15 * Check the relation type name. Return the corrected type name if needed, null otherwise.
16 * @param relation The relation.
17 * @param defaultName The default name generated by core.
18 * @return The corrected type name if needed, null otherwise.
19 */
20 String checkRelationTypeName(IRelation relation, String defaultName);
21
22 /**
23 * Check the node format. Return the corrected format if needed, null otherwise.
24 * @param node The node.
25 * @param defaultName The default name generated by core.
26 * @return The corrected format if needed, null otherwise.
27 */
28 String checkFormat(INode node, String defaultName);
29
30 /**
31 * Check the way format. Return the corrected format if needed, null otherwise.
32 * @param way The way.
33 * @param defaultName The default name generated by core.
34 * @return The corrected format if needed, null otherwise.
35 */
36 String checkFormat(IWay way, String defaultName);
37
38 /**
39 * Check the relation format. Return the corrected format if needed, null otherwise.
40 * @param relation The relation.
41 * @param defaultName The default name generated by core.
42 * @return The corrected format if needed, null otherwise.
43 */
44 String checkFormat(IRelation relation, String defaultName);
45}
Note: See TracBrowser for help on using the repository browser.