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
RevLine 
[2801]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
[10073]8import org.openstreetmap.josm.gui.widgets.DefaultTextComponentValidator;
[2801]9
[6529]10/**
11 * Validator for OSM username.
12 */
[10073]13public class UserNameValidator extends DefaultTextComponentValidator {
[2801]14
[6529]15 /**
16 * Constructs a new {@code UserNameValidator}.
17 * @param tc the text component used to enter username
18 */
[2801]19 public UserNameValidator(JTextComponent tc) {
[10073]20 super(tc, tr("Please enter your OSM user name"), tr("The user name cannot be empty. Please enter your OSM user name"));
[2801]21 }
22}
Note: See TracBrowser for help on using the repository browser.