|
|||||||||
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.ChartGradient
public class ChartGradient
This class adds a two color gradient to a ChartAttribute object.
Field Summary |
---|
Constructor Summary | |
---|---|
ChartGradient()
Default constructor for the ChartGradient class. |
|
ChartGradient(java.awt.Color startcolor,
java.awt.Color endcolor)
Constructor for the ChartGradient class. |
|
ChartGradient(java.awt.Color startcolor,
java.awt.Color endcolor,
int graddir)
Constructor for the ChartGradient class. |
|
ChartGradient(PhysicalCoordinates transform,
java.awt.Color startcolor,
java.awt.Color endcolor,
int graddir)
Constructor for the ChartGradient class. |
|
ChartGradient(PhysicalCoordinates transform,
int gradmode,
java.awt.Color[] gradcolors,
double[] gradbreak,
int graddir)
Constructor for the ChartGradient class. |
|
ChartGradient(PhysicalCoordinates transform,
int gradmode,
java.awt.Color startcolor,
java.awt.Color endcolor,
int graddir)
Constructor for the ChartGradient class. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns an object that is a clone of this ChartGradient object. |
void |
copy(ChartGradient source)
Copies the source ChartGradient object. |
PhysicalCoordinates |
getChartObjScale()
Get/Set the physical coordinate system associated with the gradient. |
void |
getDirectionAdjustedPoints(ChartRectangle2D rect2d,
int dir,
java.awt.Point p1,
java.awt.Point p2)
|
double[] |
getGradientBreakpoints()
Get/Set the gradient breakpoints for the color blend of the GradientPaint. |
java.awt.GradientPaint |
getGradientBrush()
Returns the most recent GradientPaint, without remaking it. |
java.awt.Color[] |
getGradientColors()
Get/Set the gradient colors for the color blend of the GradientPaint. |
int |
getGradientDirection()
Get/Set the gradient direction in degrees (+- 360), with 0 pointing to the right along the x-axis. |
int |
getGradientMode()
Get/Set the gradient mode. |
ChartRectangle2D |
getGradientRectangle()
Get/Set the gradient rectangle for the color blend of the GradientPaint. |
java.awt.GradientPaint |
makeGradientBrush()
Makes a LinearGradientBrush using the current properties. |
void |
setChartObjScale(PhysicalCoordinates value)
Get/Set the physical coordinate system associated with the gradient. |
void |
setGradientBreakpoints(double[] value)
Get/Set the gradient breakpoints for the color blend of the GradientPaint. |
void |
setGradientColors(java.awt.Color[] value)
Get/Set the gradient colors for the color blend of the GradientPaint. |
void |
setGradientDirection(int value)
Get/Set the gradient direction in degrees (+- 360), with 0 pointing to the right along the x-axis. |
void |
setGradientMode(int value)
Get/Set the gradient mode. |
void |
setGradientRectangle(ChartRectangle2D value)
Get/Set the gradient rectangle for the color blend of the GradientPaint. |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, errorCheck, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChartGradient()
public ChartGradient(java.awt.Color startcolor, java.awt.Color endcolor)
startcolor
- The starting gradient colorendcolor
- The ending gradient colorpublic ChartGradient(java.awt.Color startcolor, java.awt.Color endcolor, int graddir)
startcolor
- The starting gradient colorendcolor
- The ending gradient colorgraddir
- The direction of the gradient in degrees. The value of 0 points along at the x-axis and increasing values rotate clockwise.
If you use the GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES, always specify a value that is a multiple of 90 (0, 90, 180, 270, 360). For the other
gradient modes you can specify any value between +- 360.public ChartGradient(PhysicalCoordinates transform, java.awt.Color startcolor, java.awt.Color endcolor, int graddir)
transform
- The coordinate system of the object the ChartGradient is to apply to. This is needed only if you use the
GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES gradient mode.startcolor
- The starting gradient colorendcolor
- The ending gradient colorgraddir
- The direction of the gradient in degrees. The value of 0 points along at the x-axis and increasing values rotate clockwise.
If you use the GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES, always specify a value that is a multiple of 90 (0, 90, 180, 270, 360). For the other
gradient modes you can specify any value between +- 360.public ChartGradient(PhysicalCoordinates transform, int gradmode, java.awt.Color[] gradcolors, double[] gradbreak, int graddir)
transform
- The coordinate system of the object the ChartGradient is to apply to. This is needed only if you use the
GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES gradient mode.gradmode
- The gradient mode, use one of the gradient mode constants:
GRADIENT_MAPTO_OBJECT, GRADIENT_MAPTO_PLOT_NORMALIZED_COORDINATES,
or GRADIENT_MAPTO_GRAPH_NORMALIZED_COORDINATES.gradcolors
- An array of colors to use in the gradient (limited to two colors at this time)gradbreak
- An array of double, same size as gradcolors, specifying the breakpoints of the gradient colors. For
the GRADIENT_MAPTO_OBJECT, GRADIENT_MAPTO_PLOT_NORMALIZED_COORDINATES, and GRADIENT_MAPTO_GRAPH_NORMALIZED_COORDINATES modes, the
first value of the array should always be 0.0 and the last value should always be 1.0. The other values should be in the range 0.0 to 1.0.
In the case of GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES,
the first values should be the scale minimum and the last value should be the scale maximum. The other values should be between this range.graddir
- The direction of the gradient in degrees. The value of 0 points along at the x-axis and increasing values rotate clockwise.
If you use the GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES, always specify a value that is a multiple of 90 (0, 90, 180, 270, 360). For the other
gradient modes you can specify any value between +- 360.public ChartGradient(PhysicalCoordinates transform, int gradmode, java.awt.Color startcolor, java.awt.Color endcolor, int graddir)
transform
- The coordinate system of the object the ChartGradient is to apply to. This is needed only if you use the
GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES gradient mode.gradmode
- The gradient mode, use one of the gradient mode constants:
GRADIENT_MAPTO_OBJECT, GRADIENT_MAPTO_PLOT_NORMALIZED_COORDINATES,
or GRADIENT_MAPTO_GRAPH_NORMALIZED_COORDINATES.startcolor
- The starting gradient colorendcolor
- The ending gradient colorgraddir
- The direction of the gradient in degrees. The value of 0 points along at the x-axis and increasing values rotate clockwise.
If you use the GRADIENT_MAPTO_PLOT_PHYSICAL_COORDINATES, always specify a value that is a multiple of 90 (0, 90, 180, 270, 360). For the other
gradient modes you can specify any value between +- 360.Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public void copy(ChartGradient source)
source
- The source object.public PhysicalCoordinates getChartObjScale()
public void getDirectionAdjustedPoints(ChartRectangle2D rect2d, int dir, java.awt.Point p1, java.awt.Point p2)
public double[] getGradientBreakpoints()
public java.awt.GradientPaint getGradientBrush()
public java.awt.Color[] getGradientColors()
public int getGradientDirection()
public int getGradientMode()
public ChartRectangle2D getGradientRectangle()
public java.awt.GradientPaint makeGradientBrush()
public void setChartObjScale(PhysicalCoordinates value)
public void setGradientBreakpoints(double[] value)
public void setGradientColors(java.awt.Color[] value)
public void setGradientDirection(int value)
public void setGradientMode(int value)
public void setGradientRectangle(ChartRectangle2D value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |