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 class
UploadTextComponentValidator.UploadAreaValidator
Validator for the changeset area(package private) static class
UploadTextComponentValidator.UploadCommentValidator
Validator for the changesetcomment
tag(package private) static class
UploadTextComponentValidator.UploadSourceValidator
Validator for the changesetsource
tag
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JLabel
feedback
protected boolean
uploadRejected
-
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 void
feedbackValid(java.lang.String msg)
protected void
feedbackWarning(java.lang.String msg)
boolean
isUploadRejected()
Determines if the input validator considers the violation bad enough to reject upload.boolean
isValid()
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:
feedbackValid
in classAbstractTextComponentValidator
-
feedbackWarning
protected void feedbackWarning(java.lang.String msg)
- Overrides:
feedbackWarning
in classAbstractTextComponentValidator
-
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
-
isUploadRejected
public final boolean isUploadRejected()
Determines if the input validator considers the violation bad enough to reject upload.- Returns:
true
if the input validator considers the violation bad enough to reject upload- Since:
- 17238
-
-