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:
java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.beans.PropertyChangeListener
,java.util.EventListener
,javax.swing.event.DocumentListener
public class UidInputFieldValidator extends AbstractTextComponentValidator
Validator for user ids entered in aJTextComponent
.- 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
Constructors Constructor Description UidInputFieldValidator(javax.swing.text.JTextComponent tc)
Constructs a newTimeValidator
for the given text component.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UidInputFieldValidator
decorate(javax.swing.text.JTextComponent tc)
Decorates the given text component.int
getUid()
Returns the user identifier.boolean
isValid()
Replies true if the current content of the decorated text component is valid; false otherwisevoid
validate()
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, removeUpdate
-
Methods inherited from class org.openstreetmap.josm.gui.util.ChangeNotifier
addChangeListener, fireStateChanged, removeChangeListener
-
-
-
-
Constructor Detail
-
UidInputFieldValidator
public UidInputFieldValidator(javax.swing.text.JTextComponent tc)
Constructs a newTimeValidator
for the given text component.- Parameters:
tc
- text component
-
-
Method Detail
-
decorate
public static UidInputFieldValidator decorate(javax.swing.text.JTextComponent tc)
Decorates the given text component.- Parameters:
tc
- text component to decorate- Returns:
- new uid validator attached to
tc
-
isValid
public boolean isValid()
Description copied from class:AbstractTextComponentValidator
Replies true if the current content of the decorated text component is valid; false otherwise- Specified by:
isValid
in classAbstractTextComponentValidator
- Returns:
- true if the current content of the decorated text component is valid
-
validate
public void validate()
Description copied from class:AbstractTextComponentValidator
Implement in subclasses to validate the content of the text component.- Specified by:
validate
in classAbstractTextComponentValidator
-
getUid
public int getUid()
Returns the user identifier.- Returns:
- the user identifier
-
-