source: josm/trunk/src/org/openstreetmap/josm/gui/preferences/server/UserNameValidator.java@ 13652

Last change on this file since 13652 was 10073, checked in by Don-vip, 8 years ago

refactor duplicated code

  • Property svn:eol-style set to native
File size: 695 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.preferences.server;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import javax.swing.text.JTextComponent;
7
8import org.openstreetmap.josm.gui.widgets.DefaultTextComponentValidator;
9
10/**
11 * Validator for OSM username.
12 */
13public class UserNameValidator extends DefaultTextComponentValidator {
14
15 /**
16 * Constructs a new {@code UserNameValidator}.
17 * @param tc the text component used to enter username
18 */
19 public UserNameValidator(JTextComponent tc) {
20 super(tc, tr("Please enter your OSM user name"), tr("The user name cannot be empty. Please enter your OSM user name"));
21 }
22}
Note: See TracBrowser for help on using the repository browser.