Package org.openstreetmap.josm.gui.bbox
Class TileSelectionBBoxChooser.TileCoordinateValidator
- java.lang.Object
-
- org.openstreetmap.josm.gui.util.ChangeNotifier
-
- org.openstreetmap.josm.gui.widgets.AbstractTextComponentValidator
-
- org.openstreetmap.josm.gui.bbox.TileSelectionBBoxChooser.TileCoordinateValidator
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.beans.PropertyChangeListener
,java.util.EventListener
,javax.swing.event.DocumentListener
- Enclosing class:
- TileSelectionBBoxChooser
private static class TileSelectionBBoxChooser.TileCoordinateValidator extends AbstractTextComponentValidator
Validates the x- or y-coordinate of a tile at a given zoom level.
-
-
Field Summary
Fields Modifier and Type Field Description private int
tileIndex
private int
zoomLevel
-
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 TileCoordinateValidator(javax.swing.text.JTextComponent tc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getTileIndex()
boolean
isValid()
Replies true if the current content of the decorated text component is valid; false otherwisevoid
setZoomLevel(int zoomLevel)
void
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
-
TileCoordinateValidator
TileCoordinateValidator(javax.swing.text.JTextComponent tc)
-
-
Method Detail
-
setZoomLevel
public void setZoomLevel(int zoomLevel)
-
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
-
getTileIndex
public int getTileIndex()
-
-