|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapPane
Defines the core map pane methods.
Method Summary | |
---|---|
void |
addMapPaneListener(MapPaneListener listener)
Adds a listener to receive MapPaneEvent s. |
void |
addMouseListener(MapMouseListener listener)
Registers an object that wishes to receive MapMouseEvent s
such as a StatusBar. |
CursorTool |
getCursorTool()
Gets the current cursor tool. |
ReferencedEnvelope |
getDisplayArea()
Gets the current display area in world coordinates. |
MapContent |
getMapContent()
Gets the MapConent instance containing the layers
being displayed by this map pane. |
MapMouseEventDispatcher |
getMouseEventDispatcher()
Gets the current mouse event dispatcher which is responsible for converting each input Java AWT mouse event into a MapMouseEvent and forwarding it to each MapMouseListener. |
AffineTransform |
getScreenToWorldTransform()
Gets the screen to world coordinate transform. |
AffineTransform |
getWorldToScreenTransform()
Gets the world to screen coordinate transform. |
void |
moveImage(int dx,
int dy)
Moves the image(s) displayed by the map pane from the current origin (x,y) (device pixels) to (x+dx, y+dy). |
void |
removeMapPaneListener(MapPaneListener listener)
Removes the specified listener. |
void |
removeMouseListener(MapMouseListener listener)
Removes the specified listener. |
void |
reset()
Reset the map area to include the full extent of all layers and redraw the display |
void |
setCursorTool(CursorTool tool)
Sets the current cursor tool. |
void |
setDisplayArea(Envelope envelope)
Sets the area to display in world units. |
void |
setMapContent(MapContent content)
Sets the MapContent instance containing the layers
to display. |
void |
setMouseEventDispatcher(MapMouseEventDispatcher dispatcher)
Replaces the current mouse event dispatcher. |
Method Detail |
---|
MapContent getMapContent()
MapConent
instance containing the layers
being displayed by this map pane.
void setMapContent(MapContent content)
MapContent
instance containing the layers
to display.
content
- the map contentMapMouseEventDispatcher getMouseEventDispatcher()
null
)void setMouseEventDispatcher(MapMouseEventDispatcher dispatcher)
dispatcher
- the new dispatcher (may be null
)ReferencedEnvelope getDisplayArea()
mapPane.getMapContent().getViewport().getBounds()
.
If a MapContent object has not yet been associated with the map pane, an
empty ReferencedEnvelope
is returned.
void setDisplayArea(Envelope envelope)
the
- new display area
IllegalArgumentException
- if envelope
is {@code null]void reset()
AffineTransform getScreenToWorldTransform()
mapPane.getMapContent().getViewport().getScreenToWorld()
.
AffineTransform getWorldToScreenTransform()
mapPane.getMapContent().getViewport().getWorldToScreen()
.
The returned AffineTransform
can be used to determine the
current drawing scale...
double scale = mapPane.getWorldToScreenTransform().getScaleX();
void addMapPaneListener(MapPaneListener listener)
MapPaneEvent
s.
listener
- the listener to add
IllegalArgumentException
- if listener
is null
void removeMapPaneListener(MapPaneListener listener)
listener
- the listener to removevoid addMouseListener(MapMouseListener listener)
MapMouseEvent
s
such as a StatusBar.
listener
- the listener to add
IllegalArgumentException
- if listener is nullMapMouseListener
void removeMouseListener(MapMouseListener listener)
listener
- the listener to removeCursorTool getCursorTool()
null
)void setCursorTool(CursorTool tool)
tool
- the tool; or null
for no cursor toolvoid moveImage(int dx, int dy)
dx
- the x offset in pixelsdy
- the y offset in pixels.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |