public interface MapRenderer
| Modifier and Type | Method and Description |
|---|---|
void |
addMouseListener(@NotNull java.awt.event.MouseListener l) |
void |
addMouseMotionListener(@NotNull 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.
|
@NotNull java.awt.image.BufferedImage |
getFullImage()
Returns an image of the entire map view.
|
@NotNull Size2D |
getImageSize()
Returns the size of an image of the entire map view in pixels.
|
@NotNull java.awt.Rectangle |
getSquareBounds(@NotNull java.awt.Point p)
Returns coordinates, length and width of map square.
|
boolean |
getSquareLocationAt(@NotNull java.awt.Point point,
@NotNull java.awt.Point retPoint)
Returns the map location at the given point.
|
void |
printFullImage(@NotNull java.io.File file)
Saves an image of the entire view to a file.
|
void |
removeMouseListener(@NotNull java.awt.event.MouseListener l) |
void |
removeMouseMotionListener(@NotNull java.awt.event.MouseMotionListener mouseMotionListener)
Removes a
MouseMotionListener to be notified about mouse events. |
void |
scrollRectToVisible(@NotNull java.awt.Rectangle aRect)
Ensures that a rectangular area is visible.
|
void |
setLightVisible(boolean lightVisible)
If set, inverts the setting of
MapViewSettings.isLightVisible(). |
@NotNull @NotNull Size2D getImageSize()
@NotNull @NotNull java.awt.image.BufferedImage getFullImage()
boolean getSquareLocationAt(@NotNull
@NotNull java.awt.Point point,
@NotNull
@NotNull java.awt.Point retPoint)
point - the coordinates in the renderer viewretPoint - this point will be returnedvoid forceRepaint()
void printFullImage(@NotNull
@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
@NotNull java.awt.event.MouseMotionListener mouseMotionListener)
MouseMotionListener to be notified about mouse events.mouseMotionListener - the listener to addvoid removeMouseMotionListener(@NotNull
@NotNull java.awt.event.MouseMotionListener mouseMotionListener)
MouseMotionListener to be notified about mouse events.mouseMotionListener - the listener to removevoid addMouseListener(@NotNull
@NotNull java.awt.event.MouseListener l)
void removeMouseListener(@NotNull
@NotNull java.awt.event.MouseListener l)
@NotNull
@NotNull java.awt.Rectangle getSquareBounds(@NotNull
@NotNull java.awt.Point p)
p - the map coordinatesvoid scrollRectToVisible(@NotNull
@NotNull java.awt.Rectangle aRect)
aRect - the areavoid setLightVisible(boolean lightVisible)
MapViewSettings.isLightVisible().lightVisible - whether lighted map squares are inverted