public class BackgroundPainter extends java.lang.Object implements PaintListener
Display class in response to the
Display.setBackgroundImage(Image, boolean, boolean) and
Display.setBackgroundImage(String, boolean, boolean)
methods.| Constructor and Description |
|---|
BackgroundPainter(java.awt.Image image,
boolean fixed,
boolean tile)
Create a new BackgroundPainter.
|
BackgroundPainter(java.lang.String imageLocation,
boolean fixed,
boolean tile)
Create a new BackgroundPainter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
postPaint(Display d,
java.awt.Graphics2D g)
Does nothing.
|
void |
prePaint(Display d,
java.awt.Graphics2D g)
Paint the background.
|
public BackgroundPainter(java.lang.String imageLocation,
boolean fixed,
boolean tile)
imageLocation - a location String of where to retrieve the
image file from. Uses
IOLib.urlFromString(String) to resolve
the String.fixed - true if the background image should stay in a fixed
position, invariant to panning, zooming, or rotation; false if
the image should be subject to view transformstile - true to tile the image across the visible background,
false to only include the image oncepublic BackgroundPainter(java.awt.Image image,
boolean fixed,
boolean tile)
image - the background Imagefixed - true if the background image should stay in a fixed
position, invariant to panning, zooming, or rotation; false if
the image should be subject to view transformstile - true to tile the image across the visible background,
false to only include the image oncepublic void prePaint(Display d, java.awt.Graphics2D g)
prePaint in interface PaintListenerd - the Display about to paint itselfg - the Graphics context for the DisplayPaintListener.prePaint(prefuse.Display, java.awt.Graphics2D)public void postPaint(Display d, java.awt.Graphics2D g)
postPaint in interface PaintListenerd - the Display about to paint itselfg - the Graphics context for the DisplayPaintListener.postPaint(prefuse.Display, java.awt.Graphics2D)