Returns the bounding box of the Viewport in world coordinates.
Note: Since Envelope is not a UDIG element changes to the bounds envelope object will not
raise events. Therefore the bounds should only be modified via the ViewportModel interface
the bounding box of the Viewport in world coordinates.
Returns the local coordinate system. The local coordinate system is the CRS that all the
layer data will be transformed into. Once the layer data is transformed into the local CRS
then it is transformed for display onto the screen
the local coordinate system
Return true if it has been initialized with a display. If no display is active then the
viewportmodel is not initialized.
true if it has been initialized with a display
Pans the viewport in terms of pixels on the screen. Each pixel represents a distance in world
coordinates, the x and y distances differ, so a pan of 8 pixels in the x direction will be
translated to a pan of 8*xdistance in the world.
Parameters: xpixels - The amount to pan in the x direction Parameters: ypixels - The amount to pan in the y direction this ViewportModel
Pans the viewport in terms of world units.
Parameters: x - The amount to pan in the x direction Parameters: y - The amount to pan in the y direction this ViewportModel
pixelToWorld
public Coordinate pixelToWorld(int x, int y)(Code)
Converts a coordinate expressed on the device space back to real world coordinates
Parameters: x - horizontal coordinate on device space Parameters: y - vertical coordinate on device space The correspondent real world coordinate
Sets the viewport's bounding box. The bounding box will be fit to the window based on the MapDisplay so
the bounds provided here may not be the final bounds.
Parameters: minx - the minimum x value of the new bounding box. Parameters: maxx - the maximum x value of the new bounding box. Parameters: miny - the minimum y value of the new bounding box. Parameters: maxy - the maximum x value of the new bounding box. throws: IllegalArgumentException - If the above criteria are not met this exception is thrown.
Returns the pixel on the screen for a given coordinate in world space.
Parameters: coord - A coordinate in world space. The pixel on the screen that the world coordinate is drawn on.
Gets up the affine transform that will transform from the world to screen. A convenience
method.
a transform that maps from real world coordinates to the screen
Increases or decreases the size of the viewport(in world space) by a constant factor, zoom.
The zoom is equal in both directions. The function used is: bbox.height=bbox.height/divisor
bbox.width=bbox.width/divisor
A zoom must be greater than 1.
A zoom greater than 1 is a zoom towards the map(Feature appear larger.)
A zoom less than 1 is a zoom away from the map
Parameters: zoom - the zoom factor This ViewportModel, allows for command chaining.