civquest.swing.quadmap
Class Buffer
java.lang.Object
civquest.swing.quadmap.Buffer
- public class Buffer
- extends java.lang.Object
Constructor Summary |
Buffer(int x,
int y,
int width,
int heigth,
Properties properties)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Buffer
public Buffer(int x,
int y,
int width,
int heigth,
Properties properties)
getPosition
public Coordinate getPosition()
getSize
public Coordinate getSize()
getWidth
public int getWidth()
getHeight
public int getHeight()
storeAlways
public boolean storeAlways()
isImageCalculated
public boolean isImageCalculated()
getImage
public java.awt.image.BufferedImage getImage()
getGraphics
public java.awt.Graphics2D getGraphics()
setImage
public void setImage(java.awt.image.BufferedImage image)
deleteImage
public void deleteImage()
getStorePoints
public int getStorePoints()
repainted
public void repainted()
mustBeRepainted
public boolean mustBeRepainted()
getFieldRect
public Rectangle getFieldRect()
getBufferIntersectingCoord
public Coordinate getBufferIntersectingCoord(Coordinate coord)
- Returns MapData.getAreaCoord.
If this method returns null for a field, markFieldForUpdate may not
be called for that field!!!
- Parameters:
coord
- any field-Coordinate
- Returns:
- see MapData.getAreaCoord
getMarkedFields
public boolean[][] getMarkedFields()
markFieldForUpdate
public void markFieldForUpdate(Coordinate coord)
- Marks the field with the given Coordinate for update within this buffer.
NOTE that the field MUST INTERSECT this buffer!
- Parameters:
coord
- Coordinate of a Field intersecting this buffer
updateImage
public boolean updateImage()