Package org.geotools.map
Class MapBoundsEvent
- Object
- 
- EventObject
- 
- MapBoundsEvent
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class MapBoundsEvent extends EventObject Event object for MapContext area of interest and coordinate system changes.- Author:
- wolf
- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMapBoundsEvent.TypeType of map bounds event
 - 
Field SummaryFields Modifier and Type Field Description static intAREA_OF_INTEREST_MASKArea of interest changed, mask used byMapBoundsEvent.Type.BOUNDSstatic intCOORDINATE_SYSTEM_MASKCoordinate system changed, mask used byMapBoundsEvent.Type.CRS- 
Fields inherited from class EventObjectsource
 
- 
 - 
Constructor SummaryConstructors Constructor Description MapBoundsEvent(MapContent source, int type, ReferencedEnvelope oldAreaOfInterest, ReferencedEnvelope newAreaOfInterest)Creates a new instance of BoundsEventMapBoundsEvent(MapViewport source, EnumSet<MapBoundsEvent.Type> type, ReferencedEnvelope oldBounds, ReferencedEnvelope newBounds)Creates a new instance of BoundsEvent.MapBoundsEvent(MapViewport source, MapBoundsEvent.Type type, ReferencedEnvelope oldBounds, ReferencedEnvelope newBounds)Creates a new instance of BoundsEvent.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumSet<MapBoundsEvent.Type>getEventType()Set of event types raised for this event.ReferencedEnvelopegetNewAreaOfInterest()Get the new area of interestCoordinateReferenceSystemgetNewCoordinateReferenceSystem()Get the new coordinate reference system.ReferencedEnvelopegetOldAreaOfInterest()Get the old area of interestCoordinateReferenceSystemgetOldCoordinateReferenceSystem()Get the previous coordinate reference system.intgetType()Getter for property type.- 
Methods inherited from class EventObjectgetSource, toString
 
- 
 
- 
- 
- 
Field Detail- 
AREA_OF_INTEREST_MASKpublic static final int AREA_OF_INTEREST_MASK Area of interest changed, mask used byMapBoundsEvent.Type.BOUNDS- See Also:
- Constant Field Values
 
 - 
COORDINATE_SYSTEM_MASKpublic static final int COORDINATE_SYSTEM_MASK Coordinate system changed, mask used byMapBoundsEvent.Type.CRS- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
MapBoundsEventpublic MapBoundsEvent(MapContent source, int type, ReferencedEnvelope oldAreaOfInterest, ReferencedEnvelope newAreaOfInterest) Creates a new instance of BoundsEvent- Parameters:
- source- the map context reporting the change
- type- the type of change indicated by one or both of the bit masks AREA_OF_INTEREST_MASK and COORDINATE_SYSTEM_MASK
- oldAreaOfInterest- the context's previous area of interest
- newAreaOfInterest- the context's new area of interest
- Throws:
- IllegalArgumentException- if type is invalid
 
 - 
MapBoundsEventpublic MapBoundsEvent(MapViewport source, MapBoundsEvent.Type type, ReferencedEnvelope oldBounds, ReferencedEnvelope newBounds) Creates a new instance of BoundsEvent.Example: new MapBoundsEvent(map, EnumSet.of(Type.BOUNDS), null, bounds) - Parameters:
- source- map viewport reporting the change
- type- Type of event indicating- MapBoundsEvent.Type.BOUNDSor- MapBoundsEvent.Type.CRS
- oldBounds- the context's previous area of interest
- newBounds- the context's new area of interest
- Throws:
- IllegalArgumentException- if type is invalid
 
 - 
MapBoundsEventpublic MapBoundsEvent(MapViewport source, EnumSet<MapBoundsEvent.Type> type, ReferencedEnvelope oldBounds, ReferencedEnvelope newBounds) Creates a new instance of BoundsEvent.Example: new MapBoundsEvent(map, EnumSet.of(Type.BOUNDS), null, bounds) - Parameters:
- source- map viewport reporting the change
- type- EnumSet flagging one or both of the following AREA_OF_INTEREST_MASK and COORDINATE_SYSTEM_MASK
- oldBounds- the context's previous area of interest
- newBounds- the context's new area of interest
- Throws:
- IllegalArgumentException- if type is invalid
 
 
- 
 - 
Method Detail- 
getTypepublic int getType() Getter for property type. The type is a bitwise or of the masks defined above.- Returns:
- Value of property type.
 
 - 
getEventTypepublic EnumSet<MapBoundsEvent.Type> getEventType() Set of event types raised for this event.
 - 
getOldCoordinateReferenceSystempublic CoordinateReferenceSystem getOldCoordinateReferenceSystem() Get the previous coordinate reference system. This is a convenience method equivalent to getOldAreaOfInterest().getCoordinateReferenceSystem()- Returns:
- the previous CoordinateReferenceSystem object
 
 - 
getNewCoordinateReferenceSystempublic CoordinateReferenceSystem getNewCoordinateReferenceSystem() Get the new coordinate reference system. This is a convenience method equivalent to getNewAreaOfInterest().getCoordinateReferenceSystem()- Returns:
- the new CoordinateReferenceSystem object
 
 - 
getOldAreaOfInterestpublic ReferencedEnvelope getOldAreaOfInterest() Get the old area of interest
 - 
getNewAreaOfInterestpublic ReferencedEnvelope getNewAreaOfInterest() Get the new area of interest
 
- 
 
-