|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.DefaultBackgroundRenderer
Implements a background renderer that displays an image or a solid color as background of a Graph2DView.
Field Summary | |
static byte |
BRICKED
Mode constant. |
static byte |
CENTERED
Mode constant. |
static byte |
DYNAMIC
Mode constant. |
static byte |
FULLSCREEN
Mode constant. |
static byte |
PLAIN
Mode constant. |
static byte |
TILED
Mode constant. |
protected Graph2DView |
view
The assiociated view |
Constructor Summary | |
DefaultBackgroundRenderer(Graph2DView view)
Create a new DefaultBackgroundRenderer for a given view. |
Method Summary | |
Color |
getColor()
Returns the color used to paint the background. |
Image |
getImage()
Returns the image that will be displayed in the background or null if there is no image. |
Point |
getImageOrigin()
Returns thew image origin (upper left corner) of the image. |
URL |
getImageResource()
Returns the current image resource, or null if none was specified. |
byte |
getMode()
Returns the mode in which the background should be painted. |
void |
paint(Graphics2D gfx,
int x,
int y,
int w,
int h)
Paints the background in the given rectangular area on the given graphics context. |
protected void |
redoWorldTransform(Graphics2D gfx)
Concatenates the world transform to the graphics context transform. |
void |
setColor(Color bgColor)
Sets the color used to paint the background. |
void |
setGraph2DView(Graph2DView view)
Sets the view for this renderer. |
void |
setImage(Image bgImage)
Sets the image that will be displayed in the background. |
void |
setImageOrigin(double x,
double y)
Sets the origin (upper left corner) of the image. |
void |
setImageResource(URL imageURL)
Sets the image resource from which the background image should be loaded. |
void |
setMode(byte mode)
Sets the mode in which the backgorund should be painted. |
protected void |
undoWorldTransform(Graphics2D gfx)
Concatenates the inverse of the world transform to the graphics context transform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte FULLSCREEN
public static final byte TILED
public static final byte BRICKED
public static final byte CENTERED
public static final byte PLAIN
public static final byte DYNAMIC
protected Graph2DView view
Constructor Detail |
public DefaultBackgroundRenderer(Graph2DView view)
Method Detail |
public URL getImageResource()
null
if none was specified.
public void setGraph2DView(Graph2DView view)
public void setImageResource(URL imageURL)
public void setImage(Image bgImage)
public Image getImage()
null
if there is no image.
public void setColor(Color bgColor)
public Color getColor()
public void setImageOrigin(double x, double y)
public Point getImageOrigin()
public void setMode(byte mode)
DefaultBackgroundRenderer.PLAIN
DefaultBackgroundRenderer.FULLSCREEN
,
DefaultBackgroundRenderer.TILED
,
DefaultBackgroundRenderer.BRICKED
,
DefaultBackgroundRenderer.CENTERED
,
DefaultBackgroundRenderer.PLAIN
,
DefaultBackgroundRenderer.DYNAMIC
public byte getMode()
public void paint(Graphics2D gfx, int x, int y, int w, int h)
paint
in interface BackgroundRenderer
protected void undoWorldTransform(Graphics2D gfx)
protected void redoWorldTransform(Graphics2D gfx)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |