|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.ImageBackground
public final class ImageBackground
Provides access to the ImageBackground object.
The ImageBackground Class is used to set an image for the background of a chart. Using the BackObject property supported by the Chart object, developers may configure a selected image, with other attributes, to the chart:
ImageBackground ib = new ImageBackground();
ib.setBackColor(Color.RED);
ib.setMode(ImageMode.CENTER);
ib.setImage(java.awt.Toolkit.getDefaultToolkit().getImage("C:\\Image.bmp"));
chart1.setBackObject(ib);
Constructor Summary | |
---|---|
ImageBackground()
|
|
ImageBackground(java.awt.Image image)
|
|
ImageBackground(java.lang.String path)
|
Method Summary | |
---|---|
void |
draw(java.awt.Graphics2D graphics2D,
java.awt.Rectangle r,
java.awt.Color clrExternal)
Used to draw a Chart FX ImageBackground on a selected device context. |
java.awt.Color |
getBackColor()
Gets the BackColor. |
java.awt.Image |
getImage()
Gets the Image. |
int |
getMode()
Gets the Mode. |
void |
setBackColor(java.awt.Color value)
Gets or sets the backcolor when an ImageBackground object uses a picture with transparency. |
void |
setImage(java.awt.Image value)
Gets or sets a image for the ImageBackground object. |
void |
setMode(int value)
Gets or sets the rendering style for the image used as the ImageBackground. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageBackground()
public ImageBackground(java.lang.String path)
public ImageBackground(java.awt.Image image)
Method Detail |
---|
public void draw(java.awt.Graphics2D graphics2D, java.awt.Rectangle r, java.awt.Color clrExternal)
Used to draw a Chart FX ImageBackground on a selected device context.
This method allows you to draw an ImageBackground to a selected device context without ever assigning the ImageBackground object to a chart.
graphics2D
- r
- A Rectangle object specifying the desired position and size of the border.clrExternal
- The external color for the border.public java.awt.Color getBackColor()
Gets the BackColor. For more detail see setBackColor(java.awt.Color)
.
public java.awt.Image getImage()
Gets the Image. For more detail see setImage(java.awt.Image)
.
public int getMode()
Gets the Mode. For more detail see setMode(int)
.
public void setBackColor(java.awt.Color value)
Gets or sets the backcolor when an ImageBackground object uses a picture with transparency.
Use the setImage(java.awt.Image)
property to configure the picture file to be used for the ImageBackground.
The setMode(int)
property is used to get or set the rendering style for the background image.
For more information regarding the Color type, please refer to the Java API Documentation.
setImage(java.awt.Image)
,
setMode(int)
public void setImage(java.awt.Image value)
Gets or sets a image for the ImageBackground object.
To make the background image viewable, you may wish to configure the ChartCore.setInsideColor(java.awt.Color)
of the chart to be transparent.
You may need to adjust the AxisSectionBase.setTextColor(java.awt.Color)
and Chart.setFont(java.awt.Font)
within the chart when using this property to make the chart readable.
The ImageBackground object is applied to a chart using the ChartCore.setBackObject(SoftwareFX.ChartFX.IAdornment)
property. A GradientBackground
may be assigned to the background using the BackObject property as well.
Use the setBackColor(java.awt.Color)
property of the ImageBackground class to set a background color for images using transparency.ChartCore.setBackColor(java.awt.Color)
For more information regarding the Image type, please refer to the Java API Documentation.
An image has been set as the ChartCore.setBackObject(SoftwareFX.ChartFX.IAdornment)
for the chart below:
ChartCore.setInsideColor(java.awt.Color)
,
AxisSectionBase.setTextColor(java.awt.Color)
,
Chart.setFont(java.awt.Font)
,
ChartCore.setBackObject(SoftwareFX.ChartFX.IAdornment)
,
setBackColor(java.awt.Color)
,
GradientBackground
public void setMode(int value)
Gets or sets the rendering style for the image used as the ImageBackground.
ImageMode :
These values describe how an image will be displayed in the chart background when using the BackgroundImage property.Value | Description |
---|---|
ImageMode.STRETCH | Stretches or shrinks an image to fit in the chart background area. |
ImageMode.CLIPPED | Places the top left corner of the image in the top left corner of the chart background area. |
ImageMode.TILE | Tiles an image in the chart background. |
ImageMode.CENTER | Centers an image in the chart background. |
ImageMode.WATERMARK | Creates a watermark with the configured background image. |
This property is used to set the style for the picture configured with the setImage(java.awt.Image)
property.
Use the setBackColor(java.awt.Color)
property of the ImageBackground class to set a background color for images using transparency.
setImage(java.awt.Image)
,
setBackColor(java.awt.Color)
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |