Class UidInputFieldValidator
java.lang.Object
org.openstreetmap.josm.gui.util.ChangeNotifier
org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator
org.openstreetmap.josm.gui.dialogs.changeset.query.UidInputFieldValidator
- All Implemented Interfaces:
ActionListener,FocusListener,PropertyChangeListener,EventListener,DocumentListener
Validator for user ids entered in a
JTextComponent.- Since:
- 11326 (extracted from AdvancedChangesetQueryPanel)
-
Field Summary
Fields inherited from class org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator
ERROR_BACKGROUND, ERROR_BORDER, ERROR_COLOR, VALID_BORDER, VALID_COLOR, WARNING_BACKGROUND, WARNING_BORDER, WARNING_COLOR, WARNING_FOREGROUND -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newTimeValidatorfor the given text component. -
Method Summary
Modifier and TypeMethodDescriptionstatic UidInputFieldValidatorDecorates the given text component.intgetUid()Returns the user identifier.booleanisValid()Replies true if the current content of the decorated text component is valid; false otherwisevoidvalidate()Implement in subclasses to validate the content of the text component.Methods inherited from class org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator
actionPerformed, changedUpdate, feedbackDisabled, feedbackInvalid, feedbackValid, feedbackWarning, focusGained, focusLost, getComponent, insertUpdate, propertyChange, removeUpdateMethods inherited from class org.openstreetmap.josm.gui.util.ChangeNotifier
addChangeListener, fireStateChanged, removeChangeListener
-
Constructor Details
-
UidInputFieldValidator
Constructs a newTimeValidatorfor the given text component.- Parameters:
tc- text component
-
-
Method Details
-
decorate
Decorates the given text component.- Parameters:
tc- text component to decorate- Returns:
- new uid validator attached to
tc
-
isValid
Description copied from class:AbstractTextComponentValidatorReplies true if the current content of the decorated text component is valid; false otherwise- Specified by:
isValidin classAbstractTextComponentValidator- Returns:
- true if the current content of the decorated text component is valid
-
validate
Description copied from class:AbstractTextComponentValidatorImplement in subclasses to validate the content of the text component.- Specified by:
validatein classAbstractTextComponentValidator
-
getUid
Returns the user identifier.- Returns:
- the user identifier
-