|
Chart FX for Java 6.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSoftwareFX.ChartFX.ImageBackground
Provides access to the ImageBackground object.
The ImageBackground 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 or sets the backcolor when an ImageBackground object uses a picture with transparency. |
java.awt.Image |
getImage()
Gets or sets a image for the ImageBackground object. |
int |
getMode()
Gets or sets the rendering style for the image used as the ImageBackground. |
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.
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 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 java.awt.Image getImage()
Gets or sets a image for the ImageBackground object.
To make the background image viewable, you may wish to configure the Chart.setInsideColor(java.awt.Color)
of the chart to be transparent.
You may need to adjust the AxisSection.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 Chart.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.Chart.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 Chart.setBackObject(SoftwareFX.ChartFX.IAdornment)
for the chart below:
Chart.setInsideColor(java.awt.Color)
,
AxisSection.setTextColor(java.awt.Color)
,
Chart.setFont(java.awt.Font)
,
Chart.setBackObject(SoftwareFX.ChartFX.IAdornment)
,
setBackColor(java.awt.Color)
,
GradientBackground
public int getMode()
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 |
STRETCH | Stretches or shrinks an image to fit in the chart background area. |
CLIPPED | Places the top left corner of the image in the top left corner of the chart background area. |
TILE | Tiles an image in the chart background. |
CENTER | Centers an image in the chart background. |
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)
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 Chart.setInsideColor(java.awt.Color)
of the chart to be transparent.
You may need to adjust the AxisSection.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 Chart.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.Chart.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 Chart.setBackObject(SoftwareFX.ChartFX.IAdornment)
for the chart below:
Chart.setInsideColor(java.awt.Color)
,
AxisSection.setTextColor(java.awt.Color)
,
Chart.setFont(java.awt.Font)
,
Chart.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 |
STRETCH | Stretches or shrinks an image to fit in the chart background area. |
CLIPPED | Places the top left corner of the image in the top left corner of the chart background area. |
TILE | Tiles an image in the chart background. |
CENTER | Centers an image in the chart background. |
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 |