Class SourceBounds
- java.lang.Object
-
- org.openstreetmap.josm.data.Bounds
-
- org.openstreetmap.josm.data.sources.SourceBounds
-
- All Implemented Interfaces:
IBounds
- Direct Known Subclasses:
ImageryInfo.ImageryBounds
public class SourceBounds extends Bounds
Multi-polygon bounds for source backgrounds. Used to display source coverage in preferences and to determine relevant source entries based on edit location.- Since:
- 16545 (extracted from
ImageryInfo.ImageryBounds
)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.Bounds
Bounds.ParseMethod
-
-
Constructor Summary
Constructors Constructor Description SourceBounds(java.lang.String asString, java.lang.String separator)
Constructs a newSourceBounds
from string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addShape(Shape shape)
Adds a new shape to this bounds.boolean
equals(java.lang.Object o)
java.util.List<Shape>
getShapes()
Returns the list of shapes defining this bounds.int
hashCode()
void
setShapes(java.util.List<Shape> shapes)
Sets the list of shapes defining this bounds.-
Methods inherited from class org.openstreetmap.josm.data.Bounds
asRect, contains, contains, crosses180thMeridian, encodeAsString, extend, extend, extend, getArea, getCenter, getHeight, getMax, getMaxLat, getMaxLon, getMin, getMinLat, getMinLon, getWidth, initLat, initLon, intersects, intersects, isCollapsed, isOutOfTheWorld, normalize, toBBox, toShortString, toString
-
-
-
-
Constructor Detail
-
SourceBounds
public SourceBounds(java.lang.String asString, java.lang.String separator)
Constructs a newSourceBounds
from string.- Parameters:
asString
- The string containing the list of shapes defining this boundsseparator
- The shape separator in the given string, usually a comma
-
-
Method Detail
-
addShape
public final void addShape(Shape shape)
Adds a new shape to this bounds.- Parameters:
shape
- The shape to add
-
setShapes
public final void setShapes(java.util.List<Shape> shapes)
Sets the list of shapes defining this bounds.- Parameters:
shapes
- The list of shapes defining this bounds.
-
getShapes
public final java.util.List<Shape> getShapes()
Returns the list of shapes defining this bounds.- Returns:
- The list of shapes defining this bounds
-
-