|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fife.ui.rtextarea.ImageBackgroundPainterStrategy
org.fife.ui.rtextarea.VolatileImageBackgroundPainterStrategy
public class VolatileImageBackgroundPainterStrategy
A strategy for painting the background of an RTextAreaBase
as an image. The image is always stretched to completely fill the
RTextAreaBase
.
A java.awt.image.VolatileImage
is used for rendering;
theoretically, this should be the best image format for performance.
You can set the scaling hint used when stretching/skewing the image
to fit in the RTextAreaBase
's background via the
setScalingHint
method, but keep in mind the more
accurate the scaling hint, the less responsive your application will
be when stretching the window (as that's the only time the image's
size is recalculated).
ImageBackgroundPainterStrategy
,
BufferedImageBackgroundPainterStrategy
Field Summary |
---|
Fields inherited from class org.fife.ui.rtextarea.ImageBackgroundPainterStrategy |
---|
tracker |
Constructor Summary | |
---|---|
VolatileImageBackgroundPainterStrategy(org.fife.ui.rtextarea.RTextAreaBase ta)
Constructor. |
Method Summary | |
---|---|
protected void |
paintImage(Graphics g,
int x,
int y)
Paints the image at the specified location. |
protected void |
renderImage(int width,
int height,
int hint)
Renders the image at the proper size into bgImage . |
protected void |
rescaleImage(int width,
int height,
int hint)
Rescales the displayed image to be the specified size. |
Methods inherited from class org.fife.ui.rtextarea.ImageBackgroundPainterStrategy |
---|
getMasterImage, getRTextAreaBase, getScalingHint, paint, setImage, setImage, setScalingHint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VolatileImageBackgroundPainterStrategy(org.fife.ui.rtextarea.RTextAreaBase ta)
ta
- The text area whose background we'll be painting.Method Detail |
---|
protected void paintImage(Graphics g, int x, int y)
paintImage
in class ImageBackgroundPainterStrategy
g
- The graphics context.x
- The x-coordinate at which to paint.y
- The y-coordinate at which to paint.protected void renderImage(int width, int height, int hint)
bgImage
.
This method assumes that bgImage
is not
null
.
width
- The width of the volatile image to render into.height
- The height of the volatile image to render into.hint
- The scaling hint to use.protected void rescaleImage(int width, int height, int hint)
rescaleImage
in class ImageBackgroundPainterStrategy
width
- The new width of the image.height
- The new height of the image.hint
- The scaling hint to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |