Package jmri.swing

Class SystemNameValidator

java.lang.Object
javax.swing.InputVerifier
com.alexandriasoftware.swing.JInputValidator
jmri.swing.SystemNameValidator

public class SystemNameValidator
extends com.alexandriasoftware.swing.JInputValidator
A JInputValidator that validates a NamedBean system name.

Until the component gets focus, no validation icon is shown. Once the component has focus the following icons are shown:

  • If the component is blank and required was false when the validator was created, no validation is shown.
  • If the component is blank and required was true when the validator was created, a warning icon is shown.
  • If the component has an invalid system name, an error icon is shown.
  • If the component has a potentially valid system name, a waring icon is shown.
  • If the component has a valid system name, a success icon is shown.