|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.adornments.SolidBackground
public class SolidBackground
Provides access to the SolidBackground object.
The SolidBackground object allows changing the color to the chart backgrounds.
The Color can be changed for either the Chart's background area, or the Chart's plot area, by using the Chart.setBackColor(java.awt.Color)
and Chart.setPlotAreaColor(java.awt.Color)
properties.
The following image shows an Azure BackColor:
Important Note : To set the solid background of a chart in your applications, you must reference the Adornments assembly in your project.
Constructor Summary | |
---|---|
SolidBackground()
|
|
SolidBackground(Color color)
|
Method Summary | |
---|---|
void |
draw(Graphics2D g,
Rectangle r,
Color clrExternal)
Draws a Chart FX SolidBackground on a selected device context. |
Color |
getColor()
Gets the Color. |
void |
setColor(Color value)
Sets the color of the background. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SolidBackground()
public SolidBackground(Color color)
Method Detail |
---|
public void draw(Graphics2D g, Rectangle r, Color clrExternal)
Draws a Chart FX SolidBackground on a selected device context.
This method allows you to draw a SolidBackground to a selected device context without ever assigning this background to a chart.
g
- A Graphics object associated with a specific device context.r
- A Rectangle object specifying the desired position and size of the SolidBackground.clrExternal
- The Color for the Background.setColor(java.awt.Color)
,
SimpleBorder.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
GradientBackground.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
ImageBorder.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
ImageBackground.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
SimpleBorder
,
GradientBackground
,
ImageBorder
,
ImageBackground
public Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public void setColor(Color value)
Sets the color of the background.
This property is used to set the color of the solid background in a chart. The Chart Chart.setBackground(com.softwarefx.chartfx.server.adornments.IBackgroundAdornment)
is the area behind the ploting area, and is set to Yellow in the sample:
It can also be used to set the color of the ploting area (i.e., Chart.setPlotAreaBackground(com.softwarefx.chartfx.server.adornments.IBackgroundAdornment)
):
The Chart's Chart.setBackColor(java.awt.Color)
and Chart.setPlotAreaColor(java.awt.Color)
are shorcuts to this property. The background color can be changed two ways:
SolidBackground s = new SolidBackground();
s.setColor(new java.awt.Color(238, 255, 255));
chart1.setBackground(s);
Or the following (with a solid background):
chart1.setBackColor(new java.awt.Color(238, 255, 255));
Chart.setBackColor(java.awt.Color)
,
Chart.setPlotAreaColor(java.awt.Color)
,
draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |