|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.display.BackgroundPainter
public class BackgroundPainter
Paints a background image in a display. The image can either pan and zoom
along with the display or stay stationary. Additionally, the image can
be optionally tiled across the Display space. This class is used by
the Display
class in response to the
Display.setBackgroundImage(Image, boolean, boolean)
and
Display.setBackgroundImage(String, boolean, boolean)
methods.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
postPaint(Display d,
java.awt.Graphics2D g)
Does nothing. |
void |
prePaint(Display d,
java.awt.Graphics2D g)
Paint the background. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 onceMethod Detail |
---|
public void prePaint(Display d, java.awt.Graphics2D g)
prePaint
in interface PaintListener
d
- 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 PaintListener
d
- the Display about to paint itselfg
- the Graphics context for the DisplayPaintListener.postPaint(prefuse.Display, java.awt.Graphics2D)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |