|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.chart2djava.GraphObj
com.quinncurtis.chart2djava.Background
public class Background
The Background manages and displays the background of the graph area and the plotting area of the chart.
Field Summary |
---|
Constructor Summary | |
---|---|
Background()
The default Background constructor. |
|
Background(PhysicalCoordinates transform,
int bgtype,
java.awt.Color bgcolor)
This constructor creates a simple Background object that uses the specified chart scale, background type and color. |
|
Background(PhysicalCoordinates transform,
int bgtype,
java.awt.Color color1,
java.awt.Color color2,
double barwidth,
int dir)
This constructor creates an Background object that uses the specified chart scale, background type and gradient. |
|
Background(PhysicalCoordinates transform,
int bgtype,
java.awt.Color startcolor,
java.awt.Color stopcolor,
int dir)
This constructor creates an Background object that uses the specified chart scale, background type and gradient. |
|
Background(PhysicalCoordinates transform,
int bgtype,
java.awt.GradientPaint gradient)
This constructor creates an Background object that uses the specified chart scale, background type and gradient. |
|
Background(PhysicalCoordinates transform,
int bgtype,
java.awt.TexturePaint texture)
This constructor creates an Background object that uses the specified chart scale, background type and texture. |
Method Summary | |
---|---|
boolean |
checkIntersection(ChartPoint2D testpoint,
NearestPointData np)
Returns true if the test point intersects a background object. |
java.lang.Object |
clone()
Returns an object that is a clone of this Background object. |
void |
copy(Background source)
Copies the source chart background. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the current background object for common errors. |
java.awt.GradientPaint |
getBackgroundGradient()
Returns the user-defined gradient used when the USERGRADIENTMODE mode is selected. |
int |
getBackgroundMode()
Returns the background mode. |
java.awt.TexturePaint |
getBackgroundTexture()
Returns the user-defined texture used when the USERTEXTUREMODE mode is selected. |
int |
getBackgroundType()
Returns the background type. |
double |
getBarWidth()
|
java.awt.Color |
getFillColor()
|
int |
getGradientDirection()
Returns the gradient direction used when the SIMPLEGRADIENTMODE mode is selected. |
java.awt.Color |
getGradientStartColor()
Returns the starting color of the gradient used when the SIMPLEGRADIENTMODE mode is selected. |
java.awt.Color |
getGradientStopColor()
Returns the ending color of the gradient used when the SIMPLEGRADIENTMODE mode is selected. |
void |
initBackground(PhysicalCoordinates transform,
int bgtype,
java.awt.Color bgcolor)
|
void |
setBackgroundGradient(java.awt.GradientPaint gradient)
Sets the user-defined gradient used when the USERGRADIENTMODE mode is selected. |
void |
setBackgroundTexture(java.awt.TexturePaint texture)
Sets the user-defined texture used when the USERTEXTUREMODE mode is selected. |
void |
setBackgroundType(int backgroundtype)
Sets the background type. |
void |
setBarWidth(double value)
|
void |
setFillColor(java.awt.Color value)
|
void |
setGradientDirection(int gradientdir)
Sets the gradient direction used when the SIMPLEGRADIENTMODE mode is selected. |
void |
setGradientStartColor(java.awt.Color color)
Sets the starting color of a gradient used when the SIMPLEGRADIENTMODE mode is selected. |
void |
setGradientStopColor(java.awt.Color color)
Sets the ending color of a gradient used when the SIMPLEGRADIENTMODE mode is selected. |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Background()
public Background(PhysicalCoordinates transform, int bgtype, java.awt.Color bgcolor)
transform
- The scale associated with the chart background.bgtype
- The chart background type. Use one of the chart background type constants:
PLOT_BACKGROUND or GRAPH_BACKGROUND. Specifying the PLOT_BACKGROUND type fills the plotting
area of the chart, while specifying the GRAPH_BACKGROUND type fills the entire
graph area of the chart.bgcolor
- The background fill color.public Background(PhysicalCoordinates transform, int bgtype, java.awt.Color color1, java.awt.Color color2, double barwidth, int dir)
transform
- The scale associated with the chart background.bgtype
- The chart background type. Use one of the chart background type constants:
PLOT_BACKGROUND or GRAPH_BACKGROUND. Specifying the PLOT_BACKGROUND type fills the plotting
area of the chart, while specifying the GRAPH_BACKGROUND type fills the entire
graph area of the chart.color1
- Specifies the starting color value of the gradient.color2
- Specifies the ending color value of the gradient.barwidth
- Specifies the width of a single background bar.dir
- Specifies the direction of the gradient.public Background(PhysicalCoordinates transform, int bgtype, java.awt.Color startcolor, java.awt.Color stopcolor, int dir)
transform
- The scale associated with the chart background.bgtype
- The chart background type. Use one of the chart background type constants:
PLOT_BACKGROUND or GRAPH_BACKGROUND. Specifying the PLOT_BACKGROUND type fills the plotting
area of the chart, while specifying the GRAPH_BACKGROUND type fills the entire
graph area of the chart.startcolor
- Specifies the starting color value of the gradient.stopcolor
- Specifies the ending color value of the gradient.dir
- Specifies the direction of the gradient.public Background(PhysicalCoordinates transform, int bgtype, java.awt.GradientPaint gradient)
transform
- The scale associated with the chart background.bgtype
- The chart background type. Use one of the chart background type constants:
PLOT_BACKGROUND or GRAPH_BACKGROUND. Specifying the PLOT_BACKGROUND type fills the plotting
area of the chart, while specifying the GRAPH_BACKGROUND type fills the entire
graph area of the chart.gradient
- The user defined background gradient.public Background(PhysicalCoordinates transform, int bgtype, java.awt.TexturePaint texture)
transform
- The scale associated with the chart background.bgtype
- The chart background type. Use one of the chart background type constants:
PLOT_BACKGROUND or GRAPH_BACKGROUND. Specifying the PLOT_BACKGROUND type fills the plotting
area of the chart, while specifying the GRAPH_BACKGROUND type fills the entire
graph area of the chart.texture
- The user defined background texture.Method Detail |
---|
public boolean checkIntersection(ChartPoint2D testpoint, NearestPointData np)
checkIntersection
in class GraphObj
testpoint
- The test pointnp
- Nearest point information for data based objects.
public java.lang.Object clone()
clone
in class GraphObj
public void copy(Background source)
source
- The source chart background object.public void draw(java.awt.Graphics2D g2)
draw
in class GraphObj
g2
- The graphics context.public int errorCheck(int nerror)
errorCheck
in class GraphObj
nerror
- Current error state
public java.awt.GradientPaint getBackgroundGradient()
public int getBackgroundMode()
public java.awt.TexturePaint getBackgroundTexture()
public int getBackgroundType()
public double getBarWidth()
public java.awt.Color getFillColor()
public int getGradientDirection()
public java.awt.Color getGradientStartColor()
public java.awt.Color getGradientStopColor()
public void initBackground(PhysicalCoordinates transform, int bgtype, java.awt.Color bgcolor)
public void setBackgroundGradient(java.awt.GradientPaint gradient)
gradient
- References a user defined gradient used when the USERGRADIENTMODE mode is selected.public void setBackgroundTexture(java.awt.TexturePaint texture)
texture
- References a user defined texture used when the USERTEXTUREMODE mode is selected.public void setBackgroundType(int backgroundtype)
backgroundtype
- Sets the background type. Use one of the Chart background type constants:
PLOT_BACKGROUND or GRAPH_BACKGROUND.public void setBarWidth(double value)
public void setFillColor(java.awt.Color value)
public void setGradientDirection(int gradientdir)
gradientdir
- Sets the gradient direction of a gradient used when the SIMPLEGRADIENTMODE mode is selected.public void setGradientStartColor(java.awt.Color color)
color
- Sets the starting color of a gradient used when the SIMPLEGRADIENTMODE mode is selected.public void setGradientStopColor(java.awt.Color color)
color
- Sets the ending color of a gradient used when the SIMPLEGRADIENTMODE mode is selected.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |