public class ErrorStripePainter extends RegionPainter.Image
Modifier and Type | Class and Description |
---|---|
static class |
ErrorStripePainter.Alignment |
RegionPainter.Alpha, RegionPainter.Image
Constructor and Description |
---|
ErrorStripePainter(boolean single) |
Modifier and Type | Method and Description |
---|---|
void |
addErrorStripe(int index,
ErrorStripe stripe) |
void |
clear() |
void |
clear(int index) |
protected java.awt.image.BufferedImage |
createImage(int width,
int height)
This method is called if the cached image is invalidated or it's size is changed.
|
int |
findIndex(int x,
int y) |
boolean |
isModified() |
void |
paint(java.awt.Graphics2D g,
int x,
int y,
int width,
int height,
java.lang.Object object)
Renders to the given
Graphics2D object. |
void |
setErrorStripeCount(int count) |
void |
setErrorStripeGap(int gap) |
void |
setMaximalThickness(int thickness) |
void |
setMinimalThickness(int thickness) |
protected void |
updateImage(java.awt.image.BufferedImage image)
This method is called for the cached image before
drawImage . |
invalidate
public void setMaximalThickness(int thickness)
public void setMinimalThickness(int thickness)
public void setErrorStripeGap(int gap)
public int findIndex(int x, int y)
public void setErrorStripeCount(int count)
public boolean isModified()
public void clear()
public void clear(int index)
public void addErrorStripe(int index, ErrorStripe stripe)
protected void updateImage(java.awt.image.BufferedImage image)
RegionPainter.Image
drawImage
.
It should be overridden if the image must be updated without creating a new image.updateImage
in class RegionPainter.Image
image
- the cached image to updateprotected java.awt.image.BufferedImage createImage(int width, int height)
RegionPainter.Image
createImage
in class RegionPainter.Image
width
- width of the new imageheight
- height of the new imageBufferedImage
objectpublic void paint(java.awt.Graphics2D g, int x, int y, int width, int height, java.lang.Object object)
RegionPainter
Graphics2D
object.paint
in interface RegionPainter<java.lang.Object>
paint
in class RegionPainter.Image
g
- the Graphics2D
object to render tox
- X position of the area to painty
- Y position of the area to paintwidth
- width of the area to paintheight
- height of the area to paintobject
- an optional configuration parameter