Package org.openstreetmap.josm.gui.io
Class UploadTextComponentValidator
- java.lang.Object
-
- org.openstreetmap.josm.gui.util.ChangeNotifier
-
- org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator
-
- org.openstreetmap.josm.gui.io.UploadTextComponentValidator
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.FocusListener,java.beans.PropertyChangeListener,java.util.EventListener,javax.swing.event.DocumentListener
- Direct Known Subclasses:
UploadTextComponentValidator.UploadAreaValidator,UploadTextComponentValidator.UploadCommentValidator,UploadTextComponentValidator.UploadSourceValidator
abstract class UploadTextComponentValidator extends AbstractTextComponentValidator
Input validators forUploadDialog
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classUploadTextComponentValidator.UploadAreaValidatorValidator for the changeset area(package private) static classUploadTextComponentValidator.UploadCommentValidatorValidator for the changesetcommenttag(package private) static classUploadTextComponentValidator.UploadSourceValidatorValidator for the changesetsourcetag
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JLabelfeedbackprotected booleanuploadRejected-
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 UploadTextComponentValidator(javax.swing.text.JTextComponent tc, javax.swing.JLabel feedback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfeedbackValid(java.lang.String msg)protected voidfeedbackWarning(java.lang.String msg)booleanisUploadRejected()Determines if the input validator considers the violation bad enough to reject upload.booleanisValid()Replies true if the current content of the decorated text component is valid; false otherwise-
Methods inherited from class org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator
actionPerformed, changedUpdate, feedbackDisabled, feedbackInvalid, focusGained, focusLost, getComponent, insertUpdate, propertyChange, removeUpdate, validate
-
Methods inherited from class org.openstreetmap.josm.gui.util.ChangeNotifier
addChangeListener, fireStateChanged, removeChangeListener
-
-
-
-
Field Detail
-
feedback
private final javax.swing.JLabel feedback
-
uploadRejected
protected boolean uploadRejected
-
-
Constructor Detail
-
UploadTextComponentValidator
UploadTextComponentValidator(javax.swing.text.JTextComponent tc, javax.swing.JLabel feedback)
-
-
Method Detail
-
feedbackValid
protected void feedbackValid(java.lang.String msg)
- Overrides:
feedbackValidin classAbstractTextComponentValidator
-
feedbackWarning
protected void feedbackWarning(java.lang.String msg)
- Overrides:
feedbackWarningin classAbstractTextComponentValidator
-
isValid
public boolean 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
-
isUploadRejected
public final boolean isUploadRejected()
Determines if the input validator considers the violation bad enough to reject upload.- Returns:
trueif the input validator considers the violation bad enough to reject upload- Since:
- 17238
-
-