public interface MapRenderer
Modifier and Type | Method and Description |
---|---|
void |
addMouseListener(java.awt.event.MouseListener l) |
void |
addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
Adds a
MouseMotionListener to be notified about mouse events. |
void |
forceRepaint()
Repaint the view because some view parameters may have changed.
|
java.awt.image.BufferedImage |
getFullImage()
Returns an image of the entire map view.
|
java.awt.Rectangle |
getSquareBounds(java.awt.Point p)
Returns coordinates, length and width of map square.
|
boolean |
getSquareLocationAt(java.awt.Point point,
java.awt.Point retPoint)
Returns the map location at the given point.
|
void |
printFullImage(java.io.File file)
Saves an image of the entire view to a file.
|
void |
removeMouseListener(java.awt.event.MouseListener l) |
void |
removeMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
Removes a
MouseMotionListener to be notified about mouse events. |
void |
scrollRectToVisible(java.awt.Rectangle aRect)
Ensures that a rectangular area is visible.
|
void |
setLightVisible(boolean lightVisible)
If set, inverts the setting of
MapViewSettings.isLightVisible() . |
@NotNull java.awt.image.BufferedImage getFullImage()
boolean getSquareLocationAt(@NotNull java.awt.Point point, @NotNull java.awt.Point retPoint)
point
- the coordinates in the renderer viewretPoint
- this point will be returnedvoid forceRepaint()
void printFullImage(@NotNull java.io.File file) throws java.io.IOException
file
- file to write image file tojava.io.IOException
- in case of I/O problemsvoid addMouseMotionListener(@NotNull java.awt.event.MouseMotionListener mouseMotionListener)
MouseMotionListener
to be notified about mouse events.mouseMotionListener
- the listener to addvoid removeMouseMotionListener(@NotNull java.awt.event.MouseMotionListener mouseMotionListener)
MouseMotionListener
to be notified about mouse events.mouseMotionListener
- the listener to removevoid addMouseListener(@NotNull java.awt.event.MouseListener l)
void removeMouseListener(@NotNull java.awt.event.MouseListener l)
@NotNull java.awt.Rectangle getSquareBounds(@NotNull java.awt.Point p)
p
- the map coordinatesvoid scrollRectToVisible(@NotNull java.awt.Rectangle aRect)
aRect
- the areavoid setLightVisible(boolean lightVisible)
MapViewSettings.isLightVisible()
.lightVisible
- whether lighted map squares are inverted